| From | Sent On | Attachments |
|---|---|---|
| Andrew Haley | Oct 8, 2007 6:54 am | |
| Andrew Haley | Oct 8, 2007 6:56 am | |
| Peter B. Kessler | Oct 8, 2007 11:06 am | |
| Andrew Haley | Oct 8, 2007 1:16 pm | |
| Peter B. Kessler | Oct 8, 2007 1:56 pm | |
| Andrew Haley | Oct 9, 2007 2:08 am | |
| Peter B. Kessler | Oct 9, 2007 5:08 pm | |
| Andrew Haley | Oct 10, 2007 3:17 am | |
| Florian Weimer | Oct 10, 2007 9:54 am | |
| Peter B. Kessler | Oct 10, 2007 1:44 pm | |
| Andrew Haley | Oct 11, 2007 2:28 am | |
| Florian Weimer | Oct 11, 2007 3:08 am | |
| Andrew Haley | Oct 11, 2007 5:50 am | |
| Florian Weimer | Oct 11, 2007 6:39 am | |
| Andrew Haley | Oct 11, 2007 7:43 am | |
| Florian Weimer | Oct 11, 2007 10:28 am | |
| Andrew Haley | Oct 15, 2007 3:28 am |
| Subject: | Increase memory limits for IcedTea | |
|---|---|---|
| From: | Andrew Haley (ap...@redhat.com) | |
| Date: | Oct 8, 2007 6:54:30 am | |
| List: | net.java.openjdk.distro-pkg-dev | |
The fairly low default limits on PermGen and MaxHeap space cause a great deal of trouble on Linux, partiularly when running Eclipse. Fedora maintainers considered adding a special wrapper script to Eclipse that sets "-XX:MaxPermSize=128m" or something similar, but this would only solve the problem for Eclipse: non-Eclipse applications would continue to be bitten the same way.
In the end, Sun's Java seems to be the only VM that is affected by the VMGen limit, and there are many references on the web to confused users hitting it and having no idea how to proceed. It makes sense for Fedora and other Linux distros to bump the limit to something that better fits the kinds of applications people are running.
There was some talk about removing these limits entirely, but:
1. It is sometimes useful to set a low limit for some processes in order to prevent them going insane and monopolizing a machine. This is particularly useful if a server is the subject of a denial of service attack.
2. The Java VM needs hit its own memory limit before the operating decides to kills it, so that a proper log and stack trace can be produced.
3. There may be other untoward consequences of removing these limits: we don't think that the Java VM has ever been tested under such conditions. It would take a very careful code audit to show that simply removing the checks doesn't violate assumptions in the VM.
Andrew.
2007-10-08 Andrew Haley <aph at redhat.com>
* patches/icedtea-memory-limits.patch: New file. Set maximum PermGen space to 128M, MaxHeap to 512M. * Makefile.am (ICEDTEA_PATCHES): Add icedtea-memory-limits.patch.
--- openjdk/hotspot/src/share/vm/runtime/globals.hpp~ 2007-09-27
08:46:16.000000000 +0100
+++ openjdk/hotspot/src/share/vm/runtime/globals.hpp 2007-10-05
19:06:32.000000000 +0100
@@ -2612,7 +2612,7 @@
"an OS lock") \
\
/* gc parameters */ \
- product(uintx, MaxHeapSize, ScaleForWordSize(64*M), \
+ product(uintx, MaxHeapSize, ScaleForWordSize(512*M), \
"Default maximum size for object heap (in bytes)") \
\
product_pd(uintx, NewSize, \
--- openjdk/hotspot/src/cpu/x86/vm/c2_globals_x86.hpp~ 2007-09-27
08:45:59.000000000 +0100
+++ openjdk/hotspot/src/cpu/x86/vm/c2_globals_x86.hpp 2007-10-05
19:02:37.000000000 +0100
@@ -101,7 +101,7 @@
// Heap related flags define_pd_global(uintx, PermSize, ScaleForWordSize(16*M)); -define_pd_global(uintx, MaxPermSize, ScaleForWordSize(64*M)); +define_pd_global(uintx, MaxPermSize, ScaleForWordSize(128*M));
// Ergonomics related flags define_pd_global(bool, NeverActAsServerClassMachine, false);
--
Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4
1TE, UK
Registered in England and Wales No. 3798903





