Sep 27th, 2022

The Right Approach to Software Performance Engineering

Author - Seth Narayanan
Sep 27th, 2022

The Right Approach to Software Performance Engineering

These days performance is a crucial part of the user experience. Applications are complex and must often support thousands of requests simultaneously. It’s critical that an application can scale securely while still providing an exceptional user experience.

In order to keep up with the performance demands made on modern-day applications, many organizations are adopting a performance engineering approach to software development.

Performance Engineering vs Performance Testing

While performance testing is part of software performance engineering,performance engineering and performance testing are not the same.

Performance testing refers to the process of determining the speed, scale, load capacity, and stability of an existing application. Traditionally, performance testing is done at the end of the build process, by QA engineers whose only job is to run tests and file bug reports.

Performance engineering, on the other hand, is a mindset that emphasizes the importance of application performance from the very beginning of the build process. Performance engineering isn’t just something for engineers to think about: designers and product managers also need to be aware of potential performance issues and work with engineers to design high performing applications.

A well articulated performance engineering strategy moves the burden of performance testing from the very end of the development cycle and makes it part of each step of the development process.

Techniques for Performance Engineering

There are four ways that teams can begin to incorporate techniques of performance engineering into their development cycles.

Establish Performance Goals

This is the most important step in a performance engineering plan and one that many teams overlook. Setting realistic expectations for performance allows engineers to write code with performance and performance testing in mind. It requires some more work up front but pays dividends down the line when engineers can quickly run existing test suites against new code.

The good news about setting performance objectives is that performance metrics are easily quantifiable and easy to measure. The most important thing to keep in mind when establishing goals is the size of your app and the number of requests you expect to receive. As the user base grows, performance goals should be re-evaluated and updated.

Assess Performance Risks

What are the possible performance issues that could arise, and how would they affect your users’ experiences? Some performance issues are severe enough to damage a company’s reputation or even lead to business failure. Others might be something that you’re willing to live with if it means getting a product into users’ hands faster.

It’s important to outline all the possible performance issues, along with the probability that they will occur, and the damage that they might cause.

Automate Performance Testing

In a performance engineering approach to development, performance testing becomes important at every step of the build cycle. Doing all of this testing by hand is a massive time commitment. Not only that, testing by hand is error-prone.

Make automated test suites a required part of your development process. Consider the potential scenarios that might cause performance issues and write tests for them.

Add new performance tests often and run them for every significant code contribution—be it a new feature or a bug fix.

Monitor Performance Metrics

Continue to monitor metrics in production with built-in instrumentation if possible. Metrics will give you an understanding of how your application performs or degrades under certain workloads. They will also help you to identify weak spots in your architecture.

Some of the key metrics to monitor for performance include uptime, average response time, peak response time, error rates, and requests per second. By mapping these metrics to known bottlenecks you can get a holistic picture of how your application performs under load.

It’s no longer enough for engineers to consider performance as an afterthought. Performance must be built in at the design level. In some cases, this might require a massive shift in how an organization approaches software development