Three Things are to consider: CPU, Input/Output (I/O), RAM, so three tools to know. Today we focus on this⇓ ( this is an ascii arrow, and underneath that’s a CPU )Packages to install for this article:
Debian/Ubuntu:apt-get install sysbenchFreeBSD:cd benchmarks/sysbench ; make installOSX / Other Unix ( via pkgsrc ) :cd benchmarks/sysbench ; bmake installThe need to have a single indicator to measure the performance of your computer stems from the 90′s, when PC vendors started to use the Frequency of the processor as a practical way to tell the public “This new computer is way faster than your 3 years old antiquity” Needless to say, non-PC makers were quickly to dismiss this Mega Herz Myth and were somehow right.
Sufficient to say if you boot a Intel Core 1,5 Ghz, it will be two times faster than a Pentium IV 3 Ghz, not the other way round.To benchmark the CPU we will use sysbench, a utility designed to benchmark mysql, which besides simulating OLTP transactions, can also do pure CPU benchmarking. In this mode sysbench will calculate all prime number up to 10 000, and count the time spent doing that. To be honest, I have no idea how much prime number calculation is accurate if you want to benchmark your CPU, but I know prime numer calculations are heavily used in openssl and gpg, which means SSH and HTTPS, things we use everyday. This shell one liner runs 4 sysbench tests in a loop, each time with an increasing number of threads, up to 4 of them. Why that ? Because CPU makers keep on adding more cores to the same CPU socket. At each new CPU generation cores are not so much faster, but you get always more of them ! Let us copy this in a terminal window (just copy it like this, do not care about line breaks )for THREADS in 1 2 3 4
do printf "threads: $THREADS"
sysbench --test=cpu --cpu-max-prime=10000 \
--num-threads=$THREADS run | grep "total time:"
doneRead more: jimssquare
QR:
Debian/Ubuntu:apt-get install sysbenchFreeBSD:cd benchmarks/sysbench ; make installOSX / Other Unix ( via pkgsrc ) :cd benchmarks/sysbench ; bmake installThe need to have a single indicator to measure the performance of your computer stems from the 90′s, when PC vendors started to use the Frequency of the processor as a practical way to tell the public “This new computer is way faster than your 3 years old antiquity” Needless to say, non-PC makers were quickly to dismiss this Mega Herz Myth and were somehow right.
Sufficient to say if you boot a Intel Core 1,5 Ghz, it will be two times faster than a Pentium IV 3 Ghz, not the other way round.To benchmark the CPU we will use sysbench, a utility designed to benchmark mysql, which besides simulating OLTP transactions, can also do pure CPU benchmarking. In this mode sysbench will calculate all prime number up to 10 000, and count the time spent doing that. To be honest, I have no idea how much prime number calculation is accurate if you want to benchmark your CPU, but I know prime numer calculations are heavily used in openssl and gpg, which means SSH and HTTPS, things we use everyday. This shell one liner runs 4 sysbench tests in a loop, each time with an increasing number of threads, up to 4 of them. Why that ? Because CPU makers keep on adding more cores to the same CPU socket. At each new CPU generation cores are not so much faster, but you get always more of them ! Let us copy this in a terminal window (just copy it like this, do not care about line breaks )for THREADS in 1 2 3 4
do printf "threads: $THREADS"
sysbench --test=cpu --cpu-max-prime=10000 \
--num-threads=$THREADS run | grep "total time:"
doneRead more: jimssquare
QR:
0 comments:
Post a Comment