From owner-freebsd-hackers Wed Jul 31 9: 4:29 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9656337B400 for ; Wed, 31 Jul 2002 09:04:26 -0700 (PDT) Received: from l04.research.kpn.com (l04.research.kpn.com [139.63.192.204]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9355343E3B for ; Wed, 31 Jul 2002 09:04:25 -0700 (PDT) (envelope-from K.J.Koster@kpn.com) Received: by l04.research.kpn.com with Internet Mail Service (5.5.2653.19) id ; Wed, 31 Jul 2002 17:43:53 +0200 Message-ID: <59063B5B4D98D311BC0D0001FA7E452205FDA8BC@l04.research.kpn.com> From: K.J.Koster@kpn.com To: jcborkow@tcpns.com Cc: hackers@FreeBSD.ORG Subject: RE: CPU context switching/load numbers Date: Wed, 31 Jul 2002 17:43:49 +0200 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Dear Jason, > > I have an inconsistency that I am trying to explain. When I > do a "w" command > on the box, I see this: > > 7:31PM up 74 days, 39 mins, 1 user, load averages: 1.12, 0.94, 0.93 > > This says I have a load of 1.12 over the past minute, or, for every > available CPU interval, I have 1.12 processes requesting the CPU. > > However, if I do a vmstat, I see this: > > procs memory page disks faults cpu > r b w avm fre flt re pi po fr sr w0 w1 in > sy cs us sy id > 0 0 0 221896 58512 3 0 0 0 4 0 0 0 78 > 169 78 1 14 85 > > This tells me the CPU is 85% idle, and spends 14% of its time > running system > processes and 1% of the time running user processes (such as > the shell I am > using to console into the box with). > Please be careful with the vmstat output. It presents an average over a longer period of time. I'm not sure what it does precisely. Run "vmstat 2", ignoring the very first line of numbers. I got this wisdom from the book named "System Performance Tuning". I highly recommend it to anyone who wants to tune his or her box. Kees Jan ===================================================== You can't have everything. Where would you put it? [Steven Wright] To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message