Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Apr 2003 07:13:59 +1000
From:      Peter Jeremy <peterjeremy@optushome.com.au>
To:        Terry Lambert <tlambert2@mindspring.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Solaris 2.x compat. system accounting, sarcheck for fbsd(commercial)
Message-ID:  <20030411211359.GC31752@cirb503493.alcatel.com.au>
In-Reply-To: <3E96E5AE.548EBC6@mindspring.com>
References:  <20030411060823.GA27575@titan.klemm.apsfilter.org> <20030411080102.GC47320@cirb503493.alcatel.com.au> <3E96E5AE.548EBC6@mindspring.com>

next in thread | previous in thread | raw e-mail | index | archive | help
["Wait for I/O" state]

On Fri, Apr 11, 2003 at 08:56:30AM -0700, Terry Lambert wrote:
>The intent is to say "I would be running some process X, but I'm
>idle because I'm waiting for I/O".

Virtually every non-running Unix process is waiting for some sort of
I/O - be it an incoming network connection or a keypress.  It
therefore makes more sense to restrict this state to mean that a
process is either involuntarily waiting (eg a page fault has occurred)
or it's waiting on filesystem I/O (since there's no way for a process
to determine whether a particular I/O request to a file will cause
the process to block).  AFAIK, SysV accumulates "wait for I/O" when
it is unable to schedule any process and at least one process is
in this "involuntarily blocked" state.

>Part of the problem in reporting this in FreeBSD is the inability
>to attribute pending I/O requests e.g. as the result of a fault
>by a process or as a result of a fault by the kernel itself.

I'm not sure that this matters.  In either case, the process does
not want to block.  If it is blocked then it represents a situation
which the system administrator may be able to mitigate (throw more
hardware at the problem or alter file distribution across available
spindles).

If your system is doing a CVSup or buildworld then any idle time is
wait for I/O.  In a webserver or database server (for example),
FreeBSD doesn't have any way to differentiate between CPU idle because
there are no outstanding requests and CPU idle because all of the
outstanding requests are blocked waiting for file I/O.

Peter



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030411211359.GC31752>