Reputation: 3455
We use Windows 2003 server 64-bit for running a WebSphere/J2EE application (JVM is also 64-bit). The machine has 16GB physical memory. It's unfortunately that our application is memory-intensive, and it would still take some time for us to add additional memory.
I understand operating system itself requires certain amount of memory. That being said, what would be a safe (without paging?) maximum heap size we can use, assuming this is the sole application running on the system?
Upvotes: 4
Views: 2034
Reputation: 533530
If you have two memory banks e.g. as you have two CPUs, you may find that your application performance is significantly slower if you use more than half your memory. You will get the best performance from your memory if you use about 3/4 of your memory bank size.
You may still get better performance for using more of your memory, but it won't scale the way you might expect and your GC times will jump significantly.
Upvotes: 0
Reputation: 718826
I think that the answer will depend on many factors, many of which are hard to predict.
IMO, the most practical way to determine the safe max heap size is by trial and error. I'd start with a max heap size of around 15Gb, look at the system's memory / paging stats, and adjust up or down.
Upvotes: 2
Reputation: 2807
The best idea is to experiment... Check the first answer here... it will help you...
You can write a batch file to do experiment for different heap sizes and see where it crashes...
Upvotes: 0