Last active
December 12, 2015 08:29
-
-
Save jsl/4744858 to your computer and use it in GitHub Desktop.
vmstat example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vmstat is a helpful tool for figuring out performance problems on servers. | |
user@server-prod-db01:~$ vmstat 5 | |
procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu---- | |
r b swpd free buff cache si so bi bo in cs us sy id wa | |
1 0 10860 51884 41656 3712392 0 0 1297 107 0 0 10 3 84 3 | |
0 0 10860 50388 41668 3713204 0 0 41 446 1409 1173 6 2 91 1 | |
The "b" column shows blocked processes waiting for IO. In this case it's 0, which is a good thing. | |
"si" and "so" show blocks into and out of swap, again this looks good since both are 0 and we | |
don't want any swap activity on the db server. Other things to look for are high "cs" counts | |
(context switches) or lots of input/output activity which can cause the system to be slow. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Previously this system frequently had positive numbers in "b" (blocked processes), and database tuning fixed this issue. Specifically, we tuned several postgres memory settings and added indexes.