Home>Tuning the JVM for Performance

Tuning the JVM for Performance

ColdFusion has been Java-powered since version 6. Performance tuning is an ongoing process and should be integrated into your maintenance strategy.

Java Virtual Machine: The Beating Heart of ColdFusion

The JVM is a multi-threaded environment where memory is segmented into Generations:

  • Young Generation
  • Old Generation
  • Permanent Generation

Garbage Collection Process

Objects are created in Eden Space and move between Eden and Survivor spaces. The Garbage Collector monitors and releases unused objects. Objects that are not collected move to the Old Generation.

Configuring the JVM

The JVM configuration file is located in {cf_root}/runtime/bin/jvm.config. Modify the java.args line carefully.

Garbage Collector Options

  • Serial Garbage Collector
  • Parallel Garbage Collector (default)
  • Concurrent Mark Sweep (CMS) Collector
  • G1 Garbage Collector

Tuning Recommendations

  • Keep free heap at least 30%
  • Set max heap size to 43% more than max application occupancy
  • Avoid heap reaching 70% capacity

Step-by-Step Tuning Process

  1. Enable GC Logging
  2. Analyze GC Log File
  3. Use tools like GcViewer for analysis

Conclusion

JVM tuning is critical for application performance and requires ongoing testing and adjustment. It is part of a broader performance optimization strategy.

Additional Help

Stuck? Convective can help with JVM tuning and ColdFusion performance optimization. We've been doing it for over 20 years.

Find out more