The terrible benchmarks edition.
A number of ad-hoc benchmarks I collected over time. They are terrible.
Use at your own risk. Not only your hardware may be in danger, but most of all, your reputation.
CPU (create high load)
Note this is GNU parallel (apt-get install parallel
), not the 100% incompatible moreutils parallel.
See parallel_alternatives(7); it’s quite hilarious.
parallel --line-buffer --tagstring='{#}' --max-args=0 openssl speed ::: $(seq $(nproc))
CPU (compare speed)
sysbench --num-threads=$(nproc) --test=cpu run
Newer invocation style:
sysbench --threads=$(nproc) cpu run
CPU (compare speed, single-core shitbox edition)
Cobbled this up for putting a 1993 vintage RS/6000 into perspective. Counts how many rand() / (rand() + 1) divisions the system will do in 10 second intervals.
perl -e '$o=time();$s=$o;while(10>$o-$s)
{rand()/(rand()+1);$i++;$n=time();if($n!=$o)
{printf"%i\n",$i;$i=0};$o=$n}'
Storage (throughput)
- -u $LOGNAME: Specify username explicitly (relevant when running as root)
- -f without argument: Skip character i/o tests
- -n 0: Skip file creation tests
/sbin/bonnie++ -u $LOGNAME -d . -f -n 0
Storage (filesystem)
- -u $LOGNAME: Specify username explicitly (relevant when running as root)
- -s 0: Skip the throughput test
- -n 128: Number of files times 1024, increase until the +++-outputs disappear.
/sbin/bonnie++ -u $LOGNAME -d . -s 0 -n 128