From owner-freebsd-hackers@freebsd.org Tue Oct 3 21:57:37 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 CCCFAE25B74 for ; Tue, 3 Oct 2017 21:57:37 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id BB02265B54 for ; Tue, 3 Oct 2017 21:57:37 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: by mailman.ysv.freebsd.org (Postfix) id B72C6E25B73; Tue, 3 Oct 2017 21:57:37 +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 B6CBBE25B72 for ; Tue, 3 Oct 2017 21:57:37 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from gw.catspoiler.org (unknown [IPv6:2602:304:b010:ef20::f2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "gw.catspoiler.org", Issuer "gw.catspoiler.org" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 8DCE465B53 for ; Tue, 3 Oct 2017 21:57:37 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.15.2/8.15.2) with ESMTP id v93LvSjD040775; Tue, 3 Oct 2017 14:57:32 -0700 (PDT) (envelope-from truckman@FreeBSD.org) Message-Id: <201710032157.v93LvSjD040775@gw.catspoiler.org> Date: Tue, 3 Oct 2017 14:57:28 -0700 (PDT) From: Don Lewis Subject: Re: vmstat's w column To: mwlucas@michaelwlucas.com cc: hackers@freebsd.org In-Reply-To: <20171003202150.GA42540@mail.michaelwlucas.com> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii 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 21:57:37 -0000 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.