My favorite Linux tool in DB work is ‘iostat -x’ (and I really really want to see whenever I’m doing any kind of performance analysis), yet I had to learn its limitations and properties. For example, I took 1s snapshot from a slightly overloaded 16-disk database box:
avg-cpu: %user %nice %system %iowait %steal %idle
8.12 0.00 2.57 21.65 0.00 67.66
Device: rrqm/s wrqm/s r/s w/s rsec/s wsec/s \
sda 7684.00 19.00 2420.00 498.00 81848.00 5287.00 \
avgrq-sz avgqu-sz await svctm %util
29.86 32.99 11.17 0.34 100.00
I pasted this somewhere on IRC, and got “doesn’t look too healthy” and that it is disk-bound. Now, to understand if it really is, one has to understand what iostat tells here.
First line of numbers shows that we’ve got plenty of CPU resources (thats because nowadays it is quite difficult to get a box with not enough CPU power, …
[Read more]