[LONG] vmstat: What I/O is blocked and how to fix it?

Mark Bucciarelli mark at hubcapconsulting.com
Fri Dec 16 07:00:46 PST 2005

On Tue, Dec 13, 2005 at 03:52:44PM -0500, Mark Bucciarelli wrote:

> On two occasions recently, vmstat has showed me that a 
> number of processes are blocked due to I/O.  At the same 
> time, the number of disk transactions per second reported is 
> a small fraction of the disk's capability.

I did a lot of reading to try and understand what was happening to this 
heavily loaded box.  The most helpful resources I found were posts by 
Andrew Kinney [1][2], Terry Lambert [3][4], and Daniel Lang [5], as well 
as the VM design elements doc written by Mathew Dillon [6].

I figure the kernel did not have enough memory to operate efficiently.  
I set KDA_PAGES = 512 and the new kernel didn't show any blocked 
processes for the spamd-setup test.  :)

A first question: 

    There were notes that the kernel auto-sizes things like memory for 
    files and other things based on the amount of memory available.

    In this context, does "memory available" = RAM + swap?

So now I should monitor things. I think I know how to watch network 
buffers and paging, are there any other stats I should watch?

    - network buffers (netstat -m)

    - vm page pointers 
      (vmstat -z, PV_ENTRY "free" + "used" >= 90% of "limit")

    - anything else?

Any other recommended reading?

Thanks for any pointers.


[1] http://lists.freebsd.org/pipermail/freebsd-hackers/2004-February/005528.html
[2] http://unix.derkeiler.com/Mailing-Lists/FreeBSD/hackers/2003-12/0221.html
[3] http://lists.freebsd.org/pipermail/freebsd-current/2003-June/005691.html
[4] http://unix.derkeiler.com/Mailing-Lists/FreeBSD/hackers/2003-12/0229.html
[5] http://freebsd.hanirc.org/holyboard/holyboard.cgi?db=hackers&mode=view&now=55&no=26202&jd=-1
[6] http://ezine.daemonnews.org/200001/freebsd_vm.html

More information about the freebsd-performance mailing list