There has been some discussion on various ColdFusion discussion lists regarding the maximum heap size you can allocate to ColdFusion/Jrun. Windows allows a process to grab as much as 2GB of contiguous memory. Subtracting out memory for overhead, permgen memory, etc. you are left somewhere with 1.5-1.8GB available for general heap memory.

We were considering moving one of our clients to a Linux server if that would allow us to allocate more memory to the heap. In my research, it seemed the opinions were split about 50/50 as to if Linux would allow us to allocate more than 2GB of memory. So I decided to test for myself. I placed an order for 4GB of memory and waited for them to arrive.

Once I had swapped out my 4 256MB modules for the 4 1GB modules, I increased the heap size (Xms and Xmx options in jvm.config) to 2048 and restarted the server. No problems! I kept increasing by 100mb at a time until I reached 2600 – there it failed to start, so I backed it down to 2500mb. With the permgen and other overhead, Jrun was taking up about 2950Mb of memory – indicating a 3GB limit. I have been running this way for a few days now with no problems.

Your experience may vary of course, depending on what memory options you have in your jvm.config file. I did not need to do anything special other than bump up the Xms and Xmx values.

So the short answer is Yes, you can allocate about 1GB more memory to ColdFusion when running on Linux.

4 Comments

  1. Michael Sharman says:

    Great findings Ryan, you said “findings” were 50/50. Does that mean that Adobe don’t have an “official” memory limit for JRun per OS?

  2. Ryan Stille says:

    Not that I’ve ever come across. My findings were on blogs and a couple ColdFusion discussion lists.

  3. andy matthews says:

    1.5 – 1.8 gigs for Windows? My company is under the impression that the max for Windows 32 bit is 1gig. Do you have some settings we’re missing? We’re under some serious load and having to put in a new web server every 2 or 3 months because of memory issues.

  4. Ryan Stille says:

    Andy, below is the java.args line for one of our servers. Nothing special I think. Things to look at are 1) how much memory do you have on your servers and 2) what else is running on them. Maybe you don’t have enough memory available to allocate more than 1GB.

    java.args=-server -Xmx1280m -Xms1280m -Dsun.io.useCanonCaches=false -XX:PermSize=64m -XX:+UseConcMarkSweepGC -XX:NewSize=48m -XX:SurvivorRatio=4 -XX:+UseParNewGC -XX:MaxPermSize=192m -Dcoldfusion.rootDir={application.home}/../ -Dcoldfusion.libPath={application.home}/../lib -Dcoldfusion.classPath={application.home}/../lib/updates,{application.home}/../lib,{application.home}/../gateway/lib/,{application.home}/../wwwroot/WEB-INF/flex/jars,{application.home}/../wwwroot/WEB-INF/cfform/jars