• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 5. Principles and Patterns > Principles of Performance Tuning

5.1. Principles of Performance Tuning

5.1.1. Sometimes You Lose

You don't know whether or not you can improve the performance of a system until you study it, but you risk wasting your time just figuring out that there's nothing you can do, particularly when you are under tight budget or time constraints. You have to weigh the probable difficulty of the analysis against the potential gains. If the gains could be very large, it is a good bet to try to improve performance, but otherwise it's not worth your time.

5.1.2. To Measure Something Is to Change It

The physicist Werner Heisenberg pointed out that measuring anything changes it, if only slightly, so there is some uncertainty to all measurements caused by the act of measuring. This is called the uncertainty principle, and is certainly true when measuring computer performance. The classic example is running ps -aux to see what processes are running on your server, and noticing that the only thing you ever see in the run state is ps itself. This must be so because ps has to be the running process in order to check which process is currently running. Similarly, when you take performance measurements on a machine doing some work, you are necessarily measuring not only the load of the work, but also the load caused by measurement. Do not let this lead to disturbing recursive thoughts. The uncertainty is negligible if the measurement itself was small and quick. So keep your measurements small and quick.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint