加密与未加密的EBS卷AWS [英] Encrypted Vs Unencrypted EBS Volumes AWS

查看:377
本文介绍了加密与未加密的EBS卷AWS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在测试标准EBS卷,在经过EBS优化的m3.xlarge EC2实例上对具有加密功能的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

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

请帮助我解决此问题.

解决方案

从概念上讲,这当然是出乎意料的,并且得到 Amazon EBS批量性能提供了有关EBS性能的更多详细信息通常-从这个角度来看,但纯粹出于推测,也许使用加密意味着某些默认预热Amazon EBS卷:

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

无论哪种方式,我建议在预热两个新EBS卷之后重新运行基准测试,以防您尚未这样做.

We are testing standard EBS volume, EBS volume with encryption on EBS optimized m3.xlarge EC2 instance.

While analyzing the test results, we came to know that

EBS volume with encryption is taking lesser time during read, write, read/write operations as compared to EBS without encryption. I think there will be an effect of latency on encrypted EBS volume because of extra encryption overhead on every I/O request.

What will be the appropriate reason why EBS encrypted volumes are faster than normal EBS volumes??

Expected results should be that EBS should yield better results that Encrypted EEBS.

Results :

Encrpted EBS results:

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

EBS results:

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

please help me resolve this issue.

解决方案

That's certainly unexpected conceptually and also confirmed by Amazon EBS Encryption:

[...] and you can expect the same provisioned IOPS performance on encrypted volumes as you would with unencrypted volumes with a minimal effect on latency. You can access encrypted Amazon EBS volumes the same way you access existing volumes; encryption and decryption are handled transparently and they require no additional action from you, your EC2 instance, or your application. [...] [emphasis mine]

Amazon EBS Volume Performance provides more details on EBS performance in general - from that angle, but pure speculation, maybe the use of encryption implies some default Pre-Warming Amazon EBS Volumes:

When you create any new EBS volume (General Purpose (SSD), Provisioned IOPS (SSD), or Magnetic) or restore a volume from a snapshot, the back-end storage blocks are allocated to you immediately. However, the first time you access a block of storage, it must be either wiped clean (for new volumes) or instantiated from its snapshot (for restored volumes) before you can access the block. This preliminary action takes time and can cause a 5 to 50 percent loss of IOPS for your volume the first time each block is accessed. [...]

Either way, I suggest to rerun the benchmark after pre-warming both new EBS volumes, in case you haven't done so already.

这篇关于加密与未加密的EBS卷AWS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆