- Adopt a Preventative-Maintenance Attitude
- Keep your Java Virtual Machine snappy
- Take Care of The Garbage Man
- Level-up your ColdFusion Web Server Connector
A CIO’s work involves maintaining two “machines” — the ragtag bunch of humans that make up the IT department, and the silicon and metal devices they use to ply their trade. The two machines collide at servers and applications. This often becomes a mirror of the marriage between man and devices at your company.
Often, the symptoms of a problem in either the human or electronic machine will show up in your servers and applications.
Which is why they’re so often the source of headaches for companies and CIOs. A slow, unstable app may be a sign of a developer missing regular maintenance duties. Or perhaps a server needs to be performance-tuned.
What can be done? There are four steps to optimize your server and application:
Adopt a Preventative-Maintenance Attitude.
Keep Your JVM Snappy.
Take Care of The Garbage Man.
Level-Up Your Web Server Connector.
Let’s figure out how to best optimize the machines for your ColdFusion server.
Adopt a Preventative-Maintenance Attitude
Every major IT department goof starts the same: with a forehead slap, typically administered on your own. Because let’s be honest… your app’s flaws and poor performance reflect your own.
But don’t beat yourself up!
The best way to optimize your app and server is to identify what caused its slow performance in the first place, and then set up mechanisms to intervene before the drop in performance becomes unavoidable. How?
Schedule maintenance and configuration work with your team at regular intervals. Keep them sacred in your calendar.
The team (or you) may see this as a bit of drudgery. But don’t. I’ve always considered the tinkering and prodding involved in maintenance as a hidden blessing. Getting a look at your system’s load and garbage collection capacities gives you a chance to see progress — in the form of looming trouble.
Because let’s be honest: the need to optimize your server and application comes from increased use. It’s a good thing!
Soon you’ll realize upgrading and expanding capacity is a sign of success (but make sure you fix system configurations with every expansion).
This may seem obvious, but it is worth a reminder. The same way every car has to see a mechanic even though nothing is wrong, the hardware that makes up your company’s IT department needs an occasional checkup too. Hard drives, for example, fail at a predictable rate. Making changes as devices approach the end of their life cycle stops problems from ever arising (and it keeps legacy code at bay).
Use Server Monitoring Tools
Seeking reports and running diagnostics manually can be a pain. Thankfully, there are many third-party tools that can help monitor your system and predict any future problems. Tools like FusionReactor’s Application Performance Monitor (APM) can help focus your attention and predict where problems may arise, or what minor tweaks can improve performance.
The odd thing about coding: sometimes poorly written code can run almost any clean, efficient code. There’s very little to differentiate the two, especially for users. Aside from the obvious symptoms of poor coding or bugs, there are now testing tools that help diagnose and solve many common problems.
Check out our primer on testing to get a better understanding of how to test apps.
Protect Your Property
Security should be a top priority in every tweak and change your company makes with its code. Be sure your ColdFusion has been updated to include the latest patches and add a second layer of protection from a third-party such as Foundeo. Just to be safe.
Keep your Java Virtual Machine snappy
Your Java Virtual Machine is the heart of your ColdFusion app, shifting objects necessary for your application’s running, and discarding the unnecessary bits. It is the heart and soul of your entire CF experience.
Over time, repeated tasks can leave behind a virtual residue, which will gum up the works and cause your JVM to slow.
You can fix this by:
Running a clean-up tool that locates leftover processes, such as ColdFusion’s performance monitoring tools or FusionReactor’s APM.
Manually inspecting the code, shutting portions of the code on and off to locate any potential leaks.
If done properly, the care and time you put into fixing your JVM will pay dividends in your app’s performance.
Take Care of The Garbage Man
Perhaps one of the most overlooked assets in your optimization arsenal is tweaking ColdFusion’s garbage collection.
CF guru and my good friend Mike Brunt has done a great job explaining how to read the proverbial tea leaves in your app's garbage collection habits. A lot of ColdFusion snafus and poor designs are revealed at the garbage collection level.
This tool runs in the background, cleaning up the extraneous leftovers from past processes. But it sucks up precious resources.
Too-frequent garbage collection can make your CF app seem slower than it needs to be. Fine-tuning it will help optimize your app and/or server.
“The math is simplistic, the more objects the more memory is needed, the longer they hang around, the more memory is needed,” Brunt writes on his blog.
ColdFusion comes with four collector options. Be sure to select the correct garbage collection mode and frequency, to find the sweet spot between clutter elimination and efficiency.
Level-up your ColdFusion Web Server Connector
Consider this the “turn off the modem and then turn it back on” of the development world.
CF 2018 offers a Performance Monitoring Toolkit which helps tune your connector. Use its connector auto tuner function often.
Server and application optimizations can fix the bulk of developer and IT-related issues at most companies. Getting both sorted and performing consistently is a key to any CIO’s job. By emphasizing scheduled maintenance, regular analysis, and occasional reconfiguration, a ColdFusion server and application can work under maximum loads without killing productivity.
You’re in control of your CF server and App
There’s an overwhelming sense of helplessness in many tech workers, especially novices and noobs. That notion of a server or application going “wonky” and behaving completely out of whack of its own accord.
Well, no! You and your team have total control. Make sure they know it!
The nuts-and-bolts machines that make up our IT lives are slaves to your commands. Their “wonkiness” may be a sign of your own. Or your teams’.
Usually, this incorrect sense of helplessness boils down to inherited problems, a lack of communication or the general disarray that comes from having too many pots cooking at once. It sometimes helps to stop and take a moment to reassess the current “state of play”.
I’ve often found taking a moment to cool my head and remember the broader plan helps when I want to optimize both the CF servers and the apps, then keep them running at peak performance.
And it all starts with keeping disasters at a minimum.
Michaela Light is the host of the CF Alive Podcast and has interviewed more than 100 ColdFusion experts. In each interview, she asks "What Would It Take to make CF more alive this year?" The answers still inspire her to continue to write and interview new speakers.
Michaela has been programming in ColdFusion for more than 20 years. She founded TeraTech in 1989. The company specializes in ColdFusion application development, security and optimization. She has also founded the CFUnited Conference and runs the annual State of the CF Union Survey.
And to continue learning how to make your ColdFusion apps more modern and alive, I encourage you to download our free ColdFusion Alive Best Practices Checklist.
Because… perhaps you are responsible for a mission-critical or revenue-generating CF application that you don’t trust 100%, where implementing new features is a painful ad-hoc process with slow turnaround even for simple requests.
What if you have no contingency plan for a sudden developer departure or a server outage? Perhaps every time a new freelancer works on your site, something breaks. Or your application availability, security, and reliability are poor.
And if you are depending on ColdFusion for your job, then you can’t afford to let your CF development methods die on the vine.
You’re making a high-stakes bet that everything is going to be OK using the same old app creation ways in that one language — forever.
All it would take is for your fellow CF developer to quit or for your CIO to decide to leave the (falsely) perceived sinking ship of CFML and you could lose everything—your project, your hard-won CF skills, and possibly even your job.
Luckily, there are a number of simple, logical steps you can take now to protect yourself from these obvious risks.
No Brainer ColdFusion Best Practices to Ensure You Thrive No Matter What Happens Next
Modern ColdFusion development best practices that reduce stress, inefficiency, project lifecycle costs while simultaneously increasing project velocity and innovation.
√ Easily create a consistent server architecture across development, testing, and production
√ A modern test environment to prevent bugs from spreading
√ Automated continuous integration tools that work well with CF
√ A portable development environment baked into your codebase… for free!
Learn about these and many more strategies in our free ColdFusion Alive Best Practices Checklist.