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/profileand/etc/csh.loginandJAVA_OPTSshows 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 of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
