Performance test

Fastline

Patron
Joined
Jul 7, 2023
Messages
358
Hello,

Just finished building a new 8x10TB Mini NAS for file backups. However, I'm interested in knowing the following:

- How do i test my network speed? iperf right?
- How do i test my drive/pool speed?
- How do i test the throughput/IOPS?

Thanks
 

HoneyBadger

actually does care
Administrator
Moderator
iXsystems
Joined
Feb 6, 2014
Messages
5,112
Hi @Fastline

iperf is the correct tool for testing network speed and throughput. It's installed on TrueNAS by default, and you can launch it from a shell in either server or client mode.

To test your local pool performance, you can use something like fio - the specifics are a bit to get into, but something like the following, run from inside your pool directory (eg: /mnt/yourpool/yourdataset) will test your large-file write speeds:

fio --ramp_time=5 --gtod_reduce=1 --numjobs=1 --bs=1M --size=100G --runtime=60s --readwrite=write --name=testfile

This will run a 60-second test of 1MB writes. Think of this as "how fast could I copy a large, multi-gigabyte video to the system?" If you plan to use it for smaller files, adjust the bs value.

Remote (network-connected) performance can depend on your client, as well as needing to account for the fact that you're going through a network protocol rather than communicating directly with the filesystem. Using fio remotely can work as well to test.
 

Fastline

Patron
Joined
Jul 7, 2023
Messages
358
Hi @Fastline

iperf is the correct tool for testing network speed and throughput. It's installed on TrueNAS by default, and you can launch it from a shell in either server or client mode.

To test your local pool performance, you can use something like fio - the specifics are a bit to get into, but something like the following, run from inside your pool directory (eg: /mnt/yourpool/yourdataset) will test your large-file write speeds:

fio --ramp_time=5 --gtod_reduce=1 --numjobs=1 --bs=1M --size=100G --runtime=60s --readwrite=write --name=testfile

This will run a 60-second test of 1MB writes. Think of this as "how fast could I copy a large, multi-gigabyte video to the system?" If you plan to use it for smaller files, adjust the bs value.

Remote (network-connected) performance can depend on your client, as well as needing to account for the fact that you're going through a network protocol rather than communicating directly with the filesystem. Using fio remotely can work as well to test.
Okay. Thanks for the info. I've heard about DD test. What's that?

Also, in the above command, what is size=100G here?
 

HoneyBadger

actually does care
Administrator
Moderator
iXsystems
Joined
Feb 6, 2014
Messages
5,112
dd is a much simpler direct copy program. It's useful for testing local read speeds, but it's easily fooled by ZFS's caching and transaction behavior.

For example, dd if=/dev/zero of=/mnt/yourpool/test.file bs=1M count=4000 will copy 4GB from an Input File (if) of /dev/zero (a device that simply spits out zeroes) to an Output File (of) of /mnt/yourpool/test.file, using a Block Size (bs) of 1M, and a count of 4000.

This will execute incredibly quickly, and probably give you results in the multiple-GB-per-second range - because what's happening is the inline compression of ZFS is seeing that endless string of zeroes, and compressing it down to next-to-nothing. It's then taking that result, queueing it up in a "transaction group" and asynchronously writing it to disk in the background.

Similarly, on the read side, you can dd if=/mnt/yourpool/test.file of=/dev/null bs=1M - if you've recently read from or written to that file, it might already be in RAM as part of the ZFS Adaptive Replacement Cache (ARC) and get another multi-GB read speed, because you're just reading from a file in RAM and dumping it to /dev/null (a device that does nothing and stores nothing)

The size=100G is a size threshold, if you somehow manage to have a pool that's fast enough to chew through 100G before 60 seconds are up, it will loop back through it.
 

Didellp

Cadet
Joined
Dec 28, 2023
Messages
1
Hello,

Just finished building a new 8x10TB Mini NAS for file backups. However, I'm interested in knowing the following:

- How do i test my network speed? iperf right?
- How do i test my drive/pool speed?
- How do i test the throughput/IOPS?

Thanks
Iperf is a command-line tool that measures TCP and UDP bandwidth performance. It can be used to test the performance of your network connection between two hosts.
sudo apt-get install iperf
iperf3 -c <server_ip_address> Replace <server_ip_address> with the IP address of the server that you want to test your network speed to.
 
Top