From http://www.trutek.com/index.php?id=173 I understand that on Linux operating system with 4GB memory, JVM can be run with maximum memory of 3800m. But I had no luck. Could someone help me in achieving on Red Hat Linux server.
Here is the details of my Linux server.
OS: Red Hat Linux (Linux xyzsrvr 2.6.9-5.ELsmp #1 SMP Wed Jan 5 19:30:39 EST 2005 i686 i686 i386 GNU/Linux)
Java: java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Server VM (build 1.5.0_06-b05, mixed mode)
RAM: 4GB
I get this below error while instructing JVM to use 3800m.
$ java -Xmn3800m -Xmx3800m xxxxx (Lots of more options)
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
I have provided information requested against each query below.
what is the total size of physical memory?
=> 4GB
what is the size of your swap space?
=> 2GB
what is the amount of free memory plus unused swap space when the operating system is just idling?
=> Not sure how would I find that. However, below is info found at header on running "top" command
Look at the documentation for these options, it says Linux platforms are limited to around 2GB, or less. Only SPARC may go beyond the figure.
I have read that some environments such as J2EE application server can achieve some advantage with multiple concurrent VMs, but whether you can use that really depends on your environment.
"Pro Java EE 5 Performance Management and Optimization" by Apress is a must-read for you, if you are managing a JavaEE environment.