Coldfusion on VPS, how much JVM heap memory?

Posted by Steven Filipowicz on Server Fault See other posts from Server Fault or by Steven Filipowicz
Published on 2012-06-21T18:34:27Z Indexed on 2012/06/22 3:18 UTC
Read the original article Hit count: 833

Filed under:
|
|

Recently I got a VPS server and I'm running Coldfusion, the website was running fine until it got more and more traffic and I started to encounter 'OutOfMemory' exceptions.

I thought simply to rise the memory of the VPS server, but this didn't help.

After doing some Google searches I found a setting in de CF Admin settings to set the JVM Heap memory. It was on the standard: Max Heap size 512MB and Min Heap size was empty. After playing around a bit I have now set it to Min 50MB and Max 200MB, good things is that I'm not getting the 'OutOfMemory' exceptions anymore. So far so good!

But with about 50 active visitors on the website, the website starts to get slow. The CPU usage is only about 8% (Windows Taskmanager), also the taskmanager show only about 30% of the 3GB RAM in use.

So I'm thinking that my values could be tweaked to use more of the RAM. Honestly I don't understand these JVM Memory heap settings, so I have no clue what is a good setting for me.

I found a CF script that displays the memory usage, the details are:

Heap Memory Usage - Committed    194 MB  
Heap Memory Usage - Initial  50.0 MB
Heap Memory Usage - Max  194 MB
Heap Memory Usage - Used     163 MB
JVM - Free Memory    31.2 MB
JVM - Max Memory     194 MB
JVM - Total Memory   194 MB
JVM - Used Memory    163 MB
Memory Pool - Code Cache - Used  13.0 MB
Memory Pool - PS Eden Space - Used   6.75 MB
Memory Pool - PS Old Gen - Used  155 MB
Memory Pool - PS Perm Gen - Used     64.2 MB
Memory Pool - PS Survivor Space - Used   1.07 MB
Non-Heap Memory Usage - Committed    77.4 MB
Non-Heap Memory Usage - Initial  18.3 MB
Non-Heap Memory Usage - Max  240 MB
Non-Heap Memory Usage - Used     77.2 MB
Free Allocated Memory: 30mb
Total Memory Allocated: 194mb
Max Memory Available to JVM: 194mb
% of Free Allocated Memory: 16%
% of Available Memory Allocated: 100%

My JVM arguments are:

  -server -Dsun.io.useCanonCaches=false -XX:MaxPermSize=192m -XX:+UseParallelGC -     Dcoldfusion.rootDir={application.home}/../ -Dcoldfusion.libPath={application.home}/../lib

Can I give the JVM more memory? If so, what settings should I use?

Thanks very much!!

© Server Fault or respective owner

Related posts about memory

Related posts about coldfusion