Showing results for 
Search instead for 
Did you mean: 

Test CPU's

Go to solution
Nobody's Hero
Valued Contributor

Test CPU's

Besides using the hardware tests via hp tools,
is there a way I can run some kind of script that will push all my cpus at the same time and see how they perform?
Like a stress tester..or something to that effect?
Geoff Wild
Honored Contributor

Re: Test CPU's

Here's a couple of cpu loade scripts:


while true;do
a=$(( 24353.345 / 3254.65 ))

# cat cpu_load_gen_li.ksh

while true; do
while [ $i -le 100000 ];do
a=$(( 20002344353.345 / 3254.65 ))
i=$(( $i + 1 ))
sleep 1

Run them in the background, then kill %1 and or 2 to end them...

Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Dennis Handly
Acclaimed Contributor

Re: Test CPU's

>run some kind of script that will push all my CPUs at the same time and see how they perform?

Unless you are measuring the heat output, you can't see how they perform unless you have a known workload. Unless you have other work to be done at the same time?
Hein van den Heuvel
Honored Contributor

Re: Test CPU's

Dennis, you should get negative points for destroying a happy go lucky fantasy by bringing in reality and practicalities. Don't try to confuse us with facts!

Nobody's Hero, seriously now, reflect on your question and the answers it solicits such as the one provided by my friend Geoff. So that CPU now looks 100% busy. Now what? What does that tell you? How can you tell what is good or bad?

You need something specific you'd like to evaluate, and define a benchmark of some sort to measure that. The thing to measure should preferably be somewhat related to what the machine will be used for and for which clever software can not make a shortcut. At best a busy loop can be used to measure the impact it has on real work.
Suggestion: time how often you can compress a good sized sample file onto /dev/null. Compare between old and new (box, os). Compare 1 stream versus many.
Or compile a good sized set of program over and over.
Or tell Oracle to fetch a rock from its caches over and over.

And if you go with a trivial hard counter, then at least report the time it took to count to a gazillion, or the inverse: how high it counted every minute or so.

Google for some benchmark, where there might be existing results from comparable platforms. My first google hit for this is "lmbench" ( )
but it's results are sadly dated.
There are others, but there is little point in searching without knowing what you are really looking for. One would become nobody's hero for trying that.

best regards,
Hein van den Heuvel
HvdH Performance Consulting.