Performance - Perf (Analysis|Management|Tuning) - bottlenecks identification

> Perfcounter (Performance Metrics) - (Operational|Machine) data > Performance

1 - About

Performance analysis (aka Performance Management) aims to continuously:

  • evaluate a server to determine whether or not it can deliver the level of performance that's required (the ability to handle a certain load of concurrent users).
  • find performance bottlenecks,
  • eliminate them (tuning the system)
Advertising

3 - Method

3.1 - Simple

Just use this simple heuristic:

  • if it's slow and the computer goes WOOOOOOOOSH, the bottleneck is the CPU;
  • if it's slow and the mouse stop moving, the bottleneck is the memory.

3.2 - Others

4 - Bottlenecks

A computer system is a series of bottlenecks in motion. In order to achieve high levels of performance, you have to be able to identify and resolve bottlenecks—which are not isolated, but are inter-related and constantly shifting.

There are numerous elements to consider when dealing with performance, you can divide these elements into the following categories:

  • The performance of the resource: the hardware and the network
  • The consumers of this resource: the applications, the database, … and the operating system (as manifested through the processor, memory, and disks)

The goal of performance tuning is to optimize performance by eliminating performance bottlenecks. The first step in performance tuning is to identify performance bottlenecks. The strategy is to identify a performance bottleneck, eliminate it, and then identify the next performance bottleneck until you are satisfied with the performance.

Because there are so many variables, monitoring and tuning performance isn't as easy as defining it.

Advertising

5 - Performance

5.1 - Issues

The two Primary Issues that you meet are:

A majority of all system and application performance issues result from limitations in throughput.

If the testers check only for throughput, the concurrency issue can not be discover until the application is in production.

5.2 - Analysis and Capacity Planning

Performance management is closed linked to capacity planning. The difference is that:

  • performance management involves tuning the current system so that it can perform better, thereby enabling it to support more users.
  • Capacity planning, on the other hand, focuses on how many users a site can support and how to scale the site so it can support more users.

5.3 - Perspective

While confronting the myriad of elements that make up a production system, you also have to balance the goals and priorities of two viewpoints—that of the user and that of the administrator. Although it often seems like users and administrators have conflicting views, both want the same things from a system.

They want:

  • the system to provide good performance,
  • the applications to work,
  • the site to be up all the time.

It's really a matter of perspective; users and administrators simply have slightly different ways of viewing system goals and interpreting performance.

Advertising

5.3.1 - User

For most users, performance equates to speed—the perceived response time of the system they're using. When they activate a hyperlink and the requested page is retrieved and displayed quickly—typically in less than 10 seconds—their perception of performance is favorable. (It's interesting to note that it's not uncommon for a user to think that a page takes longer to retrieve and display than it actually does.)

From a user's perspective, the definition of performance and the primary goal of performance tuning is the same—make it fast. This speed-based viewpoint encompasses the following:

  • Initialization
  • Shut down
  • Page retrieval and rendering
  • Reasonable time-outs

5.3.2 - Administrator

From an administrator's viewpoint, performance is a measure of how system resources are utilized by all the running programs. The scope of resource usage ranges from the lowest level program (drivers, for example) up to and including the applications that are hosted on a server.

In terms of performance tuning:

  • the administrator's primary goal is to make the system satisfy client requests quickly and without errors or interrupts.
  • His secondary tuning goals are:
    • Conserving bandwidth
    • Conserving CPU resources and RAM utilization

An indirect goal is eliminating or reducing Help Desk calls, a goal that is usually achieved by meeting the direct goals.

Unlike the user, who deals primarily with perception, the administrator can quantify resource utilization through:

  • the collection,
  • the observation (monitoring),
  • and analysis of performance data.

You can use performance data to:

  • Observe changes and trends in resource usage and workload distribution.
  • Quantify the relationship between the workload and its effect on system resources.
  • Test configuration changes or tuning efforts by monitoring the results.

Regardless of the perspective you take, you have to approach tuning systematically and employ a methodology for implementing and testing system configuration changes.

5.3.3 - Business perspective

The business perspective also plays a significant role in performance management. In this context, someone has to do determine how much hardware is required, how to make provisions for peak loads, how to balance out spikes with low overall load, and how to determine or satisfy service-level agreements.

It's often necessary to make price and performance trade-offs—it may be too expensive to have enough servers for maintaining low processor utilization at all times, so low average utilization with spikes becomes acceptable.

6 - During testing

6.1 - Responses

  • Check the size of the response data after processing queries. If only a few hundred bytes are returned for a large result set, it is a sign that an error message was returned instead of data.
  • For each transaction, ensure there are no error messages in the response data.
  • Look for exceptions and stack traces in the data returned from the server.
  • Receiving lots of binary data from the server is a good thing. Error messages come back in clear text.

6.2 - Application logs

Ensure there are no errors in the application logs

7 - Documentation / Reference

counter/performance/analysis.txt · Last modified: 2019/09/15 09:30 by gerardnico