Date: Wed, 4 Oct 2017 05:59:59 -0400 From: "Michael W. Lucas" <mwlucas@michaelwlucas.com> To: Konstantin Belousov <kostikbel@gmail.com> Cc: Don Lewis <truckman@FreeBSD.org>, mwlucas@michaelwlucas.com, hackers@freebsd.org Subject: Re: vmstat's w column Message-ID: <20171004095959.GA50520@mail.michaelwlucas.com> In-Reply-To: <20171004061226.GA95911@kib.kiev.ua> References: <20171003202150.GA42540@mail.michaelwlucas.com> <201710032157.v93LvSjD040775@gw.catspoiler.org> <20171004061226.GA95911@kib.kiev.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Oct 04, 2017 at 09:12:26AM +0300, Konstantin Belousov wrote: > On Tue, Oct 03, 2017 at 02:57:28PM -0700, Don Lewis wrote: > > 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. > > Present definition of 'swapped out' is a process for which all threads > have their kernel stacks swapped out. Swapper does not perform any > efforts to swap out userspace memory of the process. The reasoning is > perhaps that normal pagedaemon processing would inactivate/page out > the unreferenced pages on busy system, and swapping the kernel stacks > never occurs if pagedaemon can keep with the memory demand without such > drastic measures. > > In other words, RSS == 0 is neither necessary nor sufficient to conclude > that a process is swapped out. Thanks, folks. I'll be adding bits of this conversation to the swapping discussion. And I'm hearing, from an end users' point of view: The w column no longer provides useful performance information. ==ml -- Michael W. Lucas https://mwl.io/ nonfiction: https://www.michaelwlucas.com/ fiction: https://www.michaelwarrenlucas.com/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20171004095959.GA50520>