Whenever I spin up a new server/VM/cloud instance/etc the first thing I like to do is get a sense of the performance. Typically I will run this:
dd if=/dev/zero of=test bs=64k count=16k conv=fdatasync && dd if=test of=/dev/null bs=64k && rm -f test
It’s a simple, easy, and non intrusive way to test the write and read speeds of your system. It writes a 1GB test file, it reads that 1GB test file, and then deletes the test file. Since it it just a simple “dd” command it will work on literally any Linux system straight out of the box whether it’s a server, a VM, or a Raspberry Pi.
Example output:
user@server# dd if=/dev/zero of=test bs=64k count=16k conv=fdatasync && dd if=test of=/dev/null bs=64k && rm -f test
16384+0 records in
16384+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 3.96363 s, 271 MB/s
16384+0 records in
16384+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 1.35661 s, 791 MB/s
In this example the host is getting 271MB/s write speeds and 791MB/s read speeds; pretty nice.
Then I will typically run this to test the network speeds:
wget -q --show-progress -O /dev/null https://proof.ovh.net/files/1Gb.dat
If you are not getting great speeds to OVH you can try another host like Hetzner:
wget -q --show-progress -O /dev/null https://fsn1-speed.hetzner.com/1GB.bin
Example output:
root@racktalk-test:~# wget -q --show-progress -O /dev/null https://fsn1-speed.hetzner.com/1GB.bin
/dev/null 100%[================================================>] 1.00G 22.6MB/s in 60s
In this example the host is hitting download speeds of 22.6 MB/s (180.8 Mbit/s)
What do you use to “benchmark” a new host to get a general idea on how it’s performing?