stevepedwards.com/DebianAdmin linux mint IT admin tips info

How Slow Can You Go? Sysbench Comparisons – CPUs

To continue on with this old V newer tech performance theme, as it is important to have references for at least 3 areas of system processes as indicators of performance: CPU; memory and disk IO.

I have discovered Sysbench since reading Brendan Gregg's book, so will use that across my 4 different PCs, as it also standardises testing for each system by running the same task.

sudo apt-get install sysbench

NAME
sysbench - A modular, cross-platform and multi-threaded benchmark tool.

Sysbench can run some preset tests for various processes and their performance such as disk IO, mem IO etc.

I am running a CPU, prime numbers based test on all 4 PCs for this Post - it should be self explanatory.

All systems have the same Mint kernel versions: 3.16.0-38-generic, but different hardware and memory amounts as stated in the first Post for this theme:

For each system, the results are summarised below with execution time being the result of interest, to give more or less linear ratios for performance ability, summarised at the end and basic conclusions drawn as for the first Post.

HP AMDA8 1GHz Quad Core laptop, 8GB of RAM

stevee@AMDA8 ~ $ sudo sysbench --test=cpu --cpu-max-prime=100000 run
[sudo] password for stevee:
sysbench 0.4.12: multi-threaded system evaluation benchmark

Running the test with following options:
Number of threads: 1

Doing CPU performance benchmark

Threads started!
Done.

Maximum prime number checked in CPU test: 100000
Test execution summary:
total time: 218.2423s
total number of events: 10000
total time taken by event execution: 218.2331
per-request statistics:
min: 20.49ms
avg: 21.82ms
max: 29.82ms
approx. 95 percentile: 25.00ms

Threads fairness:
events (avg/stddev): 10000.0000/0.00
execution time (avg/stddev): 218.2331/0.00

HP Pavilion 4450e AMD Dual Core 64, 2300MHz, 66MHz mem bus, 4GB ram, SATA

stevee@hpmint ~ $ sudo sysbench --test=cpu --cpu-max-prime=100000 run
sysbench 0.4.12: multi-threaded system evaluation benchmark

Running the test with following options:
Number of threads: 1

Doing CPU performance benchmark

Threads started!
Done.

Maximum prime number checked in CPU test: 100000
Test execution summary:
total time: 867.1377s
total number of events: 10000
total time taken by event execution: 867.1276
per-request statistics:
min: 86.61ms
avg: 86.71ms
max: 151.73ms
approx. 95 percentile: 86.72ms

Threads fairness:
events (avg/stddev): 10000.0000/0.00
execution time (avg/stddev): 867.1276/0.00

Dell Inspiron 531 Dual Core AMD 64, 2800MHz, 66MHz mem bus, 6GB ram, SATA

stevee@DELLMINT ~ $ sudo sysbench --test=cpu --cpu-max-prime=100000 run
sysbench 0.4.12: multi-threaded system evaluation benchmark

Running the test with following options:
Number of threads: 1

Doing CPU performance benchmark

Threads started!
Done.

Maximum prime number checked in CPU test: 100000
Test execution summary:
total time: 711.6993s
total number of events: 10000
total time taken by event execution: 711.6894
per-request statistics:
min: 71.11ms
avg: 71.17ms
max: 101.45ms
approx. 95 percentile: 71.20ms

Threads fairness:
events (avg/stddev): 10000.0000/0.00
execution time (avg/stddev): 711.6894/0.00

HP Pavilion Intel Celeron M 1 Core 32, 1729MHz, 66MHz mem bus, 1GB ram, SATA

stevee@minimint ~ $ sudo sysbench --test=cpu --cpu-max-prime=100000 run
sysbench 0.4.12: multi-threaded system evaluation benchmark

Running the test with following options:
Number of threads: 1

Doing CPU performance benchmark

Threads started!
Done.

Maximum prime number checked in CPU test: 100000
Test execution summary:
total time: 644.3397s
total number of events: 10000
total time taken by event execution: 644.3194
per-request statistics:
min: 53.37ms
avg: 64.43ms
max: 173.93ms
approx. 95 percentile: 97.64ms

Threads fairness:
events (avg/stddev): 10000.0000/0.00
execution time (avg/stddev): 644.3194/0.00

Well, this is surprising!

AMDA8 quad coreDell 64 bit dual coreHP Pav 64 bit dual HP Pav 32 bit mono
 Memory DRAM 8GB 6GB 4GB 1GB
Time elapsed (secs)218.2331711.6894867.1276644.3194
Ratio to quad core 218/218 = 1711/218 = 3.26867/218 = 3.977  644/218 = 2.95
 Added 4/10/16HP  Intel Pent Dual
 Memory DRAM 2GB
Time elapsed (secs)216.4174
Ratio to quad core 218/216 = 0.991

The Intel Dual is quicker than the AMD quad for this task!

The old 32 bit Celeron is NOT the slowest processor for this task by a long margin: in 2nd place - 67 secs before the Dell64 and 223 seconds before the HP64. It was 426 seconds behind the laptop, compared to the nearest rival Dell at 493 secs behind.

I know there are other factors involved like level 1, 2 and 3 cache, DRAM make and clock speed, Front Side Bus and motherboard design, what other Apps are running etc. but it goes to show that 64 bit does not necessarily mean faster/better depending...

Going by these results for the worst case HP64 comparison, the quad core was 867/218 = 3.97 times faster, and as only a single thread was run, that should be single core bound - as I understand that - so it suggests that a SINGLE CORE of the quad core IS up to 4 times faster than a single core of any of the other CPUs.

https://en.wikipedia.org/wiki/Thread_(computing)

"In computer science, a thread of execution is the smallest sequence of programmed instructions that can be managed independently by a scheduler, which is typically a part of the operating system.[1] The implementation of threads and processes differs between operating systems, but in most cases a thread is a component of a process. Multiple threads can exist within one process, executing concurrently and sharing resources such as memory, while different processes do not share these resources. In particular, the threads of a process share its executable code and the values of its variables at any given time.

Systems with a single processor generally implement multithreading by time slicing: the central processing unit (CPU) switches between different software threads. This context switching generally happens very often and rapidly enough that users perceive the threads or tasks as running in parallel. On a multiprocessor or multi-core system, multiple threads can execute in parallel, with every processor or core executing a separate thread simultaneously; on a processor or core with hardware threads, separate software threads can also be executed concurrently by separate hardware threads."

This is not in line with Moore's Law as a generalisation this time - as this quadrupling of processing power is over about a ten year period here, not 2 years.

Considering this test and the prior Post on this, Moore's Law seems to apply loosely to overall systems, not necessarily individual components of type - taking ALL the system's performance capability into account i.e. where the slowest of all the components is the bottleneck that needs most consideration for the approximate claimed doubling of performance per halving in size every 2 years, as well the efficiency of the software if running software based tests for benchmarking.

Moore's Law is a rough generalisation at best (and it's not a law as a Physics definition anyway) mainly describing manufacturing transistor density over time, as a general indicator of processing power.

Comments are closed.

Post Navigation