From owner-svn-src-all@freebsd.org Thu Jan 18 19:43:03 2018 Return-Path: Delivered-To: svn-src-all@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 4EC11EBF222; Thu, 18 Jan 2018 19:43:03 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 294D97D347; Thu, 18 Jan 2018 19:43:03 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 782CB23091; Thu, 18 Jan 2018 19:43:02 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w0IJh23G062833; Thu, 18 Jan 2018 19:43:02 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w0IJh2ej062831; Thu, 18 Jan 2018 19:43:02 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201801181943.w0IJh2ej062831@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 18 Jan 2018 19:43:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r328134 - in head: sys/sys usr.bin/vmstat X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head: sys/sys usr.bin/vmstat X-SVN-Commit-Revision: 328134 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jan 2018 19:43:03 -0000 Author: jhb Date: Thu Jan 18 19:43:02 2018 New Revision: 328134 URL: https://svnweb.freebsd.org/changeset/base/328134 Log: Update various statements in vmstat(8) to match reality. - The process stats are actually thread counts rather than process counts. - Simplify various descriptions to remove mention of stats that are updated every 5 seconds (all VM related stats are now "instant", only the load average is updated every 5 seconds). - Don't make any mention of special treatment for processes that have been active in the last 20 seconds. We don't track that stat. - Rework the description of active virtual memory. Call it mapped virtual memory and explicitly point out it is not the same as the active page queue (which corresponds to "Active" in top(1)), and also hint at the possible bogusness of the value (e.g. if a process maps a single page out of a multiple GB file, the entire file's size is considered mapped). - Simplify a few descriptions that implied their output was a value per interval. All of the "rate" values are per-second rates scaled across the interval. - Update a few comments for 'struct vmtotal' along similar lines. Reported by: mwlucas (indirectly) Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D13905 Modified: head/sys/sys/vmmeter.h head/usr.bin/vmstat/vmstat.8 Modified: head/sys/sys/vmmeter.h ============================================================================== --- head/sys/sys/vmmeter.h Thu Jan 18 18:19:31 2018 (r328133) +++ head/sys/sys/vmmeter.h Thu Jan 18 19:43:02 2018 (r328134) @@ -41,7 +41,6 @@ */ #define MAXSLP 20 -/* Systemwide totals computed every five seconds. */ struct vmtotal { uint64_t t_vm; /* total virtual memory */ uint64_t t_avm; /* active virtual memory */ @@ -53,12 +52,12 @@ struct vmtotal { uint64_t t_armshr; /* active shared real memory */ uint64_t t_free; /* free memory pages */ int16_t t_rq; /* length of the run queue */ - int16_t t_dw; /* jobs in ``disk wait'' (neg + int16_t t_dw; /* threads in ``disk wait'' (neg priority) */ - int16_t t_pw; /* jobs in page wait */ - int16_t t_sl; /* jobs sleeping in core */ + int16_t t_pw; /* threads in page wait */ + int16_t t_sl; /* threads sleeping in core */ int16_t t_sw; /* swapped out runnable/short - block jobs */ + block threads */ uint16_t t_pad[3]; }; Modified: head/usr.bin/vmstat/vmstat.8 ============================================================================== --- head/usr.bin/vmstat/vmstat.8 Thu Jan 18 18:19:31 2018 (r328133) +++ head/usr.bin/vmstat/vmstat.8 Thu Jan 18 19:43:02 2018 (r328134) @@ -28,7 +28,7 @@ .\" @(#)vmstat.8 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd November 19, 2015 +.Dd January 18, 2018 .Dt VMSTAT 8 .Os .Sh NAME @@ -248,31 +248,39 @@ By default, displays the following information: .Bl -tag -width indent .It procs -Information about the numbers of processes in various states. +Information about the number of threads in various states: .Pp .Bl -tag -width indent -compact .It r -in run queue +running or in run queue .It b blocked for resources (i/o, paging, etc.) .It w -runnable or short sleeper (< 20 secs) but swapped +swapped out .El .It memory Information about the usage of virtual and real memory. -Virtual pages (reported in units of 1024 bytes) are considered active if -they belong to processes which are running or have run in the last 20 -seconds. .Pp +Mapped virtual memory is a sum of all of the virtual pages belonging +to mapped virtual memory objects. +Note that the entire memory object's size is considered mapped even if +only a subset of the object's pages are currently mapped. +This statistic is not related to the active page queue which is used to track +real memory. +.Pp .Bl -tag -width indent -compact .It avm -active virtual pages +mapped virtual memory +.Po previously called active in +.Nm +output +.Pc .It fre size of the free list .El .It page Information about page faults and paging activity. -These are averaged each five seconds, and given in units per second. +These are given in units per second. .Pp .Bl -tag -width indent -compact .It flt @@ -286,11 +294,11 @@ pages paged in .It po pages paged out .It fr -pages freed per second +pages freed .\" .It de .\" anticipated short term memory shortfall .It sr -pages scanned by clock algorithm, per-second +pages scanned by page daemon .El .It disks Disk operations per second (this field is system dependent). @@ -319,15 +327,15 @@ matching pattern is specified (see above), will only display the given devices or the devices matching the pattern, and will not randomly select other devices in the system. .It faults -Trap/interrupt rate averages per second over last 5 seconds. +Trap/interrupt rates per second. .Pp .Bl -tag -width indent -compact .It in -device interrupts per interval (including clock interrupts) +device interrupts (including clock interrupts) .It sy -system calls per interval +system calls .It cs -cpu context switch rate (switches/interval) +cpu context switches .El .It cpu Breakdown of percentage usage of CPU time. @@ -336,7 +344,7 @@ Breakdown of percentage usage of CPU time. .It us user time for normal and low priority processes .It sy -system time +system and interrupt time .It id cpu idle .El @@ -352,10 +360,7 @@ default memory file The command: .Dl vmstat -w 5 will print what the system is doing every five -seconds; this is a good choice of printing interval since this is how often -some of the statistics are sampled in the system. -Others vary every second and running the output for a while will make it -apparent which are recomputed every second. +seconds. .Pp The command: .Dl vmstat -p da -p cd -w 1