Test Read/Write speed in FreeNAS

Navigate using the ‘cd’ command into your zpool which is in the /mnt directory.

Run the following command to test Write speed
# dd if=/dev/zero of=testfile bs=1024 count=50000

Run the following command to test Read speed
# dd if=testfile of=/dev/zero bs=1024 count=50000

The first test will write a file called ‘testfile’ to your zpool and then the second test will read back that same file. You can change the count in order to change how large a file to create.

4 thoughts on “Test Read/Write speed in FreeNAS

  1. GMxT

    Thanks for this. I use these commands, but with a block size of 1M, for testing all my storage deployments.
    With 12 SAS/SATA drives in a volume with 2x 6 Drive Z2 stripes, I get about 2.6GB/s read (10GB file) and 1.33GB/s writes (same 10GB file).

    Thanks again

  2. Randy C

    Thanks for the testing Ideas. I just built up a freenas 9.3 with 7 3TB SAS/sata drives in 5+2 Z2 configuration.
    This is what i got for the Write of a 10GB file
    # dd if=/dev/zero of=testfile bs=1M count=50000
    50000+0 records in
    50000+0 records out
    52428800000 bytes transferred in 15.151608 secs (3460279598 bytes/sec)
    so 3.46 GB/s write?

    and this was my Read….
    # dd if=testfile of=/dev/zero bs=1M count=50000
    50000+0 records in
    50000+0 records out
    52428800000 bytes transferred in 7.862175 secs (6668485512 bytes/sec)
    and 6.66 GB/s Read?

    I guess this is pretty good?
    Does this mean I have saturated my 6GB/s read bandwidth?

    just for kicks i ran it again with a 100GB file

    # dd if=/dev/zero of=testfile bs=10M count=50000
    50000+0 records in
    50000+0 records out
    524288000000 bytes transferred in 234.465797 secs (2236095869 bytes/sec)
    2.23 GB/s
    # dd if=testfile of=/dev/zero bs=10M count=50000
    50000+0 records in
    50000+0 records out
    524288000000 bytes transferred in 115.637380 secs (4533897262 bytes/sec)
    4.53 GB/s
    Still not too bad .. right?

    I never know what is good any more.

  3. NightShade

    Here is a problem with this test. The file written will be ALL ZERO’s unless you have turned compression off for the directory in question FreeNAS will burn through it very fast since it is VERY COMPRESSIBLE data.

    To do this and not have the results skewed you need to create a new dataset in the GUI and make sure to turn compression for the dataset OFF. Then run the test. It will give you a bit more of an accurate idea of what is going on. Once you are done you can remove the dataset in question.

    What people are currently getting for results is in the oh say ten SLC SSD’s in a striped array speed. That is compression at work.

    Below are some results with compression off on a seven drive raidZ3 using 4TB HGST Deskstar NAS drives.
    dd if=/dev/zero of=testfile bs=1024000 count=50000
    50000+0 records in
    50000+0 records out
    51200000000 bytes transferred in 95.467597 secs (536307623 bytes/sec)
    dd if=testfile of=/dev/zero bs=1024000 count=50000
    50000+0 records in
    50000+0 records out
    51200000000 bytes transferred in 59.494667 secs (860581335 bytes/sec)

    That is a 47.68GB file Written in 95.467597 seconds and read in 59.494667 seconds. In other terms write at 511.462805748MB/s and read at 820.714316368MB/s

  4. Peter

    Donno why but im getting 26mb/s read/write … but over samba I can saturate my Gigabit no problem writing and reading. WTF?

Leave a Reply

Your email address will not be published. Required fields are marked *