【问题标题】:New AWS EC2 EBS gp3 volumes are slow新的 AWS EC2 EBS gp3 卷速度很慢
【发布时间】:2021-04-12 17:53:55
【问题描述】:

针对卷运行 sysbench 我发现 gp3 卷要慢得多。即使我在等待优化后预置了 16000 IOPS 的卷,在通过 Percona PMM、New Relic CloudWatch 进行监控时,我也获得了 1000 IOPS 的上限。

实例:

  • C5.4xlarge Ubuntu 18.04

卷:

  • gp2 3000GB(提供 9000 IOPS)
  • gp3 3000GB 9000 IOPS 250/s

Sysbench 结果如下:

sysbench --file-total-size=15G --file-num=16 fileio prepare
sysbench --file-total-size=15G --file-num=16 --file-test-mode=rndrw --time=600 fileio run
sysbench --file-total-size=15G --file-num=16 fileio cleanup

gp3 | 9000 | 3000 | 250/s

File operations:
reads/s: 576.37
writes/s: 384.24
fsyncs/s: 153.70

Throughput:
read, MiB/s: 9.01
written, MiB/s: 6.00

General statistics:
total time: 600.0333s
total number of events: 668612

Latency (ms):
min: 0.00
avg: 0.90
max: 337.40
95th percentile: 3.89
sum: 599693.33

Threads fairness:
events (avg/stddev): 668612.0000/0.00
execution time (avg/stddev): 599.6933/0.00

gp2 | 9000 | 3000 | gp2

File operations:
reads/s: 1523.68
writes/s: 1015.79
fsyncs/s: 406.33

Throughput:
read, MiB/s: 23.81
written, MiB/s: 15.87

General statistics:
total time: 600.0064s
total number of events: 1767487

Latency (ms):
min: 0.00
avg: 0.34
max: 70.10
95th percentile: 1.06
sum: 599390.12

Threads fairness:
events (avg/stddev): 1767487.0000/0.00
execution time (avg/stddev): 599.3901/0.00

Percona PMM gp3 > gp2对比:

【问题讨论】:

  • 您可能会得到更好的回应:reddit.com/r/aws
  • 我也在为gp3 卷做基准测试。但是,我观察到相反的情况:gp3 的延迟比gp2 少。您在哪个地区开展业务?
  • 由于存储空间的分配,首次使用块时,Amazon EBS 卷需要稍长的时间。在执行性能测试之前,建议将磁盘内容清零(例如使用dd)。这将提供一致的性能。见:Initializing Amazon EBS volumes - Amazon Elastic Compute Cloud

标签: amazon-web-services amazon-ec2 amazon-ebs sysbench


【解决方案1】:

有人对此有想法吗?我也在 AWS 论坛上发帖,没有任何回应。

除了我将 gp3 卷增加到 16000 IOPS 和 1000/s 吞吐量之外,这里还有一些与上述相同卷的测试结果,但仍然得到更差的结果。

  • 在 gp2s 上连续写入 2 倍性能
  • 顺序读取 = 性能
  • 随机写入 = 性能
  • gp2s 上的随机读取性能是 2 倍
  • gp2s 上的顺序读/写性能 +50%

图片左侧是 2 个 gp3 卷,右侧是旧 gp2。如果有两个驼峰,第一个是编写 sysbench 测试文件,第二个是测试。

Sequential Writes

Sequential Reads

Random Writes

Random Reads

Sequential Read/Writes

谢谢,杰里米

【讨论】:

    【解决方案2】:

    我最初对 gp3 的热情因 gp2 的劣势而受到抑制,但是,当我在 C5、M5 和 M5A 实例类型上设置相同的大小、IOPS 和带宽时,我从fio 获得了类似的性能测量结果:@ 987654321@

    我正在 CentOS 7.8 上进行测试,fio-3.7-2.el7.x86_64。地区us-east-1.

    您确定 sysbench 是正确的基准测试工具吗? fileio 选项似乎没有详细记录,在更改同步模式、标志等时我会得到截然不同的结果。

    由于默认值,您的示例命令与此等效:

    sysbench --file-total-size=15G --file-num=16 --file-test-mode=rndrw --file-io-mode=sync --file-rw-ratio=1.5 --file-fsync-freq=100 --max-requests=0 --time=600 fileio run
    

    当我运行不同的 sysbench 命令时,特别是使用 direct 访问和 fsync=off

    sysbench fileio --file-total-size=15G --file-test-mode=rndrw --time=600 --max-requests=0 --file-io-mode=async --file-extra-flags=direct  --file-num=16 --file-rw-ratio=1 --file-fsync-freq=0 run
    

    我从 gp2 和 gp3 获得了相同的性能。 (其实gp3稍微好一点)。

    这是我的fio 数据的摘要,使用命令

    fio --rw=TEST --direct=1 --ioengine=libaio --bs=16k --numjobs=8 --size=1G --group_reporting

    使用 TEST={read,write,randread,randwrite,randrw}

    gp2:

    gp2-randread-16k.out:   read:   IOPS=3081,  BW=48.2MiB/s  (50.5MB/s)(8192MiB/170117msec)
    gp2-randrw-16k.out:     read:   IOPS=1540,  BW=24.1MiB/s  (25.2MB/s)(4095MiB/170121msec)
    gp2-randrw-16k.out:     write:  IOPS=1541,  BW=24.1MiB/s  (25.2MB/s)(4097MiB/170121msec)
    gp2-randwrite-16k.out:  write:  IOPS=3081,  BW=48.2MiB/s  (50.5MB/s)(8192MiB/170116msec)
    gp2-read-16k.out:       read:   IOPS=3090,  BW=48.3MiB/s  (50.6MB/s)(8192MiB/169642msec)
    gp2-write-16k.out:      write:  IOPS=3081,  BW=48.2MiB/s  (50.5MB/s)(8192MiB/170115msec)
    

    gp3:

    gp3-randread-16k.out:   read:   IOPS=3080,  BW=48.1MiB/s  (50.5MB/s)(8192MiB/170188msec)
    gp3-randrw-16k.out:     read:   IOPS=1539,  BW=24.1MiB/s  (25.2MB/s)(4095MiB/170238msec)
    gp3-randrw-16k.out:     write:  IOPS=1540,  BW=24.1MiB/s  (25.2MB/s)(4097MiB/170238msec)
    gp3-randwrite-16k.out:  write:  IOPS=3082,  BW=48.2MiB/s  (50.5MB/s)(8192MiB/170073msec)
    gp3-read-16k.out:       read:   IOPS=3089,  BW=48.3MiB/s  (50.6MB/s)(8192MiB/169719msec)
    gp3-write-16k.out:      write:  IOPS=3083,  BW=48.2MiB/s  (50.5MB/s)(8192MiB/170053msec)
    

    【讨论】:

    • 让我更加困惑的是,ioping 的测试始终显示gp3 的平均延迟是gp2 的两倍。在使用fio 进行测试时,我看不到任何延迟差异,也没有任何其他指标(IOPS、吞吐量)。
    • 嗨,Matt,是的,我用 fio 进行了同等测试,得到了更一致的结果,尽管 16000IOPS 的 GP3 的性能并不比 9000IOPS 的 GP2 好多少。我最初使用 sysbench,因为这些是 MySQL 服务器,我喜欢使用 sysbench 运行检查以了解 MySQL。最后,我认为它们是合适的替代品,但不提供所述的性能提升。注意:AWS 支持人员表示他们正在调查 GP3 延迟的不一致问题,因此希望得到修复。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-10-07
    • 2021-12-29
    • 1970-01-01
    • 2021-02-07
    • 2017-01-26
    相关资源
    最近更新 更多