2

I wanted to measure my SSD read/write performance and found some recommendations for using dd and gnome-disks. (from my understanding, hdpart is not relevant since it's not using the disk itself but only cached data).

The problem is that I get different results with these tools and I wish to understand why it happens.

The rootfs is mounted from a local internal eMMC and the SSD has a mounted ext4 filesystem.

enter image description here

enter image description here

enter image description here

Thanks

1 Answer 1

2

TL;DR

Both are inappropriate way of testing storage performance. Neither says much about your system storage performance, and dd says almost nothing about you SSD performance (however, I'd prefer gnome's benchmark than dd, which is totally wrong way to measure storage).

Use fio, which is widely recognized as a correct way to test storage performance.

Explanation

Storage subsystem has a big number of different optimization options and so on.

dsync opts to use a synchronized I/O, which means its like a loop: send request, wait (poll) until completion, send next request and so on. This is slower, because in an proper async scenario you queue next request while the old one is still in flight, thus putting otherwise wasted CPU cycles into use. Also it doesn't allow you to fully use parallelism provided by modern SSDs.

Also, throughput is not the only metric of the storage, and certainly not the most important one. Incidentally, it is important for backup and file services only. Often latency is of most concern, and mentioned parallelism is appreciated. For example, it is storage latency what defines the performance of an OLTP database (adhering to ACID principle).

Also a latency and parallelism together define "I/O Operations Per Second" metric which is often used to compare storage, however that metric is also murky, because it is hard to predict what operations would be performed, and the IOPS depends on that.

Anyway, those are the metrics where SSDs really outperform rotating rust-based solutions. You can build an RAID array out of 100 HDDs which will have 10GiB/s throughput and 100-way parallelism, but still display usual HDD's latency and from that standpoint it will be less performant than 600 MiB/s SSD under some database loads.

Both your tools don't say anything about parallelism and only gnome's tool mentioned latency (they call it "access time").

fio, on the other hand, displays a latency distribution per request (essentially it's a histogram, how many requests were served under 0.1 msec, how many are between 0.1 and 0.2 and so on), so you can build a real expectation how fast your application would perform being deployed on that storage. It allows you to explore a parallelism. It even has a mode which finds queue and parallelism parameters to guarantee some set target latency, which is very useful when you need to answer questions like "how many users / concurrent requests my server will sustain without slowing down".

1
  • Thank you for your detailed reply
    – hutcruchi
    Sep 5, 2022 at 12:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .