How would you interpret the following vmstat output?
Consider the following five machines (named c, h, j, s and u) and their respective vmstat 1
outputs.
Given the information from the vmstat output:
- Which machines would you consider being in a good shape? Why? What's your reasoning?
- Which machines would you consider being in a bad shape? Why? What's your reasoning? How would you go about fixing it? Upgrade memory, CPU, IO-subsystems or something else?
I'm trying to learn how to get an intuitive feel for interpreting vmstat output.
Machine c:
# vmstat 1
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
r b swpd free buff cache si so bi bo in cs us sy id wa st
1 0 4 9456 10692 304020 0 0 193 92 310 131 7 1 80 11 2
2 0 4 10212 10676 303020 0 0 412 40 1265 514 11 0 80 8 2
1 1 4 9664 10684 303328 0 0 320 60 1311 545 7 0 84 7 2
Machine h:
# vmstat 1
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
r b swpd free buff cache si so bi bo in cs us sy id wa st
0 2 892948 10084 11352 140248 14 9 67 113 123 184 1 0 81 13 4
1 1 892948 9828 11360 140420 80 0 232 56 1436 839 1 0 74 24 2
0 1 892948 9424 11368 140596 88 0 192 780 1405 564 1 0 74 23 2
Machine j:
# vmstat 1
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
r b swpd free buff cache si so bi bo in cs us sy id wa st
0 2 300 152276 7432 616948 0 3 922 795 38 29 8 1 65 25 0
0 0 300 152096 7436 617136 0 0 184 0 243 421 2 1 77 20 0
0 0 300 152096 7436 617136 0 0 0 28 160 285 0 0 100 0 0
Machine s:
# vmstat 1
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
r b swpd free buff cache si so bi bo in cs us sy id wa st
0 0 57748 213168 17672 1282888 0 0 23 6 0 0 11 1 79 9 0
0 0 57748 213224 17676 1282900 0 0 24 0 33 503 1 0 98 1 0
0 0 57748 213224 17676 1282900 0 0 0 0 7 254 0 0 100 0 0
Machine u:
# vmstat 1
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
r b swpd free buff cache si so bi bo in cs us sy id wa st
0 3 452708 8860 2724 266032 34 16 248 244 5 15 5 3 72 19 1
0 2 452708 62240 2776 211880 292 0 1952 0 625 749 9 2 70 18 1
1 1 452708 63752 2832 212320 228 0 816 0 745 821 4 0 67 28 1
Too short periods. It would be better to have vmstat 60. Well, nevertheless:
- c - is OK.
- h - has something in si/so. Taking into account the large swpd, if you find the performance less than acceptable, add 521-1024 MB more RAM (892948 kB ideally).
- j - is OK.
- s - is OK. A little bit swpd, but no si/so.
- u - has quite a lot si/so. Taking into account the large swpd, you probably find the performance less than acceptable, and you should add 512 MB of RAM (452708 kB ideally).
None of your system needs more CPU.
Take a look at the vmstat man page I'd say u, s, h would benifit from more RAM assigned, high swap usage.