Helping ordinary people create extraordinary websites!

Eye on performance: Wait leaks

By Jack Shirazi & Kirk Pepperdine
2005-04-28

Gain a Better Understanding of this Curious Race Condition
A fine line runs between performance tuning and debugging. Several particular categories of bugs, including memory errors and thread race conditions, frequently surface during performance tuning, and this month, our performance tuning experts Jack Shirazi and Kirk Pepperdine show how to spot a particular class of race conditions, called wait leaks.

Some types of bugs often fall to the performance tuner to fix, even though they are not, strictly speaking, performance problems. The out-of-memory error, often caused by object leaks, is one such type of bug. (We outlined how to handle those in "Trash talk," an earlier installment of this column available in Resources.) Another type of bug that often falls to performance tuners to remedy is thread deadlock and other threading problems, such as race conditions, because these tend to only show up when the program is tested under load.

These bugs are often handed to performance tuners for good reason: The tools needed to identify and eliminate performance and memory bottlenecks are the same tools that can identify object leaks and race conditions. Deadlocks are relatively easily identified; once you notice that the application is frozen, a stack trace will show you which set of threads have locked the others' monitors. Race conditions, unfortunately, can be more elusive.



Tutorial pages:

First published by IBM developerWorks


 3 Votes

You might also want to check these out:


Leave a Comment on "Eye on performance: Wait leaks"
You must be logged in to post a comment.

Link to This Tutorial Page!


GET OUR NEWSLETTERS