

Linux Performance Measurements using vmstat - simonreed
http://www.thomas-krenn.com/en/wiki/Linux_Performance_Measurements_using_vmstat

======
zurn
It would be high time for some capable & easy to use IO instrumentation in
Linux. This (vmstat) has been the state of the art for ~ 20 years and you
often long for something better. Not to mention it's pretty inaccurate
sometimes - reports these huge bursts of IO between periods of idleness even
though the disk is munching constantly. Especially with write loads.

My ideal tool would let me switch a knob to turn on io profiling and then
would let me drill down into the trace, show what processes caused the io, was
the io like (contiguous vs seek heavy, fsyncs, etc). A second need is report
what kind of io a process incurred during its runtime, a bit like "time".

I guess much like "perf" now but for io.

For all I know all the kernel pieces are there already. We do have some newer
tools like iotop/iostat that are small steps forward. But it's pretty quiet.

~~~
dibbsonline
What about sysstat that provides sar (and iostat). I have this logging every
minute in some environments and I can look back and find the root cause of
performance issues over multiple devices and networks. kSar can graph this
quickly.

vmstat is essential in it's own way, the run queue is critical in threaded
environments like weblogic with osb/soa where a default install on a 2 vCPU
instance won't perform.

Also; dtrace for linux and osx.

~~~
mprovost
If you're still using sar have a look at atop instead. It's great, it's like
top crossed with Time Machine, you can log your system's performance like sar
but then look at it like top and rewind until you find the performance
problem.

------
plq
Also have a look at "dstat - versatile tool for generating system resource
statistics".

It uses colors, so it's a bit easier to interpret at first sight.

It's a simple "emerge dstat" away in Gentoo.

------
babuskov
Nice. I would just add one comment. vmstat is very useful if you run VPS. It
can be used to easily detect when your hosting provider is overselling the
hardware and other users are killing the I/O (which happens to be the biggest
bottleneck in VPS as CPU and RAM can be easily shared and sliced)

------
mprovost
I spent years typing vmstat into Solaris machines after reading Cockroft's
"Sun Performance and Tuning" book. You would think there would be something
better these days, Solaris at least moved on to dtrace. Now I use atop on
Linux which isn't as low level as dtrace but is much nicer than vmstat.

------
NatW
On a mac, you can try: vm_stat (with an underscore)

[https://developer.apple.com/library/mac/documentation/Darwin...](https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/vm_stat.1.html)

