svn commit: r198848 - head/bin/ps

Bruce Evans brde at
Thu Nov 12 16:03:10 UTC 2009

On Thu, 12 Nov 2009, [utf-8] Dag-Erling Smørgrav wrote:

> Peter Jeremy <peterjeremy at> writes:
>> Actually, %4.0f works up to 9999.5 %CPU because there's no '.' in the
>> result.  I think this is an excellent solution.  And since FreeBSD
>> currently has a hard limit of 64 CPUs, it's unlikely to be exceeded
>> for a while.
> ...if by "a while" you mean "a year or two", because I can't imagine
> that restriction surviving much longer than that.  You can already get
> off-the-shelf hardware with 64 threads per die.

Can you imagine NCPU hitting a power wall or other technical barrier at
not much larger than 64?

> If screen real-estate
> is a concern, we can switch the scale from 100 to 1, so 1.0 is full tilt
> on one thread, etc., and use "%.5g", which should work for up to 99999
> threads (9999900%)

The extra character needed for this is one of the smallest problems
resulting from NCPU being huge.  The problem expands like O(log(NCPU))
and causes a non-fatal formatting error when it occurs.  Other problems
expand like O(NCPU).  A nearby one is the "pigs" display in systat.
This wants to display a on single screen without scrolling, so it will
soon take a 6 metre high display to fit just the idle pigs on a 1024-
CPU system.  These take at most 100% CPU each so they will be sorted
after multi-threaded pigs taking more, but they will be sorted before
most single-threaded pigs, thus displacing the latter from the window
except with > 6 meter high displays.


More information about the svn-src-head mailing list