Probing My SSD's Latency
flak.tedunangst.com
flak.tedunangst.com
But in the wider world of SSD performance, you're going to want more. fio (written by Jens Axboe, who's responsible for a lot of the I/O subsystem in Linux) is the standard tool used to do benchmarking, has tons of options to control I/O mix and parallelism, captures both thruput and latency numbers, with lots of switches to control exactly what data is collected. https://github.com/axboe/fio
"Something weird going on with the 1K bucket landing at the bottom." The SSD's Flash Translation Layer will occasionally do both caching and garbage collection, leading to the weird extreme long latency outlier. The long spike at 1K is weird, but note that optimal internal write size of the SSD is probably something like 64K or 128K these days. Different SSDs will have different FTL algorithms, different overprovisioning, different internal parallelism, etc, so it can be very tricky predict actual real-life performance. https://en.wikipedia.org/wiki/Flash_memory_controller
There are also a bunch of IOs in the 0 bucket. I’m not sure how you make it from sdstrategy to sd_buf_done with the passage of no time. Perhaps the granularity if the nsecs variable’s values is rather coarse.
https://docs.aerospike.com/server/operations/plan/ssd/ssd_ce...
https://github.com/aerospike/act
If you set
max-lag-sec: 0
Then it will continue to run even if temporarily falls behind.Then reading the 4th, 5th, 6th and 7th block will have larger latency than reading the 2nd, 3rd, 8th, 9th blocks because the drive heads have to move a larger distance back and forth.
What I've found puzzling and still don't quite understand is why files on an SSD exhibit some (less, but observable) of this same behavior. There's no drive head to seek, so why does it take longer?
I've noticed this when trying to read files quickly from disk. On a HDD it is clearly faster to read blocks 1,2,3,4,5,6,7,1000,1001 and reorder then in RAM instead of having the drive head seek back and forth. But why is it also quicker to read them that way off an SSD?
You might want to try a skipping read test, ie, reading sector 1, sector +10MB, sector +1GB, etc until end of disk, to avoid the controller or OS being able to prefetch data into cache.