How to Perform Stress Test on Your CPU in Ubuntu / Debian

Last updated: June 10, 2024 — 2 Comments

This simple tutorial shows how to do stress test on your CPU in Ubuntu or Debian Linux, either Desktop or Server.

Got a new CPU /CPU cooler, or changed your computer environment? You can perform a stress test to find out if it’s working good! And, here’s how to do the trick in Debian, Ubuntu, and their based systems.

Step 1: Install stress/stress-ng & s-tui

In all current Ubuntu (20.04, 22.04, 24.04) and Debian releases, there are few command line and TUI tools to do the job.

First, open terminal either from start/application menu or by pressing Ctrl+Alt+T on keyboard.


When it opens, run command:

sudo apt install --install-suggests s-tui

Type user password (no asterisk feedback) for sudo authentication and hit Enter.

The command will install s-tui, with TUI interface to start, stop, configure stress test, and monitor your CPU status in terminal.

With --install-suggests option, it also installs the stress or stress-ng package as the backend for the testing.

Step 2: Perform Stress Test

After installing the tool, simply run the command below in terminal to start s-tui:

s-tui

Then, you’ll see something look like the screenshot below shows you.

In left, it shows some options, as well as summaries of core temperatures, and frequencies. In right, it shows information about the temperature, utilization rate,etc in graphs.

To start stress test, just left click on ( )Stress in the top-left corner of terminal, or use arrow key to highlight it and hit Enter. To stop it, just click to switch back ( )Monitor.

By clicking Stress Options in left, it will show you option to set a timeout to automatically stop stress testing in given seconds. You can also change Sqrt() worker count and Sync() worker count to specify how many cores to run for stress test.

Tips 1 : For GNOME, Ubuntu’s default desktop environment, open “Power” settings and change CPU power mode to ‘Performance’ before performing stress test, or your CPU may not run in full speed.

Tips 2: While stress testing, you may also monitor the temperature of other devices (e.g., SSD) in your machine. To do so, you may install ‘hardinfo’ by running command in terminal:

sudo apt install hardinfo

Then open it and navigate to ‘sensors’ tab in left.

That’s all. Enjoy!

Twitter

I'm a freelance blogger who started using Ubuntu in 2007 and wishes to share my experiences and some useful tips with Ubuntu beginners and lovers. Please comment to let me know if the tutorial is outdated! And, notify me if you find any typo/grammar/language mistakes. English is not my native language. Contact me via [email protected] Buy me a coffee: https://ko-fi.com/ubuntuhandbook1 |

2 responses to How to Perform Stress Test on Your CPU in Ubuntu / Debian

  1. Thanks… Just what I was looking for, something simple. :)

  2. Nice. But – never use the flag –install-suggests unless you want to have a lot of garbage.

    In my case (on a Raspberry Pi), it wanted to install several thousand packages (just about all the packages there are) when using that flag.

    Only spcifically install ‘s-tui’ and ‘stress’ and/or ‘stress-ng’ without the flag.. I chose stress, just to avoid the X11/wayland depenedencies that ‘stress-ng’ pulls in.

Leave a Reply

Text formatting is available via select HTML.

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> 

*