zyun.moin.jp

Raspberry Pi 4 の PXE boot でベンチマークを実施してみた。

PXE boot できるようになって試したいなーと思ってたので、やってみました。

PEX boot のやり方

手順等はネットに転がってるのでそちらを参考に。

最初は Load Average が 2-4 でしたが、何度かリブートすると直りました。謎。

OS は 64bit 版の Raspberry Pi OS を使用しています。

https://downloads.raspberrypi.org/raspios_lite_arm64/images/raspios_lite_arm64-2021-05-28/

ベンチマーク

ちょいとNFSの方が悪い。

NFS

========================================================================
   BYTE UNIX Benchmarks (Version 5.1.3)

   System: raspberrypi: GNU/Linux
   OS: GNU/Linux -- 5.10.60-v8+ -- #1449 SMP PREEMPT Wed Aug 25 15:01:33 BST 2021
   Machine: aarch64 (unknown)
   Language: en_US.utf8 (charmap="ANSI_X3.4-1968", collate="ANSI_X3.4-1968")
   09:08:29 up  2:16,  1 user,  load average: 3.10, 2.45, 2.27; runlevel

------------------------------------------------------------------------
Benchmark Run: Fri Sep 03 2021 09:08:29 - 09:36:16
4 CPUs in system; running 1 parallel copy of tests

Dhrystone 2 using register variables       15212150.3 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                     2555.2 MWIPS (9.1 s, 7 samples)
Execl Throughput                               1322.0 lps   (29.9 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks        148419.9 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks           41188.0 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks        413731.1 KBps  (30.0 s, 2 samples)
Pipe Throughput                              174295.4 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                  35895.7 lps   (10.0 s, 7 samples)
Process Creation                               2961.1 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                   1764.1 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                    615.7 lpm   (60.0 s, 2 samples)
System Call Overhead                         137937.9 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0   15212150.3   1303.5
Double-Precision Whetstone                       55.0       2555.2    464.6
Execl Throughput                                 43.0       1322.0    307.5
File Copy 1024 bufsize 2000 maxblocks          3960.0     148419.9    374.8
File Copy 256 bufsize 500 maxblocks            1655.0      41188.0    248.9
File Copy 4096 bufsize 8000 maxblocks          5800.0     413731.1    713.3
Pipe Throughput                               12440.0     174295.4    140.1
Pipe-based Context Switching                   4000.0      35895.7     89.7
Process Creation                                126.0       2961.1    235.0
Shell Scripts (1 concurrent)                     42.4       1764.1    416.1
Shell Scripts (8 concurrent)                      6.0        615.7   1026.1
System Call Overhead                          15000.0     137937.9     92.0
                                                                   ========
System Benchmarks Index Score                                         325.9

------------------------------------------------------------------------
Benchmark Run: Fri Sep 03 2021 09:36:16 - 10:04:08
4 CPUs in system; running 4 parallel copies of tests

Dhrystone 2 using register variables       60904278.0 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                    10214.7 MWIPS (9.3 s, 7 samples)
Execl Throughput                               3546.5 lps   (30.0 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks        381314.0 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks          108933.5 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks        951682.3 KBps  (30.0 s, 2 samples)
Pipe Throughput                              693703.7 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                 132788.0 lps   (10.0 s, 7 samples)
Process Creation                               8514.0 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                   4789.9 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                    662.6 lpm   (60.2 s, 2 samples)
System Call Overhead                         543732.6 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0   60904278.0   5218.9
Double-Precision Whetstone                       55.0      10214.7   1857.2
Execl Throughput                                 43.0       3546.5    824.8
File Copy 1024 bufsize 2000 maxblocks          3960.0     381314.0    962.9
File Copy 256 bufsize 500 maxblocks            1655.0     108933.5    658.2
File Copy 4096 bufsize 8000 maxblocks          5800.0     951682.3   1640.8
Pipe Throughput                               12440.0     693703.7    557.6
Pipe-based Context Switching                   4000.0     132788.0    332.0
Process Creation                                126.0       8514.0    675.7
Shell Scripts (1 concurrent)                     42.4       4789.9   1129.7
Shell Scripts (8 concurrent)                      6.0        662.6   1104.4
System Call Overhead                          15000.0     543732.6    362.5
                                                                   ========
System Benchmarks Index Score                                         939.1

microSD

========================================================================
   BYTE UNIX Benchmarks (Version 5.1.3)

   System: raspberrypi: GNU/Linux
   OS: GNU/Linux -- 5.10.17-v8+ -- #1414 SMP PREEMPT Fri Apr 30 13:23:25 BST 2021
   Machine: aarch64 (unknown)
   Language: en_US.utf8 (charmap="ANSI_X3.4-1968", collate="ANSI_X3.4-1968")
   10:08:29 up  1:45,  1 user,  load average: 0.25, 0.07, 0.02; runlevel Sep

------------------------------------------------------------------------
Benchmark Run: Fri Sep 03 2021 10:08:29 - 10:36:16
4 CPUs in system; running 1 parallel copy of tests

Dhrystone 2 using register variables       15378449.1 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                     2557.8 MWIPS (9.0 s, 7 samples)
Execl Throughput                               1737.7 lps   (30.0 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks        128378.9 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks           36362.8 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks        378294.5 KBps  (30.0 s, 2 samples)
Pipe Throughput                              176830.7 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                  34480.4 lps   (10.0 s, 7 samples)
Process Creation                               3029.6 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                   3616.7 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                   1045.0 lpm   (60.0 s, 2 samples)
System Call Overhead                         143646.8 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0   15378449.1   1317.8
Double-Precision Whetstone                       55.0       2557.8    465.0
Execl Throughput                                 43.0       1737.7    404.1
File Copy 1024 bufsize 2000 maxblocks          3960.0     128378.9    324.2
File Copy 256 bufsize 500 maxblocks            1655.0      36362.8    219.7
File Copy 4096 bufsize 8000 maxblocks          5800.0     378294.5    652.2
Pipe Throughput                               12440.0     176830.7    142.1
Pipe-based Context Switching                   4000.0      34480.4     86.2
Process Creation                                126.0       3029.6    240.4
Shell Scripts (1 concurrent)                     42.4       3616.7    853.0
Shell Scripts (8 concurrent)                      6.0       1045.0   1741.7
System Call Overhead                          15000.0     143646.8     95.8
                                                                   ========
System Benchmarks Index Score                                         360.5

------------------------------------------------------------------------
Benchmark Run: Fri Sep 03 2021 10:36:16 - 11:04:05
4 CPUs in system; running 4 parallel copies of tests

Dhrystone 2 using register variables       61486446.6 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                    10190.8 MWIPS (9.1 s, 7 samples)
Execl Throughput                               4862.9 lps   (30.0 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks        287106.5 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks           78351.2 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks        735875.7 KBps  (30.0 s, 2 samples)
Pipe Throughput                              701025.6 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                 135073.3 lps   (10.0 s, 7 samples)
Process Creation                               8628.7 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                   8405.4 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                   1099.9 lpm   (60.1 s, 2 samples)
System Call Overhead                         559566.9 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0   61486446.6   5268.8
Double-Precision Whetstone                       55.0      10190.8   1852.9
Execl Throughput                                 43.0       4862.9   1130.9
File Copy 1024 bufsize 2000 maxblocks          3960.0     287106.5    725.0
File Copy 256 bufsize 500 maxblocks            1655.0      78351.2    473.4
File Copy 4096 bufsize 8000 maxblocks          5800.0     735875.7   1268.8
Pipe Throughput                               12440.0     701025.6    563.5
Pipe-based Context Switching                   4000.0     135073.3    337.7
Process Creation                                126.0       8628.7    684.8
Shell Scripts (1 concurrent)                     42.4       8405.4   1982.4
Shell Scripts (8 concurrent)                      6.0       1099.9   1833.2
System Call Overhead                          15000.0     559566.9    373.0
                                                                   ========
System Benchmarks Index Score                                         986.5

fio

こちらを参考に。NFSの方がよい結果ですね。

NFS

Seq-Read 69.928
Seq-Write 57.252
Rand-Read-512K 74.356
Rand-Write-512K 54.991
Rand-Read-4K 14.255
Rand-Write-4K 4.501
Rand-Read-4K-QD32 57.052
Rand-Write-4K-QD32 21.074

microSD

Seq-Read 41.866
Seq-Write 21.895
Rand-Read-512K 39.045
Rand-Write-512K 28.497
Rand-Read-4K 6.881
Rand-Write-4K 2.641
Rand-Read-4K-QD32 9.33
Rand-Write-4K-QD32 1.769