├── README.md
├── README_SPANISH.md
└── rpi-benchmark.sh
/README.md:
--------------------------------------------------------------------------------
1 | # Raspberry Pi Benchmark
2 |
3 |

4 |
5 | Copy and paste the following command in your Raspberry Pi console:
6 |
7 | curl -L https://raw.githubusercontent.com/aikoncwd/rpi-benchmark/master/rpi-benchmark.sh | sudo bash
8 |
9 |
10 | ## Information
11 |
12 | This script runs 7 benchmark tests to stress your Raspberry Pi hardware:
13 |
14 | 1. **Speedtest-cli test:** Calculate ping, upload and download internet speed
15 | 2. **CPU sysbench test:** Calculate 5000 prime numbers
16 | 3. **CPU sysbench test:** Multithread with 4000 yields and 5 locks
17 | 4. **MEMORY RAM test:** Sequencial access to 3Gb of memory
18 | 5. **microSD HDParm test:** Calculate maximun read speed for SD
19 | 6. **microSD DD write test:** Calculate maximun write speed with 512Mb file
20 | 7. **microSD DD read test:** Calculate maximun read speed with 512Mb file
21 |
22 |
23 | Rpi-benchmark script will show your current hardware (overclock) settings. After every test, it will show the current CPU temperature
24 |
25 |
26 | ## Usage
27 |
28 | You don't need to download any program, compile sources, etc... It's so easy!
29 | Just copy and paste the following command in your Raspberry Pi console:
30 |
31 | curl -L https://raw.githubusercontent.com/aikoncwd/rpi-benchmark/master/rpi-benchmark.sh | sudo bash
32 |
33 | The rpi-benchmark script will start in 2 seconds :relaxed:
34 |
35 |
36 |
37 | ## Overclocking
38 | ### I want better results, can I overclock my RPi?
39 |
40 | Yes, overclocking your RPi will give you more power for your **CPU calculations**, more speed while read/write into your **memory ram** and better speeds while read/write into your microSD card.
41 | If you use your RPi as a MediaCenter with Kodi or to play games with RetroPie, you will find a nice perfomance boost.
42 |
43 | I strongly recommend to use some cooling on your RPi to avoid CPU throttling (at 85ºC)
44 |
45 |
46 | ##### Raspberry Pi 3: Overclock settings
47 |
48 | Edit your `/boot/config.txt` file and paste the following code, you can adjust values to get more or less overclock:
49 |
50 | force_turbo=0 #Enable cpu-overclock over 1300MHz (default 0)
51 | avoid_pwm_pll=1 #Enable no-relative freq between cpu and gpu cores (default 0)
52 |
53 | arm_freq=1300 #Frequency of ARM processor core in MHz (default 1200)
54 | core_freq=550 #Frequency of GPU processor core in MHz (default 400)
55 | over_voltage=6 #ARM/GPU voltage adjust, values over 6 voids warranty (default 0)
56 |
57 | sdram_freq=575 #Frequency of SDRAM in MHz (default 450)
58 | sdram_schmoo=0x02000020 #Set SDRAM schmoo to get more than 500MHz freq (default unset)
59 | over_voltage_sdram_p=6 #SDRAM phy voltage adjust (default 0)
60 | over_voltage_sdram_i=4 #SDRAM I/O voltage adjust (default 0)
61 | over_voltage_sdram_c=4 #SDRAM controller voltage adjust (default 0)
62 |
63 | gpu_mem=256 #GPU memory in MB. Memory split between ARM and GPU (default 64?)
64 | gpu_freq=550 #Sets core_freq h264_freq isp_freq v3d_freq together (default 300)
65 | v3d_freq=500 #Frequency of 3D block in MHz (default ?)
66 | h264_freq=350 #Frequency of hardware video block in MHz (default ?)
67 |
68 | dtparam=sd_overclock=90 #Clock in MHz to use for MMC micrSD (default 50)
69 | dtparam=audio=on #Enables the onboard ALSA audio (always use this ON)
70 | dtparam=spi=on #Enables the SPI interfaces (default OFF)
71 |
72 | temp_limit=80 #Overheat protection. Disable overclock if SoC reaches this temp
73 | initial_turbo=60 #Enables turbo mode from boot for the given value in seconds
74 |
75 | start_x=1 #Enable software decoding (MPEG-2, VC-1, VP6, VP8, Theora, etc)
76 | overscan_scale=1 #Respect the overscan settings with the use of an LCD display
77 |
78 | ##### Raspberry Pi 2: Overclock settings
79 |
80 | Edit your `/boot/config.txt` file and paste the following code, you can adjust values to get more or less overclock:
81 |
82 | gpu_mem=256
83 | gpu_mem_256=128
84 | gpu_mem_512=256
85 | gpu_mem_1024=256
86 |
87 | arm_freq=1100
88 | core_freq=550
89 | sdram_freq=483
90 | over_voltage=6
91 | over_voltage_sdram=2
92 | temp_limit=70
93 | force_turbo=0
94 | initial_turbo=60
95 |
96 | hdmi_drive=2
97 | hdmi_ignore_cec=0
98 | hdmi_ignore_cec_init=1
99 | hdmi_ignore_hotplug=0
100 | hdmi_force_hotplug=1
101 |
102 | #disable_overscan=0
103 | #overscan_scale=1
104 |
105 | #overscan_left=49
106 | #overscan_right=49
107 | #overscan_top=29
108 | #overscan_bottom=25
109 |
110 | max_usb_current=1
111 | dtparam=audio=on
112 | dtparam=spi=on
113 |
--------------------------------------------------------------------------------
/README_SPANISH.md:
--------------------------------------------------------------------------------
1 | # Raspberry Pi Benchmark
2 |
3 | 
4 |
5 | Copia y pega el siguiente comando en la consola/terminal de tu Raspberry Pi:
6 |
7 | curl -L https://raw.githubusercontent.com/aikoncwd/rpi-benchmark/master/rpi-benchmark.sh | sudo bash
8 |
9 | ## Información
10 |
11 | Éste script ejecutará 7 test de benchmark para estresar el hardware de tu Raspberry Pi:
12 |
13 | 1. **Speedtest-cli test:** Calcula el ping, velocidad de carga y descarga en Internet
14 | 2. **CPU sysbench test:** Calcula 5000 números primos
15 | 3. **CPU sysbench test:** Multihilo 4000 rendimientos and 5 bloqueos
16 | 4. **MEMORY RAM test:** Acceso sequencial a 3Gb de memoria RAM
17 | 5. **microSD HDParm test:** Calcula la velocidad máxima de lectura de la microSD
18 | 6. **microSD DD write test:** Calcula la velocidad máxima de escritura con 512Mb de datos
19 | 7. **microSD DD read test:** Calcula la velocidad máxima de lectura con 512Mb de datos
20 |
21 |
22 | El script rpi-benchmark mostrará al inicio la actual configuración de hardware (overclock). Después de cada test, aparecerá la temperatura en ºC de tu CPU
23 |
24 |
25 | ## Cómo se usa
26 |
27 | No necesitas descargar ni compilar código... Es muy fácil!
28 | Simplemente copia el siguiente comando en la consola/terminal de tu Raspberry Pi:
29 |
30 | curl -L https://raw.githubusercontent.com/aikoncwd/rpi-benchmark/master/rpi-benchmark.sh | sudo bash
31 |
32 | El script rpi-benchmark empezará automáticamente en 2 segundos :relaxed:
33 |
34 |
35 |
36 | ## Overclocking
37 | ### Quiero mejorar mis resultados, puedo overclockear mi RPi?
38 |
39 | Sí, overclockear tu RPi otorgará más velocidad en cálculos de CPU, mejor velocidad en la lectura y escritura hacia la memoria RAM y mejores tiempos de acceso al leer o escribir en la tarjeta microSD
40 | Si utilizas tu RPi como MediaCenter con Kodi o para jugar en RetroPie, percibirás un mejor rendimiento y velocidad.
41 |
42 | Recomiendo encarecidamente que utilices algñun método de ventilación/refrigeración para evitar alcanzar los 85ºC, ya que la RPi bajará su velocidad si alcanza esa temperatura
43 |
44 |
45 | ##### Raspberry Pi 3: Overclock settings
46 |
47 | Edita tu fichero `/boot/config.txt` y pega el siguiente código, puedes ajustar los valores para tener más o menos overclock:
48 |
49 | force_turbo=0 #Enable cpu-overclock over 1300MHz (default 0)
50 | avoid_pwm_pll=1 #Enable no-relative freq between cpu and gpu cores (default 0)
51 |
52 | arm_freq=1300 #Frequency of ARM processor core in MHz (default 1200)
53 | core_freq=550 #Frequency of GPU processor core in MHz (default 400)
54 | over_voltage=6 #ARM/GPU voltage adjust, values over 6 voids warranty (default 0)
55 |
56 | sdram_freq=575 #Frequency of SDRAM in MHz (default 450)
57 | sdram_schmoo=0x02000020 #Set SDRAM schmoo to get more than 500MHz freq (default unset)
58 | over_voltage_sdram_p=6 #SDRAM phy voltage adjust (default 0)
59 | over_voltage_sdram_i=4 #SDRAM I/O voltage adjust (default 0)
60 | over_voltage_sdram_c=4 #SDRAM controller voltage adjust (default 0)
61 |
62 | gpu_mem=256 #GPU memory in MB. Memory split between ARM and GPU (default 64?)
63 | gpu_freq=550 #Sets core_freq h264_freq isp_freq v3d_freq together (default 300)
64 | v3d_freq=500 #Frequency of 3D block in MHz (default ?)
65 | h264_freq=350 #Frequency of hardware video block in MHz (default ?)
66 |
67 | dtparam=sd_overclock=90 #Clock in MHz to use for MMC micrSD (default 50)
68 | dtparam=audio=on #Enables the onboard ALSA audio (always use this ON)
69 | dtparam=spi=on #Enables the SPI interfaces (default OFF)
70 |
71 | temp_limit=80 #Overheat protection. Disable overclock if SoC reaches this temp
72 | initial_turbo=60 #Enables turbo mode from boot for the given value in seconds
73 |
74 | start_x=1 #Enable software decoding (MPEG-2, VC-1, VP6, VP8, Theora, etc)
75 | overscan_scale=1 #Respect the overscan settings with the use of an LCD display
76 |
77 | ##### Raspberry Pi 2: Overclock settings
78 |
79 | Edita tu fichero `/boot/config.txt` y pega el siguiente código, puedes ajustar los valores para tener más o menos overclock:
80 |
81 | gpu_mem=256
82 | gpu_mem_256=128
83 | gpu_mem_512=256
84 | gpu_mem_1024=256
85 |
86 | arm_freq=1100
87 | core_freq=550
88 | sdram_freq=483
89 | over_voltage=6
90 | over_voltage_sdram=2
91 | temp_limit=70
92 | force_turbo=0
93 | initial_turbo=60
94 |
95 | hdmi_drive=2
96 | hdmi_ignore_cec=0
97 | hdmi_ignore_cec_init=1
98 | hdmi_ignore_hotplug=0
99 | hdmi_force_hotplug=1
100 |
101 | #disable_overscan=0
102 | #overscan_scale=1
103 |
104 | #overscan_left=49
105 | #overscan_right=49
106 | #overscan_top=29
107 | #overscan_bottom=25
108 |
109 | max_usb_current=1
110 | dtparam=audio=on
111 | dtparam=spi=on
112 |
113 |
--------------------------------------------------------------------------------
/rpi-benchmark.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | [ "$(whoami)" == "root" ] || { echo "Must be run as sudo!"; exit 1; }
4 |
5 | # Install dependencies
6 | if [ ! `which hdparm` ]; then
7 | apt-get install -y hdparm
8 | fi
9 | if [ ! `which sysbench` ]; then
10 | apt-get install -y sysbench
11 | fi
12 | if [ ! `which speedtest-cli` ]; then
13 | apt-get install -y speedtest-cli
14 | fi
15 |
16 | # Script start!
17 | clear
18 | sync
19 | echo -e "\e[96mRaspberry Pi Benchmark Test"
20 | echo -e "Author: AikonCWD"
21 | echo -e "Version: 3.0\n\e[97m"
22 |
23 | # Show current hardware
24 | vcgencmd measure_temp
25 | vcgencmd get_config int | grep arm_freq
26 | vcgencmd get_config int | grep core_freq
27 | vcgencmd get_config int | grep sdram_freq
28 | vcgencmd get_config int | grep gpu_freq
29 | printf "sd_clock="
30 | grep "actual clock" /sys/kernel/debug/mmc0/ios 2>/dev/null | awk '{printf("%0.3f MHz", $3/1000000)}'
31 | echo -e "\n\e[93m"
32 |
33 | echo -e "Running InternetSpeed test...\e[94m"
34 | speedtest-cli --simple
35 | echo -e "\e[93m"
36 |
37 | echo -e "Running CPU test...\e[94m"
38 | sysbench --num-threads=4 --validate=on --test=cpu --cpu-max-prime=5000 run | grep 'total time:\|min:\|avg:\|max:' | tr -s [:space:]
39 | vcgencmd measure_temp
40 | echo -e "\e[93m"
41 |
42 | echo -e "Running THREADS test...\e[94m"
43 | sysbench --num-threads=4 --validate=on --test=threads --thread-yields=4000 --thread-locks=6 run | grep 'total time:\|min:\|avg:\|max:' | tr -s [:space:]
44 | vcgencmd measure_temp
45 | echo -e "\e[93m"
46 |
47 | echo -e "Running MEMORY test...\e[94m"
48 | sysbench --num-threads=4 --validate=on --test=memory --memory-block-size=1K --memory-total-size=3G --memory-access-mode=seq run | grep 'Operations\|transferred\|total time:\|min:\|avg:\|max:' | tr -s [:space:]
49 | vcgencmd measure_temp
50 | echo -e "\e[93m"
51 |
52 | echo -e "Running HDPARM test...\e[94m"
53 | hdparm -t /dev/mmcblk0 | grep Timing
54 | vcgencmd measure_temp
55 | echo -e "\e[93m"
56 |
57 | echo -e "Running DD WRITE test...\e[94m"
58 | rm -f ~/test.tmp && sync && dd if=/dev/zero of=~/test.tmp bs=1M count=512 conv=fsync 2>&1 | grep -v records
59 | vcgencmd measure_temp
60 | echo -e "\e[93m"
61 |
62 | echo -e "Running DD READ test...\e[94m"
63 | echo -e 3 > /proc/sys/vm/drop_caches && sync && dd if=~/test.tmp of=/dev/null bs=1M 2>&1 | grep -v records
64 | vcgencmd measure_temp
65 | rm -f ~/test.tmp
66 | echo -e "\e[0m"
67 |
68 | echo -e "\e[91mAikonCWD's rpi-benchmark completed!\e[0m\n"
69 |
--------------------------------------------------------------------------------