[Cialug] user vs. sys cpu time

Matthew Nuzum matthew.nuzum at canonical.com
Thu Jun 21 16:09:31 CDT 2007


On 6/21/07, Kendall Bailey <krbailey at gmail.com> wrote:
> I have a math optimization app that runs for several minutes on a dual
> proc/dual core opteron SLES 9 box.  Plenty of RAM.  It uses 4 threads
> to do some parallel computation to take advantage of all 4 cpu cores.
> Looking at 'top', or using 'time' to measure cpu time, it's logging
> 30% or more sys time vs. 60-70% user time during the parallel phases.
> I ran it with 'strace -c' and that says only 0.003 seconds are spent
> in system calls.  No system calls going on at all on the 4 threads.
> So what does the 'sys' time represent as reported by top?

I don't know if its related, but I had a problem like this last year
that I *think* was related to CPU affinity.

My calculation was split into two tasks, one very cpu intensive, one
only moderately so. The cpu intensive task kept jumping from core to
core.

It was still faster than a single process (I forked instead of using
threads) and I didn't investigate the problem much since I finished my
task. Maybe something like that can be slowing you down?

-- 
Matthew Nuzum
newz2000 on freenode


More information about the Cialug mailing list