Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Aug 1998 07:39:30 +0200
From:      Lars =?iso-8859-1?Q?K=F6ller?= <Lars.Koeller@post.uni-bielefeld.de>
To:        Terry Lambert <tlambert@primenet.com>
Cc:        chuckr@glue.umd.edu, freebsd-smp@FreeBSD.ORG
Subject:   Re: Per processor load? 
Message-ID:  <199808180539.FAA26168@mitch.hrz.uni-bielefeld.de>
In-Reply-To: tlambert's message of Mon, 17 Aug 1998 18:12:00 -0000. <199808171812.LAA06500@usr08.primenet.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
----------

In reply to Terry Lambert who wrote:
 
 > > But thats only the first part of the problem! Where can I get
 > > processor specific load information? I need to draw a separate load 
 > > graph for each CPU??
 > 
 > System load is based on number of processees in the ready-to-run
 > state.

O.k. so far so good ....

 > For a symmetric system, if the load is 1.0 or above, both CPU's
 > should be actively working.
 > 
 > I suppose that what you are asking for is a "processor not idle
 > in the case of 1.0 >= load >= 0.0".
 > 
 > To get this, you would have to insert counters into the per CPU
 > idle loops, probably using the Appendix H cycle counter before and
 > after the per CPU HLT instruction, subtracting the count at exit
 > of the last HLT from both, and then subtracting the entry from the
 > exit, and dividing to get an "idle ratio".
 > 
 > Gathering this type of statistic could be actively harmful to CPU
 > latency coming out of the HLT condition, and could be as high as 10%
 > to 20% of the systems ability to do work.

The basic idea was to treat the CPU's as seperate systems each with 
it's own load. This is well known from HPUX, Linux, Solaris, ...
They display the following in, e.g. top:

System: share                                        Tue Aug 18 07:30:58 1998
Load averages: 2.42, 2.29, 2.28
280 processes: 273 sleeping, 5 running, 2 zombies
Cpu states:
CPU   LOAD   USER   NICE    SYS   IDLE  BLOCK  SWAIT   INTR   SSYS
 0    2.62   0.4%  97.6%   2.0%   0.0%   0.0%   0.0%   0.0%   0.0%
 1    2.22   0.8%  97.0%   2.2%   0.0%   0.0%   0.0%   0.0%   0.0%
---   ----  -----  -----  -----  -----  -----  -----  -----  -----
avg   2.42   0.6%  97.2%   2.2%   0.0%   0.0%   0.0%   0.0%   0.0%

Memory: 180344K (29336K) real, 256220K (66940K) virtual, 5160K free  Page# 1/26

CPU TTY   PID USERNAME PRI NI   SIZE    RES STATE    TIME %WCPU  %CPU COMMAND
 0    ? 19703 mcfutz   251 25   632K   116K run      6:05 80.27 80.13 schlu
 1    ? 19721 physik   251 25   632K   112K run      4:52 49.42 49.34 process
 1    ?  5375 plond    251 25 34756K 15900K run   2173:38 46.66 46.58 l502.exe

So the idea was in a first step to display the load of each CPU in a 
seperate graph of xperfmon++ . Perhaps it's a better idea to display 
the other parameters like IO rate, interrupts, ... but I don't see a 
way to get them CPU dependent.

Is there any CPU-private parameter in the kernel?

Thanks and regards

Lars


-- 
E-Mail:                                     |  Lars Köller
  Lars.Koeller@Uni-Bielefeld.DE              |  UNIX Sysadmin
  lkoeller@cc.FH-Lippe.DE                     |  Computing Center
PGP-key:                                       |  University of Bielefeld
  http://www.nic.surfnet.nl/pgp/pks-toplev.html |  Germany
----------- FreeBSD, what else? ---- http://www.freebsd.org -------------



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-smp" in the body of the message



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