0

To test the write speed of a 2.5 inch SATA3 spinning hard drive (some old Seagate one) installed in my TrueNAS system I used dd if=/dev/zero of=/mnt/pool/test.dd bs=1024 count=1m (found this in several forums and posts across the Internet). This gives me speeds of 300 to 350 Megabytes per second. How can this little aged drive be so fast? Is there a caching mechanism involved?

Using the same technique I tested the write speed of a SATA3-adapted Apple PCIe-SSD. I got the same speed results of 300 to 350 Megabytes per second. In this case it seems a bit slow (I’d expect results around 500 Megabytes per second). Here my best guess is the adapter limiting the speed.

Then I used this dd command to write onto my NVME SSD getting the same speeds of 300 to 350 Megabytes per second again.

Lastly I tested a RAM disk and finally got a different speed of about 750 Megabytes per second. But 750 MB/s write speed to a RAM disk? Doesn’t sound right.

I’d say the dd testing method is inadequate. Is there a better method to test the IO speed of zpools in a TrueNAS/FreeBSD system?

Andept
  • 63
  • 4

1 Answers1

1

you can test with fio and do some benchmark.There are options to configure cache and direction with read and write.

hakkican
  • 111
  • 2
  • Thank you! I am completely confused by fio’s options. Used `posixaio` as io engine and a blocksize of 1M (like CrystalDiskMark). Getting ridiculous read speeds of around 5500 MB/s for all pools. What options should I use? – Andept May 25 '21 at 15:31
  • Have you looked here? https://askubuntu.com/questions/87035/how-to-check-hard-disk-performance – Lasse Michael Mølgaard May 26 '21 at 08:07
  • Thanks. Of these only fio is available in TrueNAS. `libaio` is not available in FreeBSD, is `posixaio` equivalent enough? – Andept May 26 '21 at 10:43
  • Replacing only `libaio` with `posixaio` and otherwise using the proposed command I get a read speed of 8037 MB/s on the spinning 2.5" hard drive. – Andept May 26 '21 at 10:44
  • I would suggest you read benchmark reports that storage vendors publish.Caching is important to do right benchmark, either hardware or software.You should consider network bandwidth, and directions; read,write or read/write kinds.There are also some methods that are specialized for NVME technology.The difficult part is there are several options out there and you have to test all and compare, each vendor comes with their specific technology but tools fortunately are the same – hakkican May 26 '21 at 12:04
  • if you start playing with kernel parameters to benchmark , vendors come with kernel-bypassing solutions, and sometimes network drivers. – hakkican May 26 '21 at 12:07
  • Thanks for your suggestion. I disabled caching with `--direct=1`. I am benchmarking locally, so don’t need to consider network bandwidth. I did consider direction; tested read. So, I did everything like I was supposed to according to many guides across the Internet. Yet, my 2.5" hard drive apparently has read speeds of over 8037 MB/s. Fair enough to ask what I did wrong, I think. – Andept May 26 '21 at 13:31
  • ". So, I did everything like I was supposed to according to many guides across the Internet. " Too strong and yet I still do not think so – hakkican May 26 '21 at 17:25
  • Will read more guides and wait for more answers here. Thank you for your effort. – Andept May 27 '21 at 14:48