Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Oct 2017 14:57:28 -0700 (PDT)
From:      Don Lewis <truckman@FreeBSD.org>
To:        mwlucas@michaelwlucas.com
Cc:        hackers@freebsd.org
Subject:   Re: vmstat's w column
Message-ID:  <201710032157.v93LvSjD040775@gw.catspoiler.org>
In-Reply-To: <20171003202150.GA42540@mail.michaelwlucas.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On  3 Oct, Michael W. Lucas wrote:
> Hi,
> 
> (This query brought to you courtesy of tech reviews on my new freeBSD
> book.)
> 
> On my -current box, vmstat(8) says:
> 
>      procs   Information about the numbers of processes in various states.
> 
>              r       in run queue
>              b       blocked for resources (i/o, paging, etc.)
>              w       runnable or short sleeper (< 20 secs) but swapped
> 
> I've had a couple people report to me that they have w entries even
> when only a few kilobytes are swapped out.
> 
> Is the man page wrong? Or should I tell them to report that output as
> a bug?

I don't know about the runnable or short sleeper bit.  On currently idle
package build box vmstat currently reports 15 processes in the w column.
If I look at the output of ps, there are 15 processes with a state of
either IW or TW, all of which have a RSS of zero.  These have probably
all been idle since before the end of the last poudriere run, which is a
very heavy swap user.  There are no processes in an RW or SW state.  It
looks like vmstat is reporting all swapped processes, so the man page
and implementation appear to be out of sync, at least on recent
12.0-CURRENT.  My other two currently running FreeBSD boxes don't have
any swapped processes reported by either ps or vmstat.





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