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.
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 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 JVM 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 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.