~ubuntu-branches/ubuntu/gutsy/icedtea-java7/gutsy

« back to all changes in this revision

Viewing changes to debian/patches/icedtea-memory-limits.patch

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2007-10-07 23:43:28 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20071007234328-uy4k67jor6a3eftl
Tags: 7~b21-1.4+20071007-0ubuntu1
* Update icedtea to vcs 20071007.
* Update java-access-bridge to 1.20.0.
* Add build-dependency on libxinerama-dev.
* Add Xb-Npp-xxx tags for the -plugin package.
* Name the plugin "GCJ Web Browser Plugin (using IcedTea)", GCJ now
  "Great Cool Java" (according to Michael Koch).
* Compress binary-indep packages using bzip2.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
The fairly low default limits on PermGen and MaxHeap space cause a
 
2
great deal of trouble on Linux, partiularly when running Eclipse.
 
3
Fedora maintainers considered adding a special wrapper script to
 
4
Eclipse that sets "-XX:MaxPermSize=128m" or something similar, but
 
5
this would only solve the problem for Eclipse: non-Eclipse
 
6
applications would continue to be bitten the same way.
 
7
 
 
8
In the end, Sun's Java seems to be the only VM that is affected by the
 
9
PermGen limit, and there are many references on the web to confused
 
10
users hitting it and having no idea how to proceed.  It makes sense
 
11
for Fedora and other Linux distros to bump the limit to something that
 
12
better fits the kinds of applications people are running.
 
13
 
 
14
There was some talk about removing these limits entirely, but:
 
15
 
 
16
1.  It is sometimes useful to set a low limit for some processes in
 
17
order to prevent them going insane and monopolizing a machine.  This
 
18
is particularly useful if a server is the subject of a denial of
 
19
service attack.
 
20
 
 
21
2.  The Java VM needs hit its own memory limit before the operating
 
22
decides to kills it, so that a proper log and stack trace can be
 
23
produced.
 
24
 
 
25
3.  There may be other untoward consequences of removing these limits:
 
26
we don't think that the Java VM has ever been tested under such
 
27
conditions.  It would take a very careful code audit to show that
 
28
simply removing the checks doesn't violate assumptions in the VM.
 
29
 
 
30
Andrew.
 
31
 
 
32
 
 
33
2007-10-08  Andrew Haley  <aph@redhat.com>
 
34
 
 
35
        * patches/icedtea-memory-limits.patch: New file.
 
36
        Set maximum PermGen space to 128M, MaxHeap to 512M.
 
37
        * Makefile.am (ICEDTEA_PATCHES): Add icedtea-memory-limits.patch.
 
38
 
 
39
--- openjdk/hotspot/src/share/vm/runtime/globals.hpp~   2007-09-27 08:46:16.000000000 +0100
 
40
+++ openjdk/hotspot/src/share/vm/runtime/globals.hpp    2007-10-05 19:06:32.000000000 +0100
 
41
@@ -2612,7 +2612,7 @@
 
42
           "an OS lock")                                                     \
 
43
                                                                             \
 
44
   /* gc parameters */                                                       \
 
45
-  product(uintx, MaxHeapSize, ScaleForWordSize(64*M),                       \
 
46
+  product(uintx, MaxHeapSize, ScaleForWordSize(512*M),                       \
 
47
           "Default maximum size for object heap (in bytes)")                \
 
48
                                                                             \
 
49
   product_pd(uintx, NewSize,                                               \
 
50
--- openjdk/hotspot/src/cpu/x86/vm/c2_globals_x86.hpp~  2007-09-27 08:45:59.000000000 +0100
 
51
+++ openjdk/hotspot/src/cpu/x86/vm/c2_globals_x86.hpp   2007-10-05 19:02:37.000000000 +0100
 
52
@@ -101,7 +101,7 @@
 
53
 
 
54
 // Heap related flags
 
55
 define_pd_global(uintx, PermSize,    ScaleForWordSize(16*M));
 
56
-define_pd_global(uintx, MaxPermSize, ScaleForWordSize(64*M));
 
57
+define_pd_global(uintx, MaxPermSize, ScaleForWordSize(128*M));
 
58
 
 
59
 // Ergonomics related flags
 
60
 define_pd_global(bool, NeverActAsServerClassMachine, false);
 
61