In the last episode (Aug 17), Bill LeFebvre said:
> Mike Jakubik wrote:
> >Dan Nelson wrote:
> >>>How can mysql use 160%? Is this a reporting bug in top because mysql 
> >>>is threaded?
> >>You have multiple CPUs, so a threaded process can theoretically reach
> >>100*ncpus cpu usage.
> >
> >Ahh, thats makes sense, thanks.
> 
> Actually it doesn't.  IMO, %CPU should be biased for all available
> cpu, not just a single cpu.  In other words, a single-threaded
> process running on a two processor box should never see more than 50%
> cpu.  That's how top computes it for SunOS.  But for freebsd top only
> displays whats in the proc structure and I don't know off-hand how
> the kernel records it.

One problem is that method doesn't scale to lots of CPUs.  On a Sun
T2000 a non-threaded process consuming all of one CPU would only report
3.12 %CPU in that case (100/32).

I just built top-3.6 on such a system, though, and it does report a
simple "main(){for(;;);}" process as consuming 100 %CPU.  Maybe you're
thinking of Solaris's own prstat command?

-- 
        Dan Nelson
        [EMAIL PROTECTED]
_______________________________________________
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to