Wednesday, February 28, 2024
HomeWINDOWSHow to stress test Raspberry Pi 4 in Windows PC?

How to stress test Raspberry Pi 4 in Windows PC?

-


Though the Raspberry Pi 4 system hardware has been designed to balance performance, power, and heat generation effectively, the option to stretch the hardware’s limits to extract additional performance can also be explored. This article shows how much additional power and performance can be squeezed out of its hardware and the process of doing the same by performing a stress test on Raspberry Pi 4 on a Windows PC.

How to stress test Raspberry Pi 4 in Windows PC?

What is Stress testing?

Stress Testing, in this scenario, includes the execution of a series of tests or processes on the system hardware, more specifically, the CPU. The tests aim to make the processor run at maximum power to monitor stability and heat generation.

Raspberry Pi 4 houses the A72 processor, which is powerful and can overheat when stress-tested. Hence, stress tests are designed to determine the peak performance without causing any overheat.

How to stress test Raspberry Pi 4 in Windows 11/10?

On the Windows platform, Raspberry stress tests can be performed using various methods. However, the most convenient one involves performing the same by accessing the Raspberry Terminal application through a Windows Subsystem for Linux (WSL).

This article will show how stress tests can be done using Stressberry. The installation process of the stress testing tools involves four distinct phases:

  1. Update and install the necessary packages and applications
  2. Install Stressberry
  3. Stress-Tests execution
  4. Record and display results

Stressberry is the stress testing software that will need packages and applications to test thoroughly.

Also, create a system restore point if something goes wrong; you can always return your PC to a working state.

1] Updating and installing the necessary applications

In Raspberry Pi 4, software applications are generally installed, updated, or removed using the Advanced Packaging Tool (APT). Before installing the application on the system, the package list needs to be updated to ensure the latest resources are being used.

Run the following command after opening the Raspberry terminal application:

sudo apt – get update

Sudo, or (Super User Do) is a command-line utility in Linux that allows users to run commands with super-user or administrative privileges by providing access to the root directory of the OS.

Once the APT is updated, let’s install the prerequisite software for the Stressberry applications in time.

Install Atlas:

Atlas is a library that helps Stressberry communicate with the sensors on Pi. It helps Stressberry communicate with the system hardware to execute instructions and collect the data it needs from the censors.

To install, the below-mentioned command can be entered in the terminal prompt:

sudo apt-get install libatlas-base-dev

Here is the meaning of all the options in the above command:

  • sudo: command to gain administrative or super-user privileges
  • apt-get install: Install a particular application package using APT.
  • libatlas: Library or package containing the programming functions or utilities of the Atlas application.
  • base: Core version of the library
  • dev: acronym of development

Instal Cairo:

To publish the stress test results, Stressberry depends on another application, Cairo, which provides graphics libraries to represent the test results visually.

sudo pip3 install cairocffi
  • pip3: is the package installer for Python 3, and
  • cairocffi: Python package for the Cairo Graphics Library, ensuring the installation of libraries and dependencies of the Cairo package in the Python 3 environment.

Install PyQt5:

To create the visual interface, Stressberry relies on the application PyQt5. Hence, installing it before Stressberry ensures that the tools needed for Stressberry’s visual interface are in place.

sudo apt-get install python3 -pyqt5
  • python3: Specifies the version of Python for which the package needs to be installed.
  • pyqt5: Libraries for creating desktop applications with a graphic user interface (GUI).

Read: How to update WSL Kernel on Windows 

2] Install Stressberry

After installing all the prerequisites, Stressberry can then be installed by typing the below-mentioned command on the terminal

sudo apt install stress

followed by

sudo –H pip3 install –U stressberry

The first command installs the stress package on the system. Once installed, stress can be used as a command to impose the system’s load for the stress test.

The second command installs or upgrades the Python package Stressberry, wherein

  • -H: Ensures that the super user’s home directory is used for executing the command to avoid any potential permission issues for the generated files or changes in configuration as a result of installing the said package.
  • -U: Make sure that the latest version of the Stressberry is installed or upgraded in case any older version is already installed on the system.

Read: How to set up a Raspberry Pi module with default settings

3] Stress-tests execution

After completing the installation process, Stressberry can be started up through the below-mentioned command,

sudo stressberry –run out.dat

While running the application, this command records the CPU temperature and stores it in the file named out.dat, in the home directory.

Read: Best Raspberry PI4 ideas for Science Project

4] Record and display results

The program initially runs the CPU with minimum load to cool it down and then idles it for a while before stressing it with maximum load. After running it with a maximum load of about 5 minutes, the program releases the load and records the cool down.

The results of the test are recorded in the file out.dat. However, the results can also be published through a graph using the following command

sudo stressberry  -plot out.dat

Stressberry Raspberry Pi 4 Stress test Results

You can find more examples at the Stressberry site

Conclusion

Stress tests are a way to make sure your computer is working as well as it can and runs smoothly. However, they can cause damage to your computer if you’re not careful. So, before you do a stress test, make sure your Raspberry 4 Pi is not getting too hot and that it has proper cooling.

Read: Best free Overclocking software for Windows.

Is it safe to overclock Raspberry Pi?

Overclocking is always risky. To overclock your Raspberry Pi 4, you need sufficient cooling as higher speeds generate more heat. You can use Raspberry Pi cases with active and passive cooling besides fans to prevent overheating.

Read: How to install Windows OS on Raspberry Pi

Can overclocking damage the GPU?

Overclocking your GPU is generally safe with a low risk of hardware damage. If there are any issues, such as visual artifacts or a system crash, it is a good indication that your game is about to crash.

ReadHow to Program on Arduino with Raspberry Pi.

How to stress test Raspberry Pi 4 in Windows PC?



Source link

www.thewindowsclub.com

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular