The issue of testing the actual read/write speed of a hard drive!

dengruxi

Dabbler
Joined
Mar 12, 2020
Messages
32
How can I test the real read-write speed of the disk without using memory acceleration? I used the dd command to test the data and the read was 8000MB/s and the write was 4000MB/s. This is clearly the role of memory as cache, not the true read-write speed of the hard disk!
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,970
How much RAM do you have? Exactly what dd command are you using?

Some setup things to note: Use a dataset that does not have compression (should not matter much when using if=/dev/random), use 'dd' with the random option (so the ARC will have no affect), and make.
 

dengruxi

Dabbler
Joined
Mar 12, 2020
Messages
32
How much RAM do you have? Exactly what dd command are you using?

Some setup things to note: Use a dataset that does not have compression (should not matter much when using if=/dev/random), use 'dd' with the random option (so the ARC will have no affect), and make.
The command I use is:


Write test:

dd if=/dev/zero of=/mnt/raid5/tmp. dat bs=2048k count=50k

Read test:

dd if=/mnt/raid5/tmp. dat of=/dev/null bs=2048k count=50k


How can I modify my command to get the real read and write speed of the hard disk without using memory? thank you
 

Attachments

  • QQ20230207-103811@2x.png
    QQ20230207-103811@2x.png
    53.6 KB · Views: 324
  • QQ20230207-103913@2x.png
    QQ20230207-103913@2x.png
    53.8 KB · Views: 331

HoneyBadger

actually does care
Administrator
Moderator
iXsystems
Joined
Feb 6, 2014
Messages
5,110
You could create a separate dataset, with compression disabled (to disable the compression when writing zeroes), and use the shell to disable data read caching with zfs set primarycache=metadata Poolname/Datasetname

Re-run your DD commands and the results should be closer to a "pure HDD test" - which is likely to demonstrate a worst-case scenario, as a real-world workload could benefit from both the read caching and compression on writes.

of=/mnt/raid5/tmp
I assume "RAID5" here is a pseudo-technical term, and you've configured a RAIDZ1 from within the TrueNAS UI?
 

dengruxi

Dabbler
Joined
Mar 12, 2020
Messages
32
You could create a separate dataset, with compression disabled (to disable the compression when writing zeroes), and use the shell to disable data read caching with zfs set primarycache=metadata Poolname/Datasetname

Re-run your DD commands and the results should be closer to a "pure HDD test" - which is likely to demonstrate a worst-case scenario, as a real-world workload could benefit from both the read caching and compression on writes.


I assume "RAID5" here is a pseudo-technical term, and you've configured a RAIDZ1 from within the TrueNAS UI?
"Raid5" is just my System Dataset Pool name, which is RAIDZ1,

What is the command to reopen after the shell disables the data read cache? thank you
 

Attachments

  • QQ20230207-142520@2x.png
    QQ20230207-142520@2x.png
    26.3 KB · Views: 323

HoneyBadger

actually does care
Administrator
Moderator
iXsystems
Joined
Feb 6, 2014
Messages
5,110
"Raid5" is just my System Dataset Pool name, which is RAIDZ1,

What is the command to reopen after the shell disables the data read cache? thank you
zfs set primarycache=all Poolname/Datasetname - you'll also want to reenable compression, which should be doable through the TrueNAS web UI by changing the dataset's advanced properties.
 
Top