Skip to content

Instantly share code, notes, and snippets.

@smc181002
Created March 22, 2023 07:08
Show Gist options
  • Save smc181002/546e5fdb01db6834a6a5de760d260749 to your computer and use it in GitHub Desktop.
Save smc181002/546e5fdb01db6834a6a5de760d260749 to your computer and use it in GitHub Desktop.

Nbench

git clone https://github.com/kreier/benchmark
cd benchmark/nbench/nbench-byte-2.2.3
chmod +x ./*
make
chmod +x ./nbench

STREAM

sudo apt-get update
sudo apt-get install gfortran git g++ build-essential pkg-config -y

git clone https://github.com/jeffhammond/STREAM
cd STREAM && make

# run command
./stream_c.exe

IPerf3

sudo apt install libsctp1
wget https://iperf.fr/download/ubuntu/libiperf0_3.9-1_amd64.deb
wget https://iperf.fr/download/ubuntu/iperf3_3.9-1_amd64.deb
sudo dpkg -i libiperf0_3.9-1_amd64.deb iperf3_3.9-1_amd64.deb
rm libiperf0_3.9-1_amd64.deb iperf3_3.9-1_amd64.deb

# install breaking so run below command
sudo apt-get --fix-broken install
iperf3 --client iperf.biznetnetworks.com

HDParm

sudo hdparm -tT /dev/sda
./writebench.sh
#!/usr/bin/bash
# WRITE BENCH with DD command.
writeArr=()
echo ===Write Bench===
for n in {1..5};
do
dd if=/dev/zero of=/tmp/benchfile bs=4k count=200000 2> /tmp/out
sync
WRITE=$(sed -n '$p' /tmp/out | cut -d" " -f 10)
rm /tmp/benchfile
rm /tmp/out
echo Bench: $n - $WRITE MB/s
writeArr[${#writeArr[@]}]=$WRITE
done
sum=0
for value in "${writeArr[@]}"
do
sum=$(expr $sum + $value)
done
average=$(expr $sum / 5)
echo WRITE Average - $average MB/s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment