DEV Community

Mahinsha Nazeer
Mahinsha Nazeer

Posted on • Originally published at Medium on

Raspberry Pi 5 Thermal Showdown: Active Cooler vs Passive Cooling

For this benchmark, I’m using a Raspberry Pi 5 (4GB model) paired with the official Raspberry Pi active cooler to evaluate thermal and performance differences.

This Bash script automates a basic benchmark test on a Raspberry Pi. It evaluates CPU performance and thermal behavior, focusing on throttling and temperature changes.

#!/bin/bash

echo "==== Starting Raspberry Pi Benchmark ===="
echo "Timestamp: $(date)"
echo "Initial Temp: $(vcgencmd measure_temp)"
echo "Initial Throttle Status: $(vcgencmd get_throttled)"

echo -e "\n>> Running sysbench (CPU performance)"
sysbench cpu --cpu-max-prime=20000 run

echo -e "\n>> Running stress-ng (5 min stress test)"
stress-ng --cpu 4 --timeout 300 --metrics-brief

echo -e "\n>> Temperature After Stress Test:"
vcgencmd measure_temp

echo -e "\n>> Throttling Check:"
vcgencmd get_throttled

echo "==== Benchmark Complete ===="

Enter fullscreen mode Exit fullscreen mode

The script begins by fetching and displaying the Raspberry Pi’s initial CPU temperature usingvcgencmd, followed by an initial throttle status check to determine if the system has experienced any power or thermal throttling. It then runs a CPU benchmark using sysbench, which calculates prime numbers up to 20,000 to simulate CPU load. After that, it executes a 5-minute stress test using stress-ng with 4 CPU threads; the the --metrics-brief flag provides a summarised performance report. Once the test completes, the script logs the CPU temperature again and performs a final throttle status check to identify any new throttling events triggered during the stress test.

Below are the benchmark results for both scenarios. The first set of results reflects performance without the active cooler, while the second set includes the active cooler installed.

root@master2:/home/admin# ./benchtest.sh 
==== Starting Raspberry Pi Benchmark ====
Timestamp: Fri 23 May 11:41:49 IST 2025
Initial Temp: temp=49.4'C
Initial Throttle Status: throttled=0x0

>> Running sysbench (CPU performance)
sysbench 1.0.20 (using system LuaJIT 2.1.0-beta3)

Running the test with following options:
Number of threads: 1
Initializing random number generator from current time

Prime numbers limit: 20000

Initializing worker threads...

Threads started!

CPU speed:
    events per second: 1038.16

General statistics:
    total time: 10.0002s
    total number of events: 10383

Latency (ms):
         min: 0.96
         avg: 0.96
         max: 2.72
         95th percentile: 0.95
         sum: 9998.14

Threads fairness:
    events (avg/stddev): 10383.0000/0.00
    execution time (avg/stddev): 9.9981/0.00

>> Running stress-ng (5 min stress test)
stress-ng: info: [4297] setting to a 300 second (5 mins, 0.00 secs) run per stressor
stress-ng: info: [4297] dispatching hogs: 4 cpu

stress-ng: metrc: [4297] stressor bogo ops real time usr time sys time bogo ops/s bogo ops/s
stress-ng: metrc: [4297] (secs) (secs) (secs) (real time) (usr+sys time)
stress-ng: metrc: [4297] cpu 176667 300.02 1194.47 0.15 588.84 147.89
stress-ng: info: [4297] successful run completed in 300.09s (5 mins, 0.09 secs)

>> Temperature After Stress Test:
temp=84.5'C

>> Throttling Check:
throttled=0xe0008
==== Benchmark Complete ====

root@master2:/home/admin# ./benchtest.sh 
==== Starting Raspberry Pi Benchmark ====
Timestamp: Fri 23 May 11:48:49 IST 2025
Initial Temp: temp=42.2'C
Initial Throttle Status: throttled=0xe0000

>> Running sysbench (CPU performance)
sysbench 1.0.20 (using system LuaJIT 2.1.0-beta3)

Running the test with following options:
Number of threads: 1
Initializing random number generator from current time

Prime numbers limit: 20000

Initializing worker threads...

Threads started!

CPU speed:
    events per second: 1037.16

General statistics:
    total time: 10.0003s
    total number of events: 10373

Latency (ms):
         min: 0.96
         avg: 0.96
         max: 1.81
         95th percentile: 0.97
         sum: 9998.12

Threads fairness:
    events (avg/stddev): 10373.0000/0.00
    execution time (avg/stddev): 9.9981/0.00

>> Running stress-ng (5 min stress test)
stress-ng: info: [8029] setting to a 300 second (5 mins, 0.00 secs) run per stressor
stress-ng: info: [8029] dispatching hogs: 4 cpu
stress-ng: metrc: [8029] stressor bogo ops real time usr time sys time bogo ops/s bogo ops/s
stress-ng: metrc: [8029] (secs) (secs) (secs) (real time) (usr+sys time)
stress-ng: metrc: [8029] cpu 218499 300.05 1195.42 0.18 728.20 182.75
stress-ng: info: [8029] successful run completed in 300.12s (5 mins, 0.12 secs)

>> Temperature After Stress Test:
temp=54.9'C

>> Throttling Check:
throttled=0xe0000
==== Benchmark Complete ===

Enter fullscreen mode Exit fullscreen mode

Key Observations:

  • Temperature Control: The active cooler significantly lowers CPU temperature after stress (54.9°C vs. 84.5°C), preventing thermal throttling.
  • Performance: The stress-ng benchmark shows higher CPU operation throughput with the active cooler (218,499 vs. 176,667 bogo ops), indicating sustained better performance.
  • Throttling: Without active cooling, the CPU experienced thermal throttling post-test, potentially reducing long-term performance and hardware health. With cooling, no such throttling was detected.
  • Sysbench Results: Nearly identical CPU performance for short, single-threaded tasks, indicating cooling mainly benefits sustained, multi-threaded workloads.

Please find the comparison table below:

https://medium.com/media/968db0942db39f3b0fd8259744556e99/href

Top comments (0)