因此,我最近(2018年1月初)收到了我的Fedora 26笔记本电脑的内核更新,其中包括修正熔毁虫熔毁虫的KPTI内核修复。我听到了很多关于这些补丁对Linux系统的影响的猜测;的确,英特尔似乎相信皇帝的衣冠楚楚。从链接中可以看出,业内的一些消息来源(尤其是苹果、微软、亚马逊和谷歌)声称,影响可以忽略不计--参见此链接。其他的索赔巨大影响。
我不满足于我在新闻报道中看到的混乱,我想知道,“我的机器将受到什么真正的影响?”我问。理论上,CPU绑定进程的影响可以忽略不计,而执行大量系统调用(例如磁盘或网络i/o )的进程将受到更多的影响。
我在下面回答自己。
我还没有看到更多现代处理器的基准;这将是非常有趣的,因为我听说过“...the较新的处理器不会有巨大的损失”是那些处理器,怎么不是-巨大不是很大?我有一个较老的联想Thinkpad T430S与英特尔i5-3210m双核(每个核心2个线程)处理器。关于熔毁及其修复问题,这是现代的还是不现代的?据微软称,“.(它)说,2015年或更早运行Windows 7、8和10处理器的消费类设备更有可能出现减速。”但英特尔的自己的基准测试似乎没有显示出2015和2017年处理器之间的区别。
发布于 2018-01-16 00:33:20
在启动新内核之前,我想得到一些真实的数字。我将内核从4.14.8升级到4.14.11。后者包括KPTI修复崩溃漏洞。我有一个较老的联想Thinkpad T430S与英特尔i5-3210m双核(每个核心2个线程)处理器。结果很有趣,所以我想我应该把它们张贴在这里。
我执行了三个基准:
结果如下。除了一些令人惊讶的值(辅助循环/秒和目录操作AIM9基准,块顺序输出bonnie++基准都显示了更好的性能),该系统似乎受到了一些打击。我发现gcc编译相当有趣,因为编译同时涉及很多文件i/o和CPU操作。这些事情和我经常在机器上做的任务很相似。无论如何,这3组基准似乎都在一件事上达成了一致:自从安装KPTI熔毁修复内核以来,我的系统总体上受到了可衡量的打击--甚至是整数和浮点操作。我现在要花172分钟才能完成gcc的一篇160分钟的汇编。真扫兴。
AIM9 benchmark
AIM Independent Resource Benchmark - Suite IX v1.1, January 22, 1996
Copyright (c) 1996 - 2001 Caldera International, Inc.
All Rights Reserved
BEFORE:
Machine's name : rodin
Machine's configuration : kernel_4.14.8-200
Number of seconds to run each test [2 to 1000] : 10
Path to disk files : /var/tmp/aim9
AFTER:
Machine's name : rodin
Machine's configuration : kernel_4.14.11-200
Number of seconds to run each test [2 to 1000] : 10
Path to disk files : /var/tmp/aim9注意: AIM9基准测试有一个错误,在编译时,不允许完成其中一个测试。为了让它运行,我不得不更改creat-clo.c上的第97行,如下所示:
static int sigcount; /* count of signals */对此:
volatile static int sigcount; /* count of signals */以下是我的基准测试结果:
AIM9 Benchmark
BEFORE AFTER Percent Change Description
01 1.996 M 1.929 M -3.34 Thousand Double Precision Additions/second
02 1.980 M 1.945 M -1.75 Thousand Single Precision Additions/second
03 8.559 M 8.259 M -3.50 Thousand Long Integer Additions/second
04 8.592 M 8.280 M -3.63 Thousand Integer Additions/second
05 8.599 M 8.268 M -3.85 Thousand Short Integer Additions/second
06 205400.00 190400.00 -7.30 File Creations and Closes/second
07 552330.00 384665.33 -30.35 System Allocations & Pages/second
08 2.844 M 1.373 M -51.71 System Memory Allocations/second
09 75.980 M 74.623 M -1.78 Non-local gotos/second
10 1.131 M 651400.00 -42.43 Signal Traps/second
11 855.64 787.71 -7.93 Program Loads/second
12 3246.75 3846.15 18.46 Task Creations/second
13 166307.40 154135.80 -7.31 Link/Unlink Pairs/second
14 504839.16 369664.00 -26.77 Random Disk Reads (K)/second
15 451072.00 339628.37 -24.70 Random Disk Writes (K)/second
16 3.285 M 1.765 M -46.24 Sequential Disk Reads (K)/second
17 698880.00 598528.00 -14.35 Sequential Disk Writes (K)/second
18 537088.00 431616.00 -19.63 Disk Copies (K)/second
19 115.78 116.58 .69 Sync Random Disk Writes (K)/second
20 116.42 114.75 -1.43 Sync Sequential Disk Writes (K)/second
21 116.05 114.90 -.99 Sync Disk Copies (K)/second
22 79020.00 73711.29 -6.71 Directory Searches/second
23 311100.00 299400.00 -3.76 Thousand Double Precision Divides/second
24 316483.52 305694.31 -3.40 Thousand Single Precision Divides/second
25 105284.72 101688.31 -3.41 Thousand Long Integer Divides/second
26 294660.00 286470.00 -2.77 Thousand Integer Divides/second
27 290700.00 282420.00 -2.84 Thousand Short Integer Divides/second
28 424.140 M 407.756 M -3.86 Function Calls (no arguments)/second
29 462.336 M 448.460 M -3.00 Function Calls (1 argument)/second
30 485.198 M 472.115 M -2.69 Function Calls (2 arguments)/second
31 236.441 M 226.969 M -4.00 Function Calls (15 arguments)/second
32 195.30 186.63 -4.43 Integer Sieves/second
33 1.202 M 1.160 M -3.48 Thousand Double Precision Multiplies/second
34 1.204 M 1.166 M -3.18 Thousand Single Precision Multiplies/second
35 1.396 M 1.359 M -2.69 Thousand Long Integer Multiplies/second
36 1.396 M 1.357 M -2.83 Thousand Integer Multiplies/second
37 1.365 M 1.327 M -2.78 Thousand Short Integer Multiplies/second
38 554540.00 538080.00 -2.96 Numeric Functions/second
39 1.614 M 1.561 M -3.28 Zeros Found/second
40 2.513 M 2.431 M -3.28 Trigonometric Functions/second
41 18.605 M 17.861 M -4.00 Point Transformations/second
42 3880.00 3766.00 -2.93 Linear Systems Solved/second
43 28060.00 26980.00 -3.84 String Manipulations/second
44 14.751 M 14.373 M -2.55 Dynamic Memory Operations/second
46 5277.00 5121.00 -2.95 Sort Operations/second
47 4231.00 10771.00 154.57 Auxiliary Loops/second
48 2.828 M 2.900 M 2.54 Directory Operations/second
49 137.36 156.70 14.07 Shell Scripts/second
50 137.16 157.64 14.93 Shell Scripts/second
51 137.60 161.90 17.65 Shell Scripts/second
52 44.497 M 42.774 M -3.87 Series Evaluations/second
53 1.092 M 607030.00 -44.43 Shared Memory Operations/second
56 1.318 M 825670.00 -37.38 FIFO Messages/second
57 922370.00 664690.00 -27.93 Stream Pipe Messages/second
58 866290.00 632950.00 -26.93 DataGram Pipe Messages/second
59 1.922 M 1.038 M -45.96 Pipe Messages/second
60 19725.935 M 18947.483 M -3.94 Memory to Memory Copy/second
=========================================================================================================
GCC compile, both "configure" and "make"
Results summary::
configure: 38% real slowdown
make (x86_64 only): 7.7% real slowdown, 5.5% user CPU slowdown
BEFORE AFTER
time ../gcc-7.2.0/configure --disable-multilib | time ../gcc-7.2.0/configure --disable-multilib
... | ...
configure: creating ./config.status | configure: creating ./config.status
config.status: creating Makefile | config.status: creating Makefile
|
real 0m2.467s | real 0m3.420s
user 0m1.835s | user 0m1.936s
sys 0m1.108s | sys 0m1.295s
|
time make | time make
... | ...
real 160m8.766s | real 172m28.158s
user 152m11.430s | user 163m34.790s
sys 6m41.507s | sys 7m5.214s
=========================================================================================================
BONNIE++
Version: 1.97
See https://www.coker.com.au/bonnie++/experimental/ . This version was provided by my Fedora distribution.
Run using: bonnie++ -n 1024
Sample results:
BEFORE AFTER % change from before
Sequential Output, per char 1115 K/s 890 K/s -20
Sequential Output, block 358891 K/s 461208 K/s +28
Sequential Input, per char 4181 K/s 1989 K/s -52
Sequential Input, block 515347 K/s 521646 K/s -1,2
Random Seeks 5651 /s 5221 /s -7.6
Sequential Create, Create 41855 /s 40751 /s -2.74
Read 741945 /s 624554 /s -15.8
Delete 79832 / s 78340 /s -1.9
Random Create, Create 41198 /s 41003 /s -0.47
Read 741945 /s 719494 /s -3.02
Delete 61154 /s 60698 /s -0.74邦妮的调查结果可在以下网址查阅:
以前:https://bintray.com/greygnome/generic/download_档案?档案_path=bon_结果_在此之前_kpti.html
后:https://bintray.com/greygnome/generic/download_档案?档案_path=bon_结果_之后_kpti.html
https://unix.stackexchange.com/questions/417384
复制相似问题