DESIGN TOOLS
storage

深入挖掘:卡桑德拉性能与美光6500离子

Ryan Meredith | July 2023

Apache Cassandra™是一个NoSQL数据库,它在全球范围内存储了大量数据.1 我的团队最近用美光6500离子对卡桑德拉进行了测试, comparing its performance to a competitor QLC drive, you can find those results in our recently published technical brief.

在测试Cassandra时,我们使用了Linux NVMe跟踪工具 eBPF2 挖掘工作负载到达磁盘时的输入/输出(IO)模式. What we found was insightful.

Average performance

When testing applications with benchmarking tools, 结果通常作为测试期间的平均关键性能指标(KPI)共享. 虽然在提供系统扩展和性能的广泛视图方面很有价值, it doesn’t really tell the whole picture. 下面是我们的结果中的一个例子:这显示了令人印象深刻的性能提升和性能降低 quality of service (QoS) latency3 over a series of tests, scaling YCSB thread count. 数据点表示4个20分钟测试在8点运行的平均性能, 16, 32, 64 and 128 YCSB threads.

Cassandra YCSB: 50%读/ 50%更新-平均读延迟vs YCSB Ops/s图

However, 当我们使用标准的Linux工具(如iostat)来查看平均磁盘吞吐量时, we see what appears to be very low performance.

At 32 YCSB threads, 在使用Micron 6500 ION的测试中,读取的平均速度为357MB/s,写入的平均速度为136MB/s. Surely NVMe SSDs are faster than that? What’s going on?

What’s going on? YCSB 50% read / 50% update at 32 Threads

From the workload trace, 我们捕获了存储设备活动的摘要,给出了20分钟运行时存储密集型工作负载的图片:

 

Cassandra, YCSB 50% R / 50% U

6500 ION

Read Block Size

100% 4KB

Total GB Read

680GB

Write Block Size

74% 508KB-512KB

Total GB written

255GB

Discard Block Size

80% > 2GB

Total GB Discard

69GB

%Read By IO Count

99.6%

% Read By Volume

68%

% Write by IO Count

0.4

% Write by Volume

25%

% Discard by IO Count

0%

% Discard by Volume

7%

 

Block size

工作负载的IO大小(块大小)将对其性能产生巨大影响. Here we see 100% 4KB reads, along with mostly 508KB and 512KB writes, with many smaller writes sprinkled in.

100% 4KB的读,以及大部分508KB和512KB的写

Throughput

Looking at time series data, we see reads maxing out at 518MB/s, with a mean of 357MB/s, which indicates the reads are stable. The mean throughput is 91,000 input/output operations per second (IOPs), which is easy for a NVMe drive to absorb.

6500 ION 4KB读:最大133k IOPs,平均91k IOPs

写很有趣,因为我们看到峰值高达5.6GB/s,接近6500 ION的最大连续性能. The write workload for Cassandra is bursty. 主要原因是memtable flush命令将内存中的更新卸载到磁盘,并尽可能快地写入. 结果是2GB/s和5 gb /s的突发写入之间的巨大差异.6GB/s over the mean throughput at 136MB/s.

6500 ION writes: 5.6 gb/s max, 136 mb/s mean graph

Latency

在观察延迟时,我们看到读的延迟峰值约为40ms,写的延迟峰值约为90ms. 写的结果是有意义的,因为周期性地发生许多大IO (512KB)写. 读取都是4KB,因此发生了一些阻塞,导致读取延迟激增.

从SSD的角度来看,这些延迟可能令人担忧, 因此,我们分析了固件中的OCP延迟监视器日志,以确定这些延迟是系统级的. 在执行memtable flush命令期间,队列很快就被填满了,系统也在不断增加. However, the SSD reports no latency outliers (>5ms) during this workload.

6500 ION reads: 100% 4kb IO, max latencies - 50ms
6500 io写入:最多512KB io,最长90ms图形

Queue depth

Finally, 系统看到的队列深度有一个有趣的节奏, 从20跳到200,有一些大尖峰到QD 800.

6500 ION QD: memtable flush spikes system QD to 800

这种行为与我们从大量大块写入中看到的延迟效应一致. memtable flush命令将大量数据写入磁盘, which causes the queue depth to grow. 如此高的队列深度可能会延迟一些4KB的IOs读取,从而导致系统级延迟峰值. Once the memtable flush operation is complete, Cassandra发出一个discard命令来清除删除的数据.

What did we learn?

Average application throughput, 延迟和磁盘IO提供了一个很好的视图,可以比较一个SSD与另一个SSD的性能,或者衡量主要硬件或软件更改对性能的影响.

Some applications, like Cassandra, 在分析平均磁盘IO时,可能看起来对存储性能不敏感, 在iostat等工具中可以看到较低的平均吞吐量. 这忽略了一个事实,即SSD在高队列深度上尽可能快地写大块数据的能力对Cassandra的性能至关重要. 要真正理解磁盘级别的工作负载,我们必须深入研究平均值.

© 2023 Micron Technology, Inc. All rights reserved. 此处的所有信息均按“现状”提供,不作任何形式的保证. 沙巴体育结算平台仅保证符合美光的生产数据表规格. 沙巴体育结算平台、程序和规格如有变更,恕不另行通知. Micron Technology, Inc. 不负责排版或摄影的遗漏或错误. 美光、美光标识和所有其他美光商标均为沙巴体育安卓版下载的财产. 所有其他商标均为其各自所有者的财产. Rev. A 01/2023 CCM004-676576390-11635

Director, Storage Solutions Architecture

Ryan Meredith

瑞安·梅雷迪思是美光存储事业部数据中心工作负载工程总监, 测试新技术,以帮助建立美光在人工智能和NVMe-oF/TCP等领域的思想领导力和意识, 以及全闪存软件定义的存储技术.