computerの日記

Cisco,SHELL,C,Qt,C++,Linux,ネットワーク,Windows Scriptなどの発言です

Meltdown 関連パッチ適用後のベンチマーク結果

カーネルをアップデートしてしまったのですが、どの程度の機能低下?が見られるようになったかを、知りたいです。
そこで、UnixBench をやってみることにしました。
まずは、最新カーネルのままで実行してみました。

# grubby --default-kernel
/boot/vmlinuz-4.14.11-300.fc27.x86_64

# grubby --default-index
0

# grubby --info=ALL
index=0
kernel=/boot/vmlinuz-4.14.11-300.fc27.x86_64
args="ro rd.lvm.lv=fedora/root rd.lvm.lv=fedora/swap nomodeset rhgb quiet LANG=ja_JP.UTF-8"
root=/dev/mapper/fedora-root
initrd=/boot/initramfs-4.14.11-300.fc27.x86_64.img
title=Fedora (4.14.11-300.fc27.x86_64) 27 (Twenty Seven)
index=1
kernel=/boot/vmlinuz-4.14.8-300.fc27.x86_64
args="ro rd.lvm.lv=fedora/root rd.lvm.lv=fedora/swap nomodeset rhgb quiet LANG=ja_JP.UTF-8"
root=/dev/mapper/fedora-root
initrd=/boot/initramfs-4.14.8-300.fc27.x86_64.img
title=Fedora (4.14.8-300.fc27.x86_64) 27 (Twenty Seven)
index=2
kernel=/boot/vmlinuz-4.14.7-300.fc27.x86_64
args="ro rd.lvm.lv=fedora/root rd.lvm.lv=fedora/swap nomodeset rhgb quiet LANG=ja_JP.UTF-8"
root=/dev/mapper/fedora-root
initrd=/boot/initramfs-4.14.7-300.fc27.x86_64.img
title=Fedora (4.14.7-300.fc27.x86_64) 27 (Twenty Seven)
index=3
kernel=/boot/vmlinuz-0-rescue-341f3defedb547699a016a1a9e6e6da8
args="ro rd.lvm.lv=fedora/root rd.lvm.lv=fedora/swap nomodeset rhgb quiet"
root=/dev/mapper/fedora-root
initrd=/boot/initramfs-0-rescue-341f3defedb547699a016a1a9e6e6da8.img
title=Fedora (0-rescue-341f3defedb547699a016a1a9e6e6da8) 25 (Twenty Five)
index=4
non linux entry

一つ前のカーネルに設定してみます。
# grubby --set-default /boot/vmlinuz-4.14.8-300.fc27.x86_64
# grubby --default-index
1

# shutdown -r now

$ ./Run -i 1

以下、結果となります。

Linux gns3-iouvm 4.14.11-300.fc27.x86_64 #1 SMP Wed Jan 3 13:52:28 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Benchmark Run: 月 1月 08 2018 16:19:46 - 16:26:35
8 CPUs in system; running 1 parallel copy of tests

Dhrystone 2 using register variables 40574757.7 lps (10.0 s, 1 samples)
Double-Precision Whetstone 4203.7 MWIPS (11.9 s, 1 samples)
Execl Throughput 4855.8 lps (29.8 s, 1 samples)
File Copy 1024 bufsize 2000 maxblocks 975107.0 KBps (30.0 s, 1 samples)
File Copy 256 bufsize 500 maxblocks 260045.0 KBps (30.0 s, 1 samples)
File Copy 4096 bufsize 8000 maxblocks 2497555.0 KBps (30.0 s, 1 samples)
Pipe Throughput 1395146.1 lps (10.0 s, 1 samples)
Pipe-based Context Switching 222524.1 lps (10.0 s, 1 samples)
Process Creation 11913.3 lps (30.0 s, 1 samples)
Shell Scripts (1 concurrent) 7391.3 lpm (60.0 s, 1 samples)
Shell Scripts (8 concurrent) 3107.5 lpm (60.0 s, 1 samples)
System Call Overhead 1022589.9 lps (10.0 s, 1 samples)

System Benchmarks Index Values BASELINE RESULT INDEX
Dhrystone 2 using register variables 116700.0 40574757.7 3476.8
Double-Precision Whetstone 55.0 4203.7 764.3
Execl Throughput 43.0 4855.8 1129.3
File Copy 1024 bufsize 2000 maxblocks 3960.0 975107.0 2462.4
File Copy 256 bufsize 500 maxblocks 1655.0 260045.0 1571.3
File Copy 4096 bufsize 8000 maxblocks 5800.0 2497555.0 4306.1
Pipe Throughput 12440.0 1395146.1 1121.5
Pipe-based Context Switching 4000.0 222524.1 556.3
Process Creation 126.0 11913.3 945.5
Shell Scripts (1 concurrent) 42.4 7391.3 1743.2
Shell Scripts (8 concurrent) 6.0 3107.5 5179.1
System Call Overhead 15000.0 1022589.9 681.7
========
System Benchmarks Index Score 1542.6

------------------------------------------------------------------------
Benchmark Run: 月 1月 08 2018 16:26:35 - 16:33:24
8 CPUs in system; running 8 parallel copies of tests

Dhrystone 2 using register variables 185141692.8 lps (10.0 s, 1 samples)
Double-Precision Whetstone 32704.8 MWIPS (10.0 s, 1 samples)
Execl Throughput 21620.1 lps (29.3 s, 1 samples)
File Copy 1024 bufsize 2000 maxblocks 1232533.0 KBps (30.0 s, 1 samples)
File Copy 256 bufsize 500 maxblocks 324473.0 KBps (30.0 s, 1 samples)
File Copy 4096 bufsize 8000 maxblocks 3280739.0 KBps (30.0 s, 1 samples)
Pipe Throughput 7777059.3 lps (10.0 s, 1 samples)
Pipe-based Context Switching 1677078.9 lps (10.0 s, 1 samples)
Process Creation 61386.3 lps (30.0 s, 1 samples)
Shell Scripts (1 concurrent) 25670.6 lpm (60.0 s, 1 samples)
Shell Scripts (8 concurrent) 4065.0 lpm (60.0 s, 1 samples)
System Call Overhead 6014480.6 lps (10.0 s, 1 samples)

System Benchmarks Index Values BASELINE RESULT INDEX
Dhrystone 2 using register variables 116700.0 185141692.8 15864.8
Double-Precision Whetstone 55.0 32704.8 5946.3
Execl Throughput 43.0 21620.1 5027.9
File Copy 1024 bufsize 2000 maxblocks 3960.0 1232533.0 3112.5
File Copy 256 bufsize 500 maxblocks 1655.0 324473.0 1960.6
File Copy 4096 bufsize 8000 maxblocks 5800.0 3280739.0 5656.4
Pipe Throughput 12440.0 7777059.3 6251.7
Pipe-based Context Switching 4000.0 1677078.9 4192.7
Process Creation 126.0 61386.3 4871.9
Shell Scripts (1 concurrent) 42.4 25670.6 6054.4
Shell Scripts (8 concurrent) 6.0 4065.0 6774.9
System Call Overhead 15000.0 6014480.6 4009.7
========
System Benchmarks Index Score 5144.8

---------------------------------------------------------
Linux gns3-iouvm 4.14.8-300.fc27.x86_64 #1 SMP Wed Dec 20 19:00:18 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

Benchmark Run: 月 1月 08 2018 17:03:43 - 17:10:32
8 CPUs in system; running 1 parallel copy of tests

Dhrystone 2 using register variables 38787410.5 lps (10.0 s, 1 samples)
Double-Precision Whetstone 4715.0 MWIPS (9.4 s, 1 samples)
Execl Throughput 5127.7 lps (29.4 s, 1 samples)
File Copy 1024 bufsize 2000 maxblocks 1234002.0 KBps (30.0 s, 1 samples)
File Copy 256 bufsize 500 maxblocks 367602.0 KBps (30.0 s, 1 samples)
File Copy 4096 bufsize 8000 maxblocks 2770317.0 KBps (30.0 s, 1 samples)
Pipe Throughput 2403210.0 lps (10.0 s, 1 samples)
Pipe-based Context Switching 246422.0 lps (10.1 s, 1 samples)
Process Creation 13904.1 lps (30.0 s, 1 samples)
Shell Scripts (1 concurrent) 8324.7 lpm (60.0 s, 1 samples)
Shell Scripts (8 concurrent) 3414.6 lpm (60.0 s, 1 samples)
System Call Overhead 3717750.5 lps (10.1 s, 1 samples)

System Benchmarks Index Values BASELINE RESULT INDEX
Dhrystone 2 using register variables 116700.0 38787410.5 3323.7
Double-Precision Whetstone 55.0 4715.0 857.3
Execl Throughput 43.0 5127.7 1192.5
File Copy 1024 bufsize 2000 maxblocks 3960.0 1234002.0 3116.2
File Copy 256 bufsize 500 maxblocks 1655.0 367602.0 2221.2
File Copy 4096 bufsize 8000 maxblocks 5800.0 2770317.0 4776.4
Pipe Throughput 12440.0 2403210.0 1931.8
Pipe-based Context Switching 4000.0 246422.0 616.1
Process Creation 126.0 13904.1 1103.5
Shell Scripts (1 concurrent) 42.4 8324.7 1963.4
Shell Scripts (8 concurrent) 6.0 3414.6 5691.1
System Call Overhead 15000.0 3717750.5 2478.5
========
System Benchmarks Index Score 1999.6

------------------------------------------------------------------------
Benchmark Run: 月 1月 08 2018 17:10:32 - 17:17:22
8 CPUs in system; running 8 parallel copies of tests

Dhrystone 2 using register variables 194870992.0 lps (10.0 s, 1 samples)
Double-Precision Whetstone 32731.0 MWIPS (10.0 s, 1 samples)
Execl Throughput 24319.6 lps (29.4 s, 1 samples)
File Copy 1024 bufsize 2000 maxblocks 1240097.0 KBps (30.0 s, 1 samples)
File Copy 256 bufsize 500 maxblocks 327270.0 KBps (30.0 s, 1 samples)
File Copy 4096 bufsize 8000 maxblocks 3724579.0 KBps (30.0 s, 1 samples)
Pipe Throughput 10678393.5 lps (10.0 s, 1 samples)
Pipe-based Context Switching 1837741.4 lps (10.0 s, 1 samples)
Process Creation 67289.8 lps (30.0 s, 1 samples)
Shell Scripts (1 concurrent) 29604.7 lpm (60.0 s, 1 samples)
Shell Scripts (8 concurrent) 4406.6 lpm (60.1 s, 1 samples)
System Call Overhead 8087883.0 lps (10.0 s, 1 samples)

System Benchmarks Index Values BASELINE RESULT INDEX
Dhrystone 2 using register variables 116700.0 194870992.0 16698.5
Double-Precision Whetstone 55.0 32731.0 5951.1
Execl Throughput 43.0 24319.6 5655.7
File Copy 1024 bufsize 2000 maxblocks 3960.0 1240097.0 3131.6
File Copy 256 bufsize 500 maxblocks 1655.0 327270.0 1977.5
File Copy 4096 bufsize 8000 maxblocks 5800.0 3724579.0 6421.7
Pipe Throughput 12440.0 10678393.5 8583.9
Pipe-based Context Switching 4000.0 1837741.4 4594.4
Process Creation 126.0 67289.8 5340.5
Shell Scripts (1 concurrent) 42.4 29604.7 6982.2
Shell Scripts (8 concurrent) 6.0 4406.6 7344.4
System Call Overhead 15000.0 8087883.0 5391.9
========
System Benchmarks Index Score 5748.3


Pipe-based Context Switching で、約 10% の低下、総じて、10 〜 20 % は低下している感じですかね。

(参考)
https://docs.fedoraproject.org/f27/system-administrators-guide/kernel-module-driver-configuration/Working_with_the_GRUB_2_Boot_Loader.html
https://qiita.com/tenn25/items/6fb0d846b28a06bec204