Home


1.4.7 Bottleneck

A bottleneck is a restriction or choke point in the system. All sites have bottlenecks of one form or another. Bottlenecks impede the performance of your site and can be caused by many things. Bottlenecks are often associated with:

Multi-threaded and multi-user programs

Shared resources such as a CPU, a pooled resource, or disk I/O

Indiscriminate use of thread synchronization

A badly tuned JVM heap

Poor network configuration

Poorly tuned databases, missing indexes

Insufficient use of caching

The rule of thumb, adopted by most experienced performance practitioners, is to resolve bottlenecks in descending order of their severity. The performance mantra is that your system is a fast as your slowest component. Removing the worst blockages first yields the biggest performance benefits. It is not uncommon for the removal of one blockage to eradicate other bottlenecks entirely, simply because they were really only symptomatic of the larger bottleneck.

It is important to identify bottlenecks and resolve them, rather than building more slack into the system to cope with the effects of the bottlenecks. The slack will hide the problem for a while before it remanifests itself, perhaps more seriously.

A simple analogy of a bottleneck is a sink filling up with water. It is self evident that the plug covering the drain hole is the cause of rising water levels in a sink. Building a bigger sink will not solve this problem, yet that is what some performance novices initially attempt. They will notice that the system is running out of some resource and will react by increasing the resources' pool settings hoping that the problem with go away. As in the sink analogy, all that does is delay the inevitable, that is, we cause a larger queue of waiting requests to form, which then exacerbates the performance issue further. Finding and removing the true cause of the bottleneck is the only way forward. Then target the next biggest remaining bottleneck and apply trade-offs as to how much effort versus potential improvement gains when deciding whether to continue working on the next bottleneck or to stop the process.

In WebSphere Commerce the biggest bottleneck is almost always the database. Therefore, tuning the database and caching results can be critical factors in the success of your Commerce applications.

Figure 1-12 Bottleneck caused by performance of the database

Figure 1-13 Bottleneck caused by insufficient database connection pool size

In summary:

Almost every system you encounter has bottlenecks

Eliminating every bottleneck is usually not feasible

Not every bottleneck has the same performance impact

Eliminate bottlenecks according to severity

The removal of significant bottlenecks is your primary activity in performance analysis.

+

Search Tips   |   Advanced Search