How to set default system java heap Xmx limits?
Issue
-
I need to set default limits on java processes since my users are over-allocating memory on my servers. I can't use a hard ulimit on virtual memory.
-
I have set
JAVA_OPTS="-Xms200m -Xmx2000"
in/etc/profile
and/etc/csh.login
andJAVA_OPTS
shows up as an environmental variable when a user logs in, but these defaults are never added to a user's java process/program when it starts. -
How do I define a default heap size for java processes?
Environment
- Red Hat Enterprise Linux 5
- Red Hat Enterprise Linux 6
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.