JDK-6512013 : Tunable Heap settings (e.g. -Xmx) should be tunable after startup.
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 6
  • Priority: P5
  • Status: Closed
  • Resolution: Duplicate
  • OS: linux
  • CPU: x86
  • Submitted: 2007-01-11
  • Updated: 2011-02-16
  • Resolved: 2010-09-02
Related Reports
Duplicate :  
Description
A DESCRIPTION OF THE REQUEST :
Tuning memory for Java is a time consuming issue, and for some applications it's mostly trial-and-error guesswork.    You should be able to change the -Xmx, the garbage collection algorithm, the generation sizes, etc after the program is already running.

JUSTIFICATION :
Not all applications can be re-run any time you want to tweak memory settings.  Sometimes you predict poorly, and see an OOM errory coming, but can do nothing about it because you can bump the -Xmx up 64M to get the machine out of load balancing.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
I'd expect to be able to use something on the command line to update an existing JVM, e.g.

java -Xmx512m -p 545

Would reset the JVM running at pid '545' to have the maximum heap size of 512m.


ACTUAL -
You watch JVMs die, you waste time trying bad settings.