From owner-freebsd-hackers@freebsd.org Tue Oct 3 22:15:22 2017 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 650FAE26351 for ; Tue, 3 Oct 2017 22:15:22 +0000 (UTC) (envelope-from kozlov@ravenloft.kiev.ua) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 550D966500 for ; Tue, 3 Oct 2017 22:15:22 +0000 (UTC) (envelope-from kozlov@ravenloft.kiev.ua) Received: by mailman.ysv.freebsd.org (Postfix) id 5149AE26350; Tue, 3 Oct 2017 22:15:22 +0000 (UTC) Delivered-To: hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 50DF1E2634F for ; Tue, 3 Oct 2017 22:15:22 +0000 (UTC) (envelope-from kozlov@ravenloft.kiev.ua) Received: from ravenloft.kiev.ua (ravenloft.kiev.ua [94.244.131.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 196AE664FF; Tue, 3 Oct 2017 22:15:21 +0000 (UTC) (envelope-from kozlov@ravenloft.kiev.ua) Date: Wed, 4 Oct 2017 00:15:15 +0200 From: Alex Kozlov To: Allan Jude , "Michael W. Lucas" Cc: hackers@freebsd.org Subject: Re: vmstat's w column Message-ID: <20171003221514.GA74686@ravenloft.kiev.ua> References: <20171003202150.GA42540@mail.michaelwlucas.com> <47508b41-7a13-9b85-e432-82d5837023a5@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <47508b41-7a13-9b85-e432-82d5837023a5@freebsd.org> X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Oct 2017 22:15:22 -0000 On Tue, Oct 03, 2017 at 04:31:17PM -0400, Allan Jude wrote: > On 10/03/2017 16:21, 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 wonder if the explanation needs a comma. > It could be read as: running, or [short sleeper that is swapped out] This field corresponds to vmtotal.t_sw counter (see vm.vmtotal sysctl). Its increases in two cases: thread is swapped out (TDI_SWAPPED state) or thread is ready to run, but not in the run queue. The short sleeper part was removed in r103216 (see kg->kg_slptime < maxslp line): https://svnweb.freebsd.org/base/head/sys/vm/vm_meter.c?r1=99072&r2=103216 -- Alex