Application performance tuning tips and tricks
Tune hardware, resource allocations and prioritizations to make applications perform their best. Just don't do it without tracking the results.
A slow application is a challenge for IT operations teams, as the problem generally comes with about as much background information as a warning light on a car dashboard that just says Service.
Application performance tuning covers a wide range of possible options. You might hear calls to fix the code, but often, the issue slowing down an application isn't as deep as faults in the source code. Similarly, routine server and application maintenance -- clean up the application install points and remove old logs and temporary files -- helps but won't correct larger issues. Application performance tuning comes down to the things that surround the application and matching the right IT resources to a given application.
Not all applications run the same on the same hardware, virtual or physical. It's a myth that slow applications simply need more resources. In fact, too liberal resource allocation can do damage to the overall environment, causing unnecessary contention. For example, a single-threaded application won't run faster with multiple CPUs, no matter how many it gets, and other workloads in the virtual environment might end up starved for processing power. Overallocation is similar to overeating -- not good for your health -- and it's expensive and time-consuming as well. Sometimes, more expenditures are worth it: Choices such as network bandwidth or storage tiers are much deeper than just a cost question if the application fails to function properly due to constraints.
Performance tuning starts with resources
Approach application performance tuning through the idea of proper-sizing resources. Proper-sizing also sets applications up well for a move to the cloud, where the organization pays for however many resources the application consumes monthly, rather than in cyclical data center capacity refreshes.
To properly size and scale a deployment, start with the application requirements as a guideline -- but don't treat them as laws. Every application designer has optimal settings for the application's resources. Optimal might cover only the top of the range of acceptable application performance, however. And IT teams should query what the optimal resources are for the expected user base: 100 or 10,000? Balance the app designer's settings with the available environment, and use this information as a starting point for reliability and performance from day one.
To start application performance tuning, dig into the resource usage profile. Does the application have a highly transaction-driven process or a more intense lookup process? The answer can quickly shift attention from a CPU-driven process to a memory-driven one. In virtual environments, set priority for CPU usage for high transactional loads and memory reservations for intense lookups. Use the same types of settings with both networking and I/O traffic priorities.
We often focus on restrictions and limitation in virtualized resources, but setting priority on workloads can be just as critical to the overall operations of the application. The actual delivery of the application from a VM, container or cloud resource must be configured correctly and tuned in each case, so take a narrow case-by-case approach rather than one for the whole IT deployment overall.
In cloud, sky's the limit
Cloud resources are essentially infinite, so resource availability is not a challenge for application performance. However, the budget is limited, so strongly consider where and how your company wants to spend its money. Careless resource management wastes money when it occurs on internal IT systems, but when the same problems move to the cloud, the cost is more apparent. When it's in black and white on a bill, you tend to notice skyrocketing consumption quickly.
Relationships between the resources are critical. A change in one affects the others, and one change, in isolation, could fail to help performance. The move from a spinning disk I/O platform to solid-state drive to tune performance in a storage-heavy application might require additional memory for caching before the improvement is noticeable to the user, for example.
Observe the effects of application performance tuning
Let monitoring tools be your guide. As you make a change in the deployment or how it is managed, follow its effect on application response times and resource utilization. Compare the pre- and post-change metrics to see what impact allocation changes and prioritizations have.
Monitoring data also provides insight into what changes to make next. Application performance tuning can move the hotspot or pinch point from one resource type to another.
Ideally, tuning eliminates any possible slow points in application operation -- along with the complaints from users. At this point, apply the acquired performance information to the deployment setup. None of the effort to get the application to work correctly will matter if the changes are not reflected back in the initial deployment stage. Correct the base deployment, and avoid making the same mistakes repeatedly.
Adjust deployment best practices and expected ranges carefully. These changes have wide-reaching effects. If you didn't do enough monitoring and adjustments beforehand, mistakes will propagate across all new deployments.