加密的Vs未加密的EBS卷AWS

use*_*014 6 encryption amazon-ec2 amazon-web-services

我们正在EBS优化的m3.xlarge EC2实例上测试标准EBS卷,EBS卷和加密.

在分析测试结果的同时,我们逐渐了解了这一点

与没有加密的EBS相比,具有加密的EBS卷在读取,写入,读取/写入操作期间花费的时间更少.我认为由于每个I/O请求都有额外的加密开销,因此会对加密的EBS卷产生延迟的影响.

EBS加密卷比普通EBS卷更快的原因是什么?

预期结果应该是EBS应该产生加密EEBS的更好结果.

结果:

加载EBS结果:

sysbench 0.4.12:  multi-threaded system evaluation benchmark

Running the test with following options:
Number of threads: 8
Initializing random number generator from timer.


Extra file open flags: 16384
8 files, 512Mb each
4Gb total file size
Block size 16Kb
Calling fsync() at the end of test, Enabled.
Using synchronous I/O mode
Doing sequential write (creation) test
Threads started!
Done.

Operations performed:  0 Read, 262144 Write, 8 Other = 262152 Total
Read 0b  Written 4Gb  Total transferred 4Gb  (11.018Mb/sec)
  705.12 Requests/sec executed

Test execution summary:
    total time:                          371.7713s
    total number of events:              262144
    total time taken by event execution: 2973.6874
    per-request statistics:
         min:                                  1.06ms
         avg:                                 11.34ms
         max:                               3461.45ms
         approx.  95 percentile:               1.72ms
Run Code Online (Sandbox Code Playgroud)

EBS结果:

sysbench 0.4.12:  multi-threaded system evaluation benchmark

Running the test with following options:
Number of threads: 8
Initializing random number generator from timer.


Extra file open flags: 16384
8 files, 512Mb each
4Gb total file size
Block size 16Kb
Calling fsync() at the end of test, Enabled.
Using synchronous I/O mode
Doing sequential write (creation) test
Threads started!
Done.

Operations performed:  0 Read, 262144 Write, 8 Other = 262152 Total
Read 0b  Written 4Gb  Total transferred 4Gb  (6.3501Mb/sec)
  406.41 Requests/sec executed

Test execution summary:
    total time:                          645.0251s
    total number of events:              262144
    total time taken by event execution: 5159.7466
    per-request statistics:
         min:                                  0.88ms
         avg:                                 19.68ms
         max:                               5700.71ms
         approx.  95 percentile:               6.31ms
Run Code Online (Sandbox Code Playgroud)

请帮我解决这个问题.

Ste*_*pel 2

这在概念上肯定是出乎意料的,并且也得到了Amazon EBS 加密的证实:

[...] 并且您可以期望在加密卷上获得与未加密卷相同的预配置 IOPS 性能,并且对延迟的影响最小。您可以像访问现有卷一样访问加密的 Amazon EBS 卷;加密和解密是透明处理的,不需要您、您的 EC2 实例或您的应用程序执行任何额外操作。[...] [强调我的]

Amazon EBS 卷性能提供了有关 EBS 一般性能的更多详细信息 - 从这个角度来看,但纯粹是猜测,也许加密的使用意味着一些默认的预热Amazon EBS 卷

当您创建任何新的 EBS 卷(通用 (SSD)、预配置 IOPS (SSD) 或磁性)或从快照还原卷时,后端存储块会立即分配给您。但是,第一次访问存储块时,必须将其擦除干净(对于新卷)或从其快照实例化(对于恢复的卷),然后才能访问该块。此初步操作需要时间,并且可能会导致首次访问每个块时卷的 IOPS 损失 5% 到 50%。[...]

不管怎样,我建议在预热两个新的 EBS 卷后重新运行基准测试(如果您还没有这样做的话)。