Re: user:sys time ratio

From: Adam C. Migus <adam_at_migus.org>
Date: Sat, 13 Dec 2003 05:27:20 -0500
Colin Percival wrote:

>   Robert Watson suggested that I compare performance from UP and SMP 
> kernels:
>
> # /usr/bin/time -hl sh -c 'make -s buildworld 2>&1' > /dev/null
>                   Real          User        Sys
>   UP kernel       38m33.29s     27m10.09s   10m59.15s
>      (retest)     38m33.18s     27m04.40s   11m05.73s
>   SMP w/o HTT     41m01.54s     27m10.27s   13m29.82s
>      (retest)     39m47.50s     27m08.05s   12m12.20s
>   SMP w/HTT       42m17.16s     28m12.82s   14m04.93s
>      (retest)     44m09.61s     28m15.31s   15m44.86s
>
>   That enabling HTT degrades performance is not surprising, since I'm 
> not passing the -j option to make; but a 5% performance delta between 
> UP and SMP kernels is rather surprising (to me, at least), and the 
> fact that the system time varies so much on the SMP kernel also seems 
> peculiar.
>   Is this normal?
>
> Colin Percival
>
Colin,
Sorry for the long delay.  A bit behind on this list.  I would suggest 
seeing what happens to those number when you _do_ use -j.  Like phk said 
the sys/user ratio can vary quite a bit and it does so within one 
buildworld due to the way the build system works.  If you watch the 
build as it's running you'll see the ratio vary greatly.  To add to what 
phk said, with buildworld, as well as what you're doing your hardware 
matters for the magic number for peak utilization.  My guess for an 
'optimal' build based on your hardware description would be -j3 based on 
past experience.  Perhaps -j4 with the new features but that's even more 
of a guess.

FWIW staggering builds helps a lot if you just want to make sure you 
cranking your hardware since the variation is mainly due to many 
io-bound or cpu-bound things happening at once.  But I guess most people 
don't build more than one world at the same time.  :-)

Adam
Received on Sat Dec 13 2003 - 01:27:25 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:33 UTC