Skip to content

Instantly share code, notes, and snippets.

@dagelf
Last active April 22, 2019 21:58
Show Gist options
  • Save dagelf/8d7e69f940f4e7ff8f7b878a1bbc65f8 to your computer and use it in GitHub Desktop.
Save dagelf/8d7e69f940f4e7ff8f7b878a1bbc65f8 to your computer and use it in GitHub Desktop.
Quick & Dirty Benchmarking

Join IRCNet #bench and post results

Harddrives

# seq read 
sudo nice --20 dd if=/dev/sdb of=/dev/null bs=1M count=1k iflag=direct
# random read
sudo nice --20 fio --name=global --rw=randread --bs=4k --direct=1 --numjobs=8 --iodepth=4 --ioengine=mmap --filename=/dev/sdb --name=job1 --runtime=10s
# or ioengine=sg but doesn't work on some mmc

Network cards

sudo nice --20 ping 192.168.1.2 -i0.01 -s11000 # ~10Mbps Full Duplex = 20Mbps
sudo nice --20 ping 192.168.1.2 -i0.01 -s55000 # ~50Mbps Full Duplex = 100Mbps
sudo nice --20 ping 192.168.1.2 -i0.001 -s6372 # 100Mbps Full Duplex = 200Mbps
sudo nice --20 ping 192.168.1.2 -i0.001 -s32000 # 512Mbps Full Duplex = 1Gbps
sudo nice --20 ping 192.168.1.2 -i0.001 -s64000 # 1024Mbps Full Duplex = 2Gbps
sudo nice --20 iperf -s # receive
sudo nice --20 iperf -c 192.168.1.2 -i0.5 # send
sudo nice --20 iperf -d 192.168.1.2 -i0.5 # both
# try -z

Ram+CPU

dd if=/dev/zero of=/dev/null bs=1M count=10k
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment