Skip to content

Commit

Permalink
Adding passmark benchmark results running on AMD Ryzen 5 7600X
Browse files Browse the repository at this point in the history
  • Loading branch information
hilliao committed Jun 3, 2023
1 parent 41481cf commit 797fe1b
Showing 1 changed file with 102 additions and 59 deletions.
161 changes: 102 additions & 59 deletions cpubench-passmark/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ You can adjust the following variables to simulate your deployed workloads.
* MB_MEMORY

```commandline
export NUM_CPUs=4
export MB_MEMORY=512
export CONTAINER_NAME=gcloud-${NUM_CPUs}cpus
docker run --name $CONTAINER_NAME -d --cpus=$NUM_CPUs --memory=${MB_MEMORY}m gcr.io/google.com/cloudsdktool/cloud-sdk:latest sleep infinity
export NUM_CPUs=4 && \
export MB_MEMORY=512 && \
export CONTAINER_NAME=gcloud-${NUM_CPUs}cpus && \
docker run --name $CONTAINER_NAME -d --cpus=$NUM_CPUs --memory=${MB_MEMORY}m gcr.io/google.com/cloudsdktool/cloud-sdk:latest sleep infinity && \
docker exec -it $CONTAINER_NAME bash
```

Expand Down Expand Up @@ -73,7 +73,7 @@ Executing the `docker run` command above, the passmark benchmark results running
AMD Ryzen™ Threadripper™ PRO 3945WX workstation uses the command
to start a docker container with vCPU limit set to 4, memory limit set to 512 MiB.

### AMD threadripper Docker Passmark.yaml
### AMD Ryzen Threadripper 3945wx Passmark results
```yaml
Results:
Results Complete: true
Expand All @@ -97,27 +97,30 @@ Results:
m_CPU_enc_ECDSA: 4084348912.621902
```

## Example result running on a container on Apple MacMini M2 with 4 CPUs
Compared to the latest Apple silicon M2, the results are drastically different from running the benchmark on bare metal.
Key performance metrics show large scale degradation for the following metric categories. The primary reason is that
the docker container is running as emulated x86.
`uname -a` returns `Linux 1e8c0cf3f9f8 5.15.49-linuxkit #1 SMP PREEMPT Tue Sep 13 07:51:32 UTC 2022 x86_64 GNU/Linux`

### WINNER: AMD

* CPU_INTEGER_MATH: 12134 is a quarter less than AMD's 15857
* CPU_FLOATINGPOINT_MATH: 745 is merely 8% of what AMD's 9008
* CPU_PRIME: 36 is the bright spot, making it 36% higher than AMD's 26.5
* CPU_ENCRYPTION: 309 is shockingly 20 times worse compared to AMD's 5465
* CPU_COMPRESSION: 26812 is 1/3 of AMD's 80428
* CPU_SINGLETHREAD: 557 is 5 times worse than AMD's 2676
* CPU_MATRIX_MULT_SSE: 35 is basically a joke compared to AMD's 4862. It's not even 1%.
* Encoding and Encryption benchmark scores combined are only half compared to AMD: (238986041+529282543+205998641)/(7635385602+5474155663+4084348912) => 0.05666357147629465

Average metrics comparison: (12134/15857+745/9008+36/26.5+309/5465+26812/80428+557/2676+35/4862+238986041/7635385602+529282543/5474155663+205998641/4084348912)/10
=> 0.299. Overall, the average of metrics shows Apple M2 is **70%** worse than AMD's
### AMD Ryzen 5 7600X Docker passmark results
```yaml
Results:
NumTestProcesses: 12
CPU_INTEGER_MATH: 21144.98333333333
CPU_FLOATINGPOINT_MATH: 14928.092017085815
CPU_PRIME: 41.362317335271563
CPU_SORTING: 11532.426624071779
CPU_ENCRYPTION: 7205.451012259553
CPU_COMPRESSION: 114850.06649693614
CPU_SINGLETHREAD: 4250.1011503066911
CPU_PHYSICS: 483.3072861346123
CPU_MATRIX_MULT_SSE: 7801.640998612419
CPU_mm: 695.40482911227195
CPU_sse: 3339.0007338346331
CPU_fma: 10158.386486041807
CPU_avx: 7854.5713382428139
CPU_avx512: 9854.6054363304229
m_CPU_enc_SHA: 10084425178.299089
m_CPU_enc_AES: 6816653751.0059433
m_CPU_enc_ECDSA: 5765310072.5881863
```

### Mac Mini M2 Docker Passmark.yaml
### Mac Mini M2 Docker Passmark results
```yaml
Results:
Results Complete: true
Expand All @@ -141,6 +144,20 @@ Results:
m_CPU_enc_ECDSA: 205998641.68711933
```

## Example result running on a container on Apple MacMini M2 with 4 CPUs
Compared to the latest Apple silicon M2, the results are drastically different from running the benchmark on x86 bare metal.
Key performance metrics show large scale degradation for the following metric categories. The primary reason is that
the docker container is running as emulated x86 on M2's ARM architecture.
`uname -a` returns `Linux 1e8c0cf3f9f8 5.15.49-linuxkit #1 SMP PREEMPT Tue Sep 13 07:51:32 UTC 2022 x86_64 GNU/Linux`

### WINNER: <font color="green">AMD</font>

Average metrics comparison: (12134/15857+745/9008+36/26.5+309/5465+26812/80428+557/2676+35/4862+238986041/7635385602+529282543/5474155663+205998641/4084348912)/10
=> 0.299. Overall, the average of metrics shows Apple M2 is <font color="red">**70%**</font> worse than AMD Threadripper

Average metrics comparison: (12134/21144+745/14928+36/41.3+309/7205+26812/114850+557/4250+35/7801+238986041/10084425178+529282543/6816653751+205998641/5765310072)/10
=> 0.20 Overall, the average of metrics shows Apple M2 is <font color="red">**80%**</font> worse than AMD Ryzen 5 7600X

## Benchmark results in Kubernetes between AMD and Apple M2 with 4 CPUs
The Kubernetes cluster used on AMD Ryzen Threadripper is [Anthos clusters on Bare metal](https://cloud.google.com/anthos/clusters/docs/bare-metal/latest)
which is a Google Cloud product. The Kubernetes cluster used on Apple M2 is [MicroK8s](https://microk8s.io/).
Expand All @@ -149,15 +166,56 @@ I am making an average on the ratio between the mectrics from the 2 processors t
The Anthos cluster has 8 CPUs allocated to it in KVM. The Microk8s cluster had 6 CPUs allocated to it in
[multipass](https://multipass.run/).

### WINNER: AMD
### AMD Ryzen Threadripper 3945wx Anthos K8s passmark results
running on pod gcloud.yaml on a KVM instance with 6-8 vCPUs
```yaml
Results:
NumTestProcesses: 8
CPU_INTEGER_MATH: 21294.402833333334
CPU_FLOATINGPOINT_MATH: 15550.762873294345
CPU_PRIME: 66.96481227570203
CPU_SORTING: 12563.285423741843
CPU_ENCRYPTION: 5427.6943984052141
CPU_COMPRESSION: 85259.102123164077
CPU_SINGLETHREAD: 2437.3673388481893
CPU_PHYSICS: 1023.2969898574404
CPU_MATRIX_MULT_SSE: 7801.7738157035983
CPU_mm: 949.51738450057883
CPU_sse: 3717.052978099593
CPU_fma: 11386.89534272076
CPU_avx: 8301.3731262904439
CPU_avx512: 0
m_CPU_enc_SHA: 7554238459.3581209
m_CPU_enc_AES: 5073027587.4781075
m_CPU_enc_ECDSA: 4446784197.6702099
```

* Score of the top 9 metrics from CPU_INTEGER_MATH to CPU_MATRIX_MULT_SSE: (18913/21294+31787/15550+61/67+16528/12563+912/5427+33929/85259+3219/2437+1109/1023+6372/7801)/9
=> 0.9940215056724604 shows the Apple M2 is about **.5%** worse than AMD
* Score of the top 9 metrics plus the 3 m_CPU_enc_* metrics: (18913/21294+31787/15550+61/67+16528/12563+912/5427+33929/85259+3219/2437+1109/1023+6372/7801+1545555081/7554238459+409409970/5073027587+915243407/4446784197)/12
=> 0.7864427225740651 shows significant degradation in performance. Apple M2 is **22%** worse than AMD.
### AMD Ryzen 5 7600X Anthos K8s passmark results
running on pod gcloud.yaml on a KVM instance with 6-8 vCPUs
```yaml
Results:
NumTestProcesses: 8
CPU_INTEGER_MATH: 29434.186000000002
CPU_FLOATINGPOINT_MATH: 21346.093324722933
CPU_PRIME: 87.20001821401361
CPU_SORTING: 16445.807581311186
CPU_ENCRYPTION: 6862.0079143045823
CPU_COMPRESSION: 96026.907982954246
CPU_SINGLETHREAD: 3583.5580584712411
CPU_PHYSICS: 925.18616154936183
CPU_MATRIX_MULT_SSE: 9437.3984514737804
CPU_mm: 930.17880674484582
CPU_sse: 4053.2585292291978
CPU_fma: 12885.9802895905
CPU_avx: 10101.16249210229
CPU_avx512: 10709.192494973136
m_CPU_enc_SHA: 9499170583.2338409
m_CPU_enc_AES: 6320709617.1549015
m_CPU_enc_ECDSA: 5766130231.8607836
```

### Mac Mini M2 microk8s passmark.yaml
running on pod ubuntu.yaml as gcloud.yaml caused crash loop.
### Mac Mini M2 microk8s passmark results
running on pod ubuntu.yaml because gcloud.yaml caused crash loop.
```yaml
CPU_INTEGER_MATH: 18913.772833333333
CPU_FLOATINGPOINT_MATH: 31787.635753181163
Expand All @@ -178,34 +236,19 @@ running on pod ubuntu.yaml as gcloud.yaml caused crash loop.
m_CPU_enc_ECDSA: 915243407.75800788
```

### AMD Threadripper Anthos K8s passmark.yaml
running on pod gcloud.yaml
```yaml
Results:
Results Complete: true
NumTestProcesses: 8
CPU_INTEGER_MATH: 21294.402833333334
CPU_FLOATINGPOINT_MATH: 15550.762873294345
CPU_PRIME: 66.96481227570203
CPU_SORTING: 12563.285423741843
CPU_ENCRYPTION: 5427.6943984052141
CPU_COMPRESSION: 85259.102123164077
CPU_SINGLETHREAD: 2437.3673388481893
CPU_PHYSICS: 1023.2969898574404
CPU_MATRIX_MULT_SSE: 7801.7738157035983
CPU_mm: 949.51738450057883
CPU_sse: 3717.052978099593
CPU_fma: 11386.89534272076
CPU_avx: 8301.3731262904439
CPU_avx512: 0
m_CPU_enc_SHA: 7554238459.3581209
m_CPU_enc_AES: 5073027587.4781075
m_CPU_enc_ECDSA: 4446784197.6702099
```
### WINNER: <font color="green">AMD</font>

* Score of the top 9 metrics from CPU_INTEGER_MATH to CPU_MATRIX_MULT_SSE: (18913/21294+31787/15550+61/67+16528/12563+912/5427+33929/85259+3219/2437+1109/1023+6372/7801)/9
=> 0.9940215056724604 shows the Apple M2 is about **.5%** worse than AMD
* Score of the top 9 metrics plus the 3 m_CPU_enc_* metrics: (18913/21294+31787/15550+61/67+16528/12563+912/5427+33929/85259+3219/2437+1109/1023+6372/7801+1545555081/7554238459+409409970/5073027587+915243407/4446784197)/12
=> 0.7864427225740651 shows significant degradation in performance. Apple M2 is <font color="red">**22%**</font> worse than AMD.
* Score of the top 9 metrics plus the 3 m_CPU_enc_* metrics: (18913/29434+31787/21346+61/87+16528/16445+912/6862+33929/96026+3219/3583+1109/925+6372/9437+1545555081/9499170583+409409970/6320709617+915243407/5766130231)/12
=> 0.6235723857629476 shows significant degradation in performance. Apple M2 is <font color="red">**38%**</font> worse than AMD.

It's uncertain if the higher end Apple M2 processors would make a difference as the tests were executed in pods with
CPU and memory resource limits. One thing for certain is that Apple M2 processors are definitely not designed for
enterprise workloads. A 3 years newer processor should not be 22% worse than AMD's CPU from 2020.
Apple M2 processors are definitely not designed for enterprise workloads.
Comparing it with a 3 years older AMD Ryzen Threadripper processor, M2 at 4 cores is still underperformed.
Comparing it with AMD Ryzen 5 7600X released 2 months later than the Apple M2 chip, the gap is even bigger at
<font color="red">**-38%**</font>

## Stress certain pods to simulate a busy Kubernetes cluster
To simulate CPU heavy workloads in a container or a pod, install and execute the following packages
Expand Down

0 comments on commit 797fe1b

Please sign in to comment.