Our server has 4GB RAM, and it runs nothing else except the JBoss Appserver and Apache HTTP server. So I think we can definitely afford a heap size as large as 1-2GB. However, I heard that there are some concerns when the heap size is larger than 1GB. Some say these problems are platform/OS-dependent. I wonder if there is any information about this issue?
My environment: Windows 2003 Entreprise Edition, JBoss 2.4.8, J2SE1.3.1 [ September 09, 2005: Message edited by: Henry Leung ]
We noticed that our sever doesn't start if we set xmx to 2gb. However it works fine with 1.5gb. Sun's site has an articale about right settings for xms and xmx. I think with latest VM you can afford up to 4gb. We have 4 CPUs 4 GB box and w2k.
JVM 1.3.1 is a 32 Bit JVM. So you can address upto 2^32 bytes (4 GB). There are Memory requirements for JVM other than Heap like the Memory requirement for the Threads etc. To my knowledge, you can have a heap of 4GB - Thread stack size * (no. of threads). 3.5 GB Safely.
With JVM 1.4.2 you have the -d64 option with which you get a 64 bit JVM and you can address more space 2^64 Bytes(Very huge).
But as you take larger heaps the no. of GCs reduce(advantage), and the time taken per GC increase(disadvantage). With JVM 1.3.1, the GC is single threaded and it will stop the application threads. So Check the response time affordability of your application
subject: Any concerns for large heap size? (e.g. 2GB)