150 likes | 398 Views
Maximize the JVM for 64-Bit. cfObjective (ANZ)– November 17-18, 2011 Mike Brunt – CFWhisperer. JVM for 64-Bit. Who am I, what am I and why am I here? I have been using CF since 1996, version 1.54 (dbml) and am still actively developing in CF.
E N D
Maximize the JVM for 64-Bit cfObjective (ANZ)– November 17-18, 2011 Mike Brunt – CFWhisperer
JVM for 64-Bit • Who am I, what am I and why am I here? • I have been using CF since 1996, version 1.54 (dbml) and am still actively developing in CF. • I worked for Allaire-Macromedia as a ColdFusion-Spectra consultant. • Co-founded Webapper (SeeFusion crowd) carried on the Allaire-Macromedia consulting work. • Here to discuss how Java and 64-bit play together =GC’s.
JVM for 64-Bit Living Quarters
JVM for 64-Bit • Full Garbage Collections – Minimize • Sun JVM’s use a generational garbage collector with two young generations and an old generation. New objects are always allocated in the young generation part of the heap. Every time the young generation is full a minor garbage collection takes place. Minor garbage collections don't take very long. • Objects which survived some minor collections, because they are still referenced from the application, are promoted to the older generation. Usually the older generation is full at some point too, and needs to be cleaned. This leads to a major garbage collection or Full Garbage (Full GC) collection that removes garbage from both the old and the younger generations. Full GC’s are “stop-the-world” events and need to occur only when absolutely necessary.
JVM for 64-Bit • With terabyte servers now available from Dell, HP, Oracle and IBM, a single Java application using BigMemory can access 10s of terabytes of in-memory data at microsecond speed. It’s never been easier or more cost-effective to scale up enterprise Java applications.
JVM for 64-Bit What’s Next…Terracotta BigMemory? “In process but off heap.
JVM for 64-Bit • You can find BigMemory here… • http://www.terracotta.org/products/bigmemory • Download a trial copy.
JVM for 64-Bit • Files in the download…
JVM for 64-Bit • Locate current ehcache.jar and rename/archive (make sure CF is not running)
JVM for 64-Bit • Drop the downloaded .jar files in there.
JVM for 64-Bit • Edit ehcache.xml
JVM for 64-Bit • Edit ehcache.xml • Replace the defaultCache settings with this… • <defaultCache • maxElementsInMemory="10000000" • eternal="false" • timeToIdleSeconds="0" • timeToLiveSeconds="86400" • memoryStoreEvictionPolicy="LRU" • overflowToOffHeap="true" • maxMemoryOffHeap="3G" • statistics="true" • />
JVM for 64-Bit • Edit jvm.config file, add this argument… • -XX:MaxDirectMemorySize=2150m
JVM for 64-Bit • Edit jvm.config file, add this argument… • -XX:MaxDirectMemorySize=2150m • Then start ColdFusion hopefully ;)
JVM for 64-Bit Q & A Time Mike Brunt – mbrunt@go2ria.net http://www.cfwhisperer.com (+1)888.511.2821(USA Only) +1.310.933.6384 (Intl.)