lkml.org 
[lkml]   [1997]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectStrange CPU usage times with SMP
I have been running some fairly demainding programs on my Dual PPro 200 
linux box lately and it is great! I am using calles to times() to try to
get CPU time usage so I can benchmark it against some other platforms I
work on. The only problem is that when SMP is enabled I get some fairly
strange times. Sometimes all the time will be system time, other times
it will all be user time, and as you might have guessed, all combinations
in-between. If I run this program 5 times, I will get 5 different
combinations, but they will always add up to the same number Even stranger,
when I run 2 programs at once, and then look at the output with top, the
USER CPU is 99% and the system CPU is at 101%. I assume this has to do
with the fact that I have 2 processors TICKing away. Is this a bug in
the kernel, C libraries, or just an eventuality that hasn't been taken
care of yet? In the mean time, does anyone know a way to fix this
behavior? I am using gcc2.7.2, libc5.3.12, procps 1.01 and linux 2.0.27.

Thanks a lot!
Chris

\
 
 \ /
  Last update: 2005-03-22 13:38    [W:0.039 / U:1.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site