Download Zend Enterprise PHP Patterns

Transcript
C HA P TE R 3 N W E B A P P LI C A T I O N P E R F O R M A N C E A N D A N A LY S I S
Determining Whether You Are I/O-Bound
As mentioned when discussing CPU bounding influences, the wa column of the riop]p
output is an important indicator that your server may be held up because it is reading or
writing too much data to disk. However, that figure alone doesn’t tell you the complete
story. To investigate further, you should also make note of the bi and bo columns defined
as follows:
s Blocks In: The number of blocks read during the riop]p poll
s Blocks Out: The number of blocks written during the riop]p poll
A high CPU percentage spent waiting for I/O operations coupled with high blocks in
or blocks out can indicate that your server’s bounding influence is I/O operations.
If you suspect that your system is I/O-bound and if you have the tool available (not
all Linux systems do), the next step is to investigate why you are I/O-bound by looking
at the output of ekop]p. An example output of ekop]p shown in Listing 3-6 includes the
optional -x option for extended statistics.
Listing 3-6. Output from a Call to ekop]p (Truncated)
ekop]p)t-.
Hejqt.*2*-4)5.*ah1$_ajpko)ikj%,/+..+.,,5
]rc)_lq6!qoan!je_a!ouopai!eks]ep!opa]h!e`ha
,*51,*,04*32,*-.,*,,5,*-/
@are_a6nnmi+osnmi+on+os+onoa_+osoa_+o]rcnm)ov]rcmq)ov***
d`],*,04*5.,*01-*,,01*3,35*/142*/1,*,4***
`i),,*,,,*,,,*045*5.01*2435*/1-.*,/.*/0***
`i)-,*,,,*,,,*,,,*,,,*,,,*,,4*,,,*,,***
]rc)_lq6!qoan!je_a!ouopai!eks]ep!opa]h!e`ha
/4*-0,*,,2-*42,*,,,*,,,*,,
@are_a6nnmi+osnmi+on+os+onoa_+osoa_+o]rcnm)ov]rcmq)ov***
d`]/-*52,*,,0-5*15,*,,30104*01,*,,-33*23,*13***
`i),,*,,,*,,01-*11,*,,30104*01,*,,-21*-,,*14***
`i)-,*,,,*,,,*,,,*,,,*,,,*,,,*,,,*,,***
While much more detail could be gleaned from the output of ekop]p, for the purposes
of this book we are interested in understanding the proportion of I/O operations as they
happen across the various devices in the system. For example, if the majority of I/O is
Download at WoWeBook.Com
65