4 Focus Areas for the Best ColdFusion Server Optimization

In this article, you will learn:

  1. How to configure the JVM
  2. How to tune the Garbage Collector
  3. Various steps to take for Performance Tuning
  4. How to improve your Web Server Connector

Six key areas CIOs must master

Perhaps one of the most enduring goals for you is optimal server uptime and performance. It is a daily challenge that needs to be addressed to make sure that your servers and applications run smoothly every time. There are six key focus areas every CIO should embrace in order to meet this goal.

  1. The easy way is to run an automated detection tool such as CF Server monitor to help locate rogue memory processes. The server monitor is great for Enterprise Editions users. But what about Standard users? FusionReactor and its associated plugins can be a viable option.
  2. Then you have the hard way. If you are experiencing heavy memory leak without any indication from automation, you will have to manually inspect the code. This process requires you to manually enable and disable portions of code at a time. When doing this, you need to observe and take note of your memory usage rates. These rises and drops can give you clues as to where your memory leak may be hiding.

Tuning the Garbage Collector

One of the easiest places to begin your optimization and tuning is with the Garbage Collector . It may be as simple as switching between one of four different GC options.

  • Serial Garbage Collector
  • Parallel Garbage Collector
  • Concurrent Mark Sweep (CMS) Garbage Collector
  • G1 Garbage Collector
-XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=3 -XX:GCLogFileSize=10240k -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintHeapAtGC -verbose:gc -Xloggc:convectiveGC.log

Tuning the Tenured Generation

is a wonderful tool that you can also use to analyze your CF projects. It can give you a proper readout on your major and minor collections. Major collections take more time than minor collections which can lead to slow and even crashing servers. Reducing the amount of major collections will increase your throughput. Here are two techniques you can use in order to maximize performance.

  • Increase Xmx
  • Increase Xms

Tuning the Younger Generation

When it comes to performance, the tenured generation takes a much heavier toll than the young generation. However, for peak performance, both generations can be tuned for optimum output.

  • -Xmn
  • SurvivorRatio
  • TargetSurvivorRatio

Tuning with UseParallelOldGC

Prior to Java SE6, young generation collection was done in parallel while major collections (from the Tenured generation) was single thread. Now, with Java SE6, you can perform major collections in parallel. It may actually improve your particular performance by reverting back to the old settings. Enable the feature by adding the option: -XX:+UseParallelOldGC

Tuning with MaxPermSize

The permanent generation is used to store class objects and method objects. For applications using lots of classes, increasing the size of the permanent generation would help throughput enormously.

Tuning with -XX: New Ratio

The new ratio parameter is the ratio of the size of the tenured generation to that of the young. By profiling your application, you can adjust this value accordingly. This will improve performance output.

Improve Web Server Connector

Proper connection and connector tuning is a pivotal part of preparing your CF servers for deployment. With the advent of ColdFusion 2018 came the Performance Monitoring Toolkit (PMT) . The PMT makes it 100% easier when it comes to tuning your connector. Within the PMT lies the connector auto tuner function. Real time traffic and load data on the connector will be tracked and displayed. Administrators and developers can now log in and visualize the load on a time series chart for an individual connector.

The Bottom Line on Server Optimization and Performance

Remember, maintaining server optimization and performance is not a one and done. This takes constant monitoring and preventative maintenance to keep running at peak performance. Take advantage of monitoring and tuning tools to make sure you understand what your problem is and how to fix it.

Join the CF Alive revolution

Discover how we can all make CF more alive, modern and secure this year. Join other ColdFusion developers and managers in the CF Alive Inner Circle today.

  • Get early access to the CF Alive book and videos
  • Be part of a new movement for improving CF’s perception in the world.
  • Contribute to the CF Alive revolution
  • Connect with other CF developers and managers
  • There is no cost to membership.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Michaela Light

Michaela Light


ColdFusion development, security and optimization. CEO at TeraTech. Host of CF Alive podcast.