Hi Felix,

On Tue, Jan 16, 2024 at 04:50:01PM -0500, Felix Miata wrote:
> What can I use to test what its write speed is? I'm not seeing any option to 
> do so
> in hdparm.

The king of storage performance testing is "fio". It's packaged in
Debian. It's really worth learning a bit about.

What sort of performance were you looking to test?

Bear in mind that not all IO is the same and can have vastly
different performance characteristics. For example, reading data is
generally faster than writing data, because you can take advantages
of several layers of caching in Linux and in your drives.

On HDDs, a streaming read will be much faster than a random read,
because the drive head will get into position once and stream the
data from there, as opposed to having to seek about the platters.
Less of a concern for non-rotational media.

Small writes will go into Linux's buffers and drive buffers and
appear to happen at memory speed, until those buffers are full,
and then you'll start to see the real ability of the underlying
drives. Various types of write IO, e.g. synchronous, bypass cache
and will be slower from the start. There are options for fio to
simulate that.

Typically you care about:

- random read and random write performance as measured in IO
  operations per second (IOPS) at a given mix of read/write and IO
  size, e.g. "100% randreads at 4KiB"

- streaming (sequential) read and write bandwidth in MB/sec at a
  given IO size

- Different levels of concurrency, e.g. queue depth of 1, 8, 64…

A modern HDD doesn't have much concurrency for the simple reason
that it generally has just one arm, whereas a modern NVMe may have
a queue depth of 64 or more.

You might expect 150 IOPS and 150MB/s 4K streaming read out of a
decent HDD, and thousands or millions of IOPSs and more than a GB/s
out of a modern NVMe.

Drive manufacturers often list IOPS and MB/sec figures for 4K IOs in
their spec sheets.

You can target fio at your underlying drives, or at any other block
device, so you can test filesystems, RAID arrays, zfs, etc. Though
obviously the write tests will write data and may destroy the
contents of the device unless done in a filesystem directory.

Thanks,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting

Reply via email to