FreeBSD Meltdown対策機能による性能影響ベンチマーク
2018年3月に入ってからFreeBSDに取り込まれたMeltdown対策機能
実行されたベンチマークはそれぞれ次のとおりです。
cd /usr/src/tools/tools/syscall_timing/ make ./syscall_timing getppid
make -C /usr/src -j48 buildworld > build.log 2>&1
ベンチマークには次のスペックのマシンが使われたと説明があります。buildworldの並列オプションが48になっているのはこのマシンのコアの数に合わせたためでしょう。
項目 | 内容 |
---|---|
プロセッサ | Intel Xeon E5-2650 v4 (24 cores@2. |
メモリ | 256GB DDR4 ECC RAM |
ストレージ | 2. |
ベンチマークは次の4つのパターンで実施されています。PTIが有効化どうかがMeltdown対策機能が有効になっているかどうか、
パターン | PTI | PCID | ministat(1)出力 |
---|---|---|---|
1 | 無効 | 無効 | x |
2 | 無効 | 有効 | + |
3 | 有効 | 無効 | * |
4 | 有効 | 有効 | % |
ベンチマーク結果はそれぞれ次のとおりです。
x pti-off-pcid-on.log + pti-off-pcid-off.log * pti-on-pcid-off.log % pti-on-pcid-on.log +------------------------------------------------------------------------+ | * % * | | * % * | | * % * | | * % * | | * %% ** | | * +x + x %% % *O * *| ||_MA_|| |__M__A____| |___M___A_______| | +------------------------------------------------------------------------+ N Min Max Median Avg Stddev x 10 118 162 118 123.9 14.192721 + 10 118 154 118 122.5 11.42366 No difference proven at 95.0% confidence * 10 339 454 340 356.4 37.883447 Difference at 95.0% confidence 232.5 +/- 26.8779 187.651% +/- 29.8653% (Student's t, pooled s = 28.6058) % 10 262 342 262 272.2 25.301735 Difference at 95.0% confidence 148.3 +/- 19.2744 119.693% +/- 21.5323% (Student's t, pooled s = 20.5135)
x real-pti-off-pcid-on.log + real-pti-off-pcid-off.log * real-pti-on-pcid-off.log % real-pti-on-pcid-on.log +------------------------------------------------------------------------+ | x + % x % + % * * + x *| ||______________|_|___M_A__AMAM|___|____M_|_____|_A__________________| | +------------------------------------------------------------------------+ N Min Max Median Avg Stddev x 3 1677.08 1712.18 1691.4 1693.5533 17.6488 + 3 1686.9 1706.72 1697.84 1697.1533 9.9278262 No difference proven at 95.0% confidence * 3 1703.57 1729.55 1705.3 1712.8067 14.52593 No difference proven at 95.0% confidence % 3 1688.69 1701.44 1695.96 1695.3633 6.3959075 No difference proven at 95.0% confidence
x user-pti-off-pcid-on.log + user-pti-off-pcid-off.log * user-pti-on-pcid-off.log % user-pti-on-pcid-on.log +--------------------------------------------------------------------------+ | *+ x % % +x % * * *| ||_|__M____MA_A_|______M_|_A__________| |___MA_____|| +--------------------------------------------------------------------------+ N Min Max Median Avg Stddev x 3 50223.23 50409.49 50273.89 50302.203 96.303845 + 3 50226.37 50401.75 50230.85 50286.323 99.98752 No difference proven at 95.0% confidence * 3 50754.05 50842.26 50781.66 50792.657 45.121459 Difference at 95.0% confidence 490.453 +/- 170.45 0.975014% +/- 0.341564% (Student's t, pooled s = 75.201) % 3 50342.4 50535.65 50380.41 50419.487 102.37983 No difference proven at 95.0% confidence
x sys-pti-off-pcid-on.log + sys-pti-off-pcid-off.log * sys-pti-on-pcid-off.log % sys-pti-on-pcid-on.log +--------------------------------------------------------------------------+ |+x + x+x % %% * * * | ||_|____A__A___M|__| |_____A_M__| |__________A_M_______|| +--------------------------------------------------------------------------+ N Min Max Median Avg Stddev x 3 2623.5 2658.68 2652.31 2644.83 18.74489 + 3 2620.79 2654.58 2637.55 2637.64 16.89518 No difference proven at 95.0% confidence * 3 2740.31 2787.22 2772.59 2766.7067 24.002026 Difference at 95.0% confidence 121.877 +/- 48.8099 4.60811% +/- 1.87816% (Student's t, pooled s = 21.5345) % 3 2710.22 2733.57 2730.79 2724.86 12.75458 Difference at 95.0% confidence 80.03 +/- 36.338 3.0259% +/- 1.40248% (Student's t, pooled s = 16.032)
ベンチマークの結果、
- PTIを有効にすることでシステムコールの時間が100%以上増加している
- PTIとPCIDを有効にした場合とそうでない場合のbuildworldを比較した結果、
実時間とユーザ時間に関しては統計上有意義な差は認められなかったが、 システム時間は5%ほど遅くなった
Meltdown対策のためにPTIを実装した場合、
Spectreセキュリティ脆弱性への対処は、
BSD界隈四方山話終了のお知らせ
BSD界隈四方山話は今回で終了です。2015年5月1日にはじまり、
全国にお届けすることは難しいのですが、
今後も週に1回くらいのペースで*BSDの情報をお知らせする活動を続けていきたいとは考えています。今のところ次の媒体は見つかっていません。興味がございましたら@daichigotoまでメッセージをいただければと思います。
FreeBSD勉強会
4月26日(木)19:00~ 第70回 - ヴァル研 セミナールーム
【sysctl(8)からカーネルの中身を追う】
*BSDに限らず、
また、
【AsiaBSDCon 2018復習】
AsiaBSDCon 2018で発表された内容を振り返ります。どんな発表内容だったかちょっと理解が追いつかなかった、
本勉強会への参加者には抽選か勝ち抜きかでデーモンTシャツなどのグッズをお渡しします :)
参加登録はこちらから。
FreeBSD勉強会 発表者募集
FreeBSD勉強会では発表者を募集しています。FreeBSDに関して発表を行いたい場合、