Posts

Three Things I Wish Every Storage Software Vendor Provided

In my work on SSDs, I have the opportunity to test a wide variety of storage software from parallel filesystems to high performance databases. SSD device vendors are always interested in demonstrating compatibility and (ideally) great performance at the application level. In my time working on "the other side of the wire," there are three things I wish every storage software vendor provided to benefit the relationship between SSDs, the application, and ultimately end users: 1. Create a storage-specific microbenchmark. This benchmark should use as much of the application's IO stack as possible and focus on the aspect(s) of performance most relevant to the application. It should measure a very limited number of metrics (or even a single key metric). The hardware requirements for the benchmark should be kept modest, using the minimum quantity of SSDs and servers. If your benchmark requires 6+ servers and multiple clients, few will want to run it more than once (if at all), ...

The Weight of Data

Many have claimed that SSDs become ever so slightly heavier as they're written due to the fact that programming a cell adds electrons to a floating gate or charge trap, and electrons do have mass, however small. Let's do some arithmetic to see what all that data weighs on a modern SSD. If we're being pedantic, this is actually the mass stored by Flash and not the weight of the entire SSD (the drive does not become net negatively charged). We'll assume a TLC-based "datacenter" class SSD. We know an electron weighs ~9.1 x 10^-28 grams. We just need to estimate how many electrons are contained in a full SSD. Let's do this per TB of user capacity. Due to overprovisioning, a TB will consume a larger amount of physical capacity internally. In addition, there is some spare area in each NAND page that is used for storing ECC information (such that the host data in the page can remain a power-of-two quantity). In a typical datacenter TLC drive, 1TB of user capacity...

Mixups with rwmixread

I saw an interesting question about FIO on Twitter. I will paraphrase here: I observed that tests ran against a Ceph block device with FIO using the randrw parameter produce the exact same IOPS on read and write channels, but in other IO tests with the same drive, I saw the same amount of write IOPS but much higher read IOPS. Why? The glib answer is "because that's what you told FIO to do." When using rw=randrw, the default mix of reads and writes is 50/50. FIO will dutifully enforce this ratio in terms of IOPS. Outside of FIO, there is nothing forcing a 50/50 mix of read and write IOPS and the SSD is free to service more reads if it has the bandwidth to do so. The core issue is that read and write performance of SSDs is not symmetrical, but using the rwmixread parameter binds their performance together through IOPS. This has the tendency of producing lower read IOPS than what the SSD is otherwise capable of servicing. Consider a workload that is 70% read and 30% write, b...

NVMe & sysfs

The Linux NVMe driver exports a really useful set of information to sysfs . While there's absolutely no comparison to nvme-cli's capabilities, there are a few nice things about using the information reported by sysfs to do basic inspection of the NVMe drives connected to a system. First, the information is available in user space, so super user privileges are not required. Second, there are no dependencies to download. Lastly, you can get some information that's not available in nvme-cli, or would require a set of nvme-cli commands to execute and parse. I'm often adding drives to different systems and interested in the drives' NUMA affinity and whether they negotiated to the proper PCIe generation and link width. It's very easy to retrieve this information via sysfs and print it along with other useful information about the drives such as model numbers, firmware revisions, and namespace configurations. I have a small Bash function that I use in my own custom .r...

Why SSDs "Lie" About Flush

A Flush command requests that an SSD controller writes any data held in its volatile write cache to the NAND media. The intent is to ensure that all completed writes by the controller are actually persisted to the media. I sometimes hear people complain that SSDs "lie" about the Flush command, implying some nefarious, lazy, or outright bad firmware design. The truth is that Flush is quite a pernicious operation for NAND-based SSDs, and SSD designers are forced to balance between honoring Flush as it is intended and protecting the SSD from premature wear-out in the face of excessive Flush operations. The root of the problem is the mismatch between host write units and the minimum write unit of the SSD, which is a NAND page (it could be larger depending on the controller design). Hosts typically write to SSDs in units of 4kB while a NAND page today is commonly 16kB. An SSD controller would like to accumulate enough data from the host to write out at least a single page of data ...