Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Jul 2002 17:43:49 +0200
From:      K.J.Koster@kpn.com
To:        jcborkow@tcpns.com
Cc:        hackers@FreeBSD.ORG
Subject:   RE: CPU context switching/load numbers
Message-ID:  <59063B5B4D98D311BC0D0001FA7E452205FDA8BC@l04.research.kpn.com>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?59063B5B4D98D311BC0D0001FA7E452205FDA8BC>