I recently picked up a battery powered USB cell phone charger and I'm running some tests to see what kind of battery life I will get. Right now I'm just testing at Idle. I want to also run a test using as many resources as possible. It seems easy enough to use prime95, or run a program with a busy while loop to test the CPU, but Is there something I can run to max out the GPU as well? Are there any other recommended programs that I can use to run the Pi at full capacity?

6 Answers 6


Whbn the foundation announced the enhanced overclocking support they mentioned running quake 3 was a good test of the improved performance. This forum post has the installation details.


You can perform a Raspberry PI stresstest with the sysbench tool.

First example calculate primes

sysbench --test=cpu --cpu-max-prime=20000 run

Second example test the I/O Output of your Raspberry Pi

sysbench --test=fileio --file-total-size=2G prepare
sysbench --test=fileio --file-total-size=2G --file-test-mode=rndrw --init-rng=on --max-time=300 --max-requests=0 run
sysbench --test=fileio --file-total-size=2G cleanup

Third example memory read and write

sysbench --test=memory run --memory-total-size=2G
sysbench --test=memory run --memory-total-size=2G --memory-oper=read
  • 1
    here is one example of how to use sysbench for a temperature test: youtu.be/1AYGnw6MwFM?t=501
    – Fabian
    Commented May 21, 2018 at 21:39
  • 1
    Buster had an older version of sysbench for me (0.4.12) so I had to change --cpu-max-prime=20000 to --max-requests=20000
    – Ryall
    Commented Oct 28, 2019 at 12:38

I wrote the little command-line tool stressberry the other day which stresses your Raspberry, measures the core temperature, and produces nice plots. Install with

pip install stressberry --user

and run with

stressberry-run out.dat
stressberry-plot out.dat -o out.png

enter image description here


For the CPU and most other things you can use

nice -19 stress-ng -c 4 --metrics --timeout 60s

For the GPU they suggest GeeXLab at geeks3d.com.


XBMC doing multimedia decoding might be a good test as well as the UI there is in OpenGL. A game that constantly hammers the frame buffer (memory!) while including a numerical simulation like OpenTTD is also a pretty good test. The generic Dhrystone and Whetstone benchmarks might also be good. There's an OpenGL game I'm working on porting called Armagetron Advanced (which isn't really ready yet, sadly) that uses both the GPU and CPU quite heavily. That'd probably be perfect once it's done.

On a side note, if you're worried about the Pi cutting out on battery power, it might be worth investigating the MoPi board. It monitors voltage and a daemon running in the background will trigger a clean shut down when it's out of power.


Either of these two: for i in 1 2 3 4 ; do nice -n 20 openssl speed >/dev/null 2>&1 & done or for i in 1 2 3 4 ; do nice -n 20 cat /dev/zero > /dev/null & done will suffice, though the former will exercise RAM more. Use a media player to decode a matroska .mkv file concurrently, and you’ll have a nice fat peak load. nice will keep your Pi responsive enough to let you do a for pid in $( jobs -p ) ; do kill -9 $pid ; done, flushing the bowl like a big boy. Set it as a function: killalljobs() { for pid in $( jobs -p ) ; do kill -9 $pid ; done ; }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.