[Discuss] Hardware threads do mean something
Alan W. Irwin
Alan.W.Irwin1234 at gmail.com
Tue Nov 20 16:01:03 PST 2018
I just completed a kernel build with the following command
time (make O=$OUTPUT_TREE -j16 bindeb-pkg LOCALVERSION=-custom >& $OUTPUT_TREE/bindeb-pkg.out)
The -j option allows up to 16 tasks to be run simultaneously during this build.
The time output was
real 24m30.758s
user 305m32.652s
sys 23m56.508s
The "top" application confirmed that during this task the CPU modes were
usually either us (user) or sy (sys) with the id (idle), wa (wait),
hi, si, and st modes usually very near 0 per cent, i.e., the CPU's and
associated hardware threads were being used efficiently.
The above time results correspond to an efficiency factor (compared to
a system with only one cpu and one thread) of
(user + sys)/real = 13.4
That factor is quite good when considering that my Ryzen 7 1700 system has 8 real
CPU's and 16 threads.
Before I encountered this result I always took "threads" to be some
advertising gimmick by CPU manufacturers, but apparently for my AMD Ryzen
hardware they actually do almost double box efficiency (at least with
Linux) when doing some cpu-intensive and highly parallelizable task
such as kernel compilation.
Of course, it would be nice if I didn't have to compile a custom kernel
to stabilize my AMD Ryzen hardware, but that is a different story. :-)
Alan
__________________________
Alan W. Irwin
Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________
Linux-powered Science
__________________________
More information about the Discuss
mailing list