Performance Benchmarking CPU

Tool Used: sysbench, Phoronix Test Suite

First Instance ECS on Cloud:

root@iZj6c5vmzbgujq3xi2m45aZ:~# phoronix-test-suite system-info

Phoronix Test Suite v5.2.1
System Information

Hardware:
Processor: Intel Xeon E5-2682 v4 @ 2.50GHz (1 Core), Motherboard: Alibaba Cloud ECS, Chipset: Intel 440FX- 82441FX PMC, Memory: 1 x 1024 MB RAM, Disk: 40GB, Graphics: Cirrus Logic GD 5446, Network: Red Hat Virtio device

Software:
OS: Ubuntu 18.04, Kernel: 4.15.0-45-generic (x86_64), File-System: ext4, Screen Resolution: 1024x768, System Layer: KVM

Second similar Instance on Azure Cloud:

root@testbenchmark:~# phoronix-test-suite system-info

Phoronix Test Suite v5.2.1
System Information

Hardware:
Processor: Intel Xeon Platinum 8171M @ 2.10GHz (1 Core), Motherboard: Microsoft Virtual Machine v7.0, Chipset: Intel 440BX/ZX/DX, Memory: 1 x 1024 MB Microsoft, Disk: 32GB Virtual Disk + 4GB Virtual Disk, Graphics: Microsoft Hyper-V virtual VGA

Software:
OS: Ubuntu 18.04, Kernel: 5.0.0-1035-azure (x86_64), File-System: ext4, Screen Resolution: 1152x864, System Layer: Microsoft Hyper-V Server


ECS
Azure VM
Processor
Intel Xeon E5-2682 v4 @ 2.50GHz (1 Core)
Intel Xeon Platinum 8171M @ 2.10GHz (1 Core)
Motherboard
Alibaba Cloud ECS
Microsoft Virtual Machine v7.0
Chipset
Intel 440FX- 82441FX PMC
Intel 440BX/ZX/DX
Memory
1 x 1024 MB RAM
1 x 1024 MB Microsoft
Disk
40GB
32GB Virtual Disk + 4GB Virtual Disk
Graphics
Cirrus Logic GD 5446
Microsoft Hyper-V virtual VGA
Network
Red Hat Virtio device

OS
Ubuntu 18.04
Ubuntu 18.04
Kernel
4.15.0-45-generic (x86_64)
5.0.0-1035-azure (x86_64)
File-System
ext4
ext4
Screen Resolution
1024x768
1152x864
System Layer
KVM
Microsoft Hyper-V Server

NOTE: The test and comparison here is very high level and the purpose here is to show how I do usually benchmarking and reporting.

CPU workload

Test1:
When running with the CPU workload, sysbench will verify prime numbers by doing standard division of the number by all numbers between 2 and the square root of the number. If any number gives a remainder of 0, the next number is calculated. As we can imagine, this will put some stress on the CPU, but only on a very limited set of the CPUs features.
The benchmark can be configured with the number of simultaneous threads and the maximum number to verify if it is a prime. I have chosen 2 thread here.
On Alibaba Cloud:

root@iZj6c5vmzbgujq3xi2m45aZ:~# sysbench cpu --cpu-max-prime=20000 --threads=2 run
sysbench 1.0.11 (using system LuaJIT 2.1.0-beta3)

Running the test with following options:
Number of threads: 2
Initializing random number generator from current time


Prime numbers limit: 20000

Initializing worker threads...

Threads started!

CPU speed:
    events per second:   320.26

General statistics:
    total time:                          10.0053s
    total number of events:              3205

Latency (ms):
         min:                                  2.65
         avg:                                  6.24
         max:                                668.54
         95th percentile:                      6.79
         sum:                              19994.63

Threads fairness:
    events (avg/stddev):           1602.5000/47.50
    execution time (avg/stddev):   9.9973/0.00

The number to verify with other systems (given the same or similar parameters) is given by the General statistics:

    total time:                          10.0053s
    total number of events:              3205

The number of ‘events per second’ should be used as a performance indicator instead of the total execution time.

CPU Metric during this test.



On Azure VM:

root@testbenchmark:~# sysbench cpu --cpu-max-prime=20000 --threads=2 run
sysbench 1.0.11 (using system LuaJIT 2.1.0-beta3)

Running the test with following options:
Number of threads: 2
Initializing random number generator from current time


Prime numbers limit: 20000

Initializing worker threads...

Threads started!

CPU speed:
    events per second:   322.58

General statistics:
    total time:                          10.0049s
    total number of events:              3228

Latency (ms):
         min:                                  3.01
         avg:                                  6.20
         max:                                 22.58
         95th percentile:                      7.43
         sum:                              20005.16

Threads fairness:
    events (avg/stddev):           1614.0000/3.00
    execution time (avg/stddev):   10.0026/0.00

Result: total time is approximately same in both machine.

Test2:

Another CPU test using Phoronix Test Suite. PTS is the most comprehensive testing and benchmarking platform available for Linux.

# No of test available
hasnain@benchmarktest:~$ phoronix-test-suite list-available-tests | wc -l
376

# To get no of test for Processor
phoronix-test-suite list-available-tests | grep Processor

Smallpt is a C++ global illumination renderer written in less than 100 lines of code. Global illumination is done via unbiased Monte Carlo path tracing and there is multi-threading support via the OpenMP library.
On Azure Cloud: Test Results Uploaded To: 
https://openbenchmarking.org/result/2004041-KH-CPUAZURET20
Result: Score is approximately same in both machine.




Similarly another Processor Test in PTS
Chess Test Suite [pts/chess]
This test suite contains tests that are various benchmarks looking at the CPU's performance through different chess benchmarks.

For other performance benchmarking refer:

Post a Comment

Thanks for your comment !
I will review your this and will respond you as soon as possible.