Dec 22, 2009

Want more performance from a default Railo install?

The default Railo install allocated only 256mb of ram to the jee server ( resin ).  This is great for smaller projects and lower ends VPS installs but for larger apps that perhaps make use of alot of objects or framworks it can cause some slowness.  ColdFusion 8/9 default to 512 so I'll show you how to up the memory to 512.

This is for Windows but its the same for linux/OSX

Find the resin.conf file:

C:\Railo\conf\resin.conf

 Find this section:


- The JVM arguments


Change this:


-Xmx256m



to:


-Xmx512m



Restart the Railo service.

Log into the Web Admin and confirm and now watch your CFML application fly.






5 comments:

  1. Good to know! Is this for the entire server, or can it be done on a per web basis?
    ReplyDelete
  2. This is for the entire server. It's actually surprising how well Railo will run on 256 ram but even just boosting that to 512 makes a nice difference ( if you have the ram to offer ).
    ReplyDelete
  3. You should also consider setting your minimum to the same value. The less the JVM GC has to resize the heap the better. For this example -Xms512m would do the trick.
    ReplyDelete
  4. @Steve Absolutly. Also I always upgrade the jre up form 1.6.01 to what ever is most recent.
    ReplyDelete
  5. On Tomcat server:

    /tomcat/bin/setenv.sh or setenv.bat depending on your OS.

    This is what I have:
    SET "JAVA_OPTS=-Xmx1024m -XX:MaxPermSize=512m"
    ReplyDelete