Nov 9 2009

ColdFusion 9 + ehcache + ORM = loadTest(64-Bit)

Posted by Mike Brunt at 2:41 PM
5 comments
- Categories: Web Servers | ColdFusion | JRun-J2EE

As I mentioned in a tweet recently, we had a client reach out to us who had implemented ColdFusion 9 and ehcache and they were experiencing performance and stability issues in their application.  This point I belabor often, please load-test your code before deploying it, I am not a dictator in any way but this is just such a key issue.  

ColdFusion 9 introduces many new features two of which are integration with ehcache and also Hibernate ORM both features "out-of-the-box" use the same JVM heap memory as ColdFusion.  In a 32-bit install we have no more than a maximum of 1.4GB that can be allocated to the JVM Heap, when we add ehcache and ORM to the same heap as CF we could hit memory management issues in 32-bit systems and this is not idle theory, we have already observed this issue. One possible way to alleviate this is to have ehcache running in another JVM but the caveat is you have to communicate with ehcache via REST or SOAP which will slow things down; sort of Catch-22.

Our recommendation is to have more memory available to the JVM heap from the outset.  The easiest way to do this is to have a 64-bit system with ColdFusion 9 64-bit.  In that situation we could have up to 32GB RAM available to the JVM heap instead of just 1.4GB.  I have re-stated this several times in my presentations, please go with a 64-bit system, with a 64-bit ColdFusion version and I would further recommend at least 8GB Ram in the system.  

If you need any assistance with establishing load-testing to verify all of this please contact us.

 

Comments

sameer

sameer wrote on 11/09/09 10:02 PM

Hi Mike, I have a standard license of CF9 and I run multiple sites on my server and I have 4GB of RAM. I also have MySQL and MS-SQL Express running on the server.

What should be minimum heap size and maximum heap size in my case?
Mike Brunt

Mike Brunt wrote on 11/09/09 10:43 PM

@Sameer, is this a 32-bit or 64-bit system?
Matthew Lesko

Matthew Lesko wrote on 11/10/09 6:18 AM

What was the caching issue? Sounds like OutOfMemory errors from your post, but I thought eh-cache could be configured to constrain memory consumption. Granted this would mean more cache misses, but I'm curious about the details.
Mike Brunt

Mike Brunt wrote on 11/10/09 5:22 PM

@Matthew thank for taking the time to comment, the root of the issue was running out of memory in the JVM and we made things better by running verbose garbage collection logging and tuning the overall memory arguments based on the results obtained. You make a good point re constraints and then we run into the caching becoming less useful. Our concerns are that ehcache runs in the same heap space as ColdFusion and in 32-bit systems we are limited to no more than 1.4GB total heap size, perhaps 1.4GB in some circumstances.
iwan

iwan wrote on 02/23/10 12:36 PM

I thought eh-cache could be configured to constrain memory consumption. Granted this would mean more cache misses, but I'm curious about the details.

Write your comment



(it will not be displayed)



Leave this field empty: