Stress test computer Linux program. CPU Stress test in Linux how to load all cores microprocessor

Why is it worth performing the stress test test? To verify the reliability and stability of your machine / system. Stress testing will also help help find out whether to update or add new cooling for your car. In its topic "Stress CPU Test on Linux (Debian / Ubuntu / Mint or Redhat / Centos / Fedora)" I will tell you how to use the CPUBURN utility to test the load on the processor (s).

1. Installing CPUBURN.

Untal CPUBURN on / Debian / Ubuntu / Mint:

  • # APT-Get Update && APT-Get Install CPUBURN

Untal CPUBURN on RedHat / CentOS / Fedora:

  • # YUM UPDATE && YUM Install CPUBURN

You can post the use manual for the CPUBUN utility by performing:

    # MAN CPUBURN.

burnP5 Optimized for Intel Pentium C / without MMX processors.cPUBURN, BURNBX, BURNK6, BURNK7, BURNMMX, BURNP5, BURNP6 - Collection of programs for testing a large load on the CPU.

burnp6. Optimized for Intel PentiumPro, Pentium II & III processors.
burnk6. Optimized for AMD K6 processors.
burnk7 Optimized for AMD Athlon / Duron processors.
burnmmx. Testalternative cache / memory test on all MMX processes.
burnBX Alternative Cash / Memory Test is optimized for Intel processors.

These programs are designed to load processors for x86 as possible for system test purposes. They were optimized for various processors. FPU and ALU instructions are encoded on an assembler in an infinite cycle. They do not experience all instructions. The goal is to create a load and see what temperature is created by placing the load on the processor, system, motherboard and power supply.

Testing utility is designed to create a crash on your computer, so make sure that nothing critical is running on it and all important data is saved on hard drives. It is best to run a program on file systems and take read only. Please note that root privileges are not required.

Run the program in the background, checking the error result. You can repeat this command for each processor. For example,

  • # Burnp6 || Echo $? &

Use PS to monitor the work of the CPUBURN. You can monitor the processor temperature and / or voltage in the ACPI system or using LM sensors, but if your system supports it. After completion, it is worth completing this (e) processes for example:

  • # KILLALL BURNP6

Install HTOT to monitor loads on your server.

  • # APT-Get Update && APT-Get Install HTOP
  • # YUM UPDATE && YUM Install HTOT

Start HTOP, to check the load:

  • # hop.

CPU Test on Linux (Debian / Ubuntu / Mint or Redhat / CentOS / Fedora) is completed.

To properly test the processor cooling system and the stability of work in acceleration, when there is also a voltage to raise the voltage to achieve high frequencies, you need to load it under the string for quite a long time. This will help only special utilities that know how to load the processor on the rigging, complex, but meaningless calculations. Here the main thing is to take the "right" program to work effectively using complex floating point formulas to handle a large amount of data. Perhaps one of the best utilities created Intel, which is called LINPACK. True, it was done by programmers for advanced users, without bothering over windows with ruffles, limiting the command line. A black screen with incomprehensible running strings robs ordinary users of the computer into a stupor that do not understand what they do with these and where to click the mouse. Glory to God found good people who screwed a graphic shell to Linpack, calling their creation Linx.

LINX does not have to install, and you will need to download the archive file, unpack it, go to the created folder and start the Linx.exe executable file. To delete the program, it will be enough to delete the folder where the LINX files threw off, the main thing is not forget, as it is called and where to be.

The fact that intel is not worth worrying about the creation of tests are not worried about the efficiency of working with AMD processors, LINX perfectly loads processors as Intel and AMD.

After launching LINX, the program is actually ready to work for this enough to press the "Start" button at the top of the right side. Further, gain patience and wait until the specified number of tests in a circle takes place. Upon completion of each test cycle in the table, its results will be added, namely the time, the data processing speed, the number of streams used and the size of the matrix of the linear equation system, which was used for calculations. At a time, loading the processor to the maximum, allowing you to check it on the stability of the work and the efficiency of heat removal of the cooling system.

To stop the test run, just press "TOP".

In the main window at the top row under the main menu there are sections where users can change:

  • "Task volume:", indicate the size of the matrix of the system of linear equations, which will be used for calculations. The more, the longer the calculations go. Note, this parameter is associated with "Memory", that is, when one of them changes, another will automatically change.
  • "Memory (MIB)", the amount of RAM, which the program can use the program. As mentioned above, with an increase in volume, it will automatically change "the volume of the task:", the same way.
  • "Perform" how many test runs will be done in a circle.

Of the interesting features of the program, it costs to note the support of obtaining data on the temperature of the processor, the frequencies of the core and supply voltage from the EVEREST / SPEEDFAN applications and display them in the form of graphs during tests. Plus Allow stop tests when errors occur or if the processor is heated above the specified value (only when working in the Evered / Speedfan pair). Also in the settings, you can specify the number of threads, which will be performed at the same time, select the title of tests 32 or 64-bit, the priority of testing processes (it is better to leave the default, so that the computer does not slow down), and limit the scope of the program memory used, so that the operating system is not Brake.

To date, LINX, and if you are completely accurate, then linpack if you lean the graphics shell, the only test that allows you to adequately check the stability of the processor. Consider, this program creates very high loads on the processor, under which it will never work at home, and it is not desirable to constantly launch it on your computer for several hours. Especially in the light of all the intel processors of the last generations under the cover of the heat, which, with long-term exposure to high temperatures, can lose its properties over time.

The program works both in 32 and 64-bit operating systems. The program interface is translated into English and Russian, users must download the desired version of the program with the corresponding localization.

If you have not come across this operating system yet, then feel free to lift the virtual or install as the main and use it every day.

My acquaintance with Linux / * NIX began with Ubuntu 13.04. Probably it is one of the most user-friendly distributions (look also towards Elementary OS). Before that, I only trained on Linux Red Hat, the image of which I was launched through the Virtual Box. I did not have specific tasks, so my training was only in the study of certain terminal commands. Previously, my main operating system was Windows, in which I didn't understand my opinion, and she suited me to everyone.

Acquaintance from the OS was forced, I literally sat for Ubuntu, arguing that it would be useful to me for work. The trigger was very difficult, more than once, I thought to return to Windows. Pretty long nervous, because it was difficult to get used to new settings and functionality. In addition, version 13.04 was very buggy, for this reason I no longer install the Ubuntu new versions until LTS (Long Term Support) exits. In the end, I did not regret what moved to Ubuntu.

Based on personal experience, I was scared a couple of moments, from using this OS.

  • Soft. I did not know about the presence of certain analogues for Ubuntu and worried about that I can't find the necessary programs. But fortunately a lot of software, there are almost always good alternatives, and sometimes a larger choice. Besides that I used to this day were presented in versions for Ubuntu.
  • Browsers. In some old news, I read that rendering pages in browsers of different operating systems is different. I test WEB projects and for me it is important. In fact, it can be so, but the main browsers Chrome and Firefox pass so many stages of testing that such trifles cannot slip to end users.
  • The complexity of the installation. Installing Windows (XP, Vista, Win7) is very simple and understandable, I will not list later versions, because it was not configured to install them, but I think that the process did not change much. Distribution Ubuntu or Elementary OS is as easy to install, and most likely faster.
  • Interfaces. The convenience of Windows interfaces is indisputable. I am so accustomed to the standard "desktop" that everything else seemed to me alien. At the beginning of the new locations of the buttons, the installation of software and other little things are very annoying and slowed down. But you need to suffer at least a couple of weeks and you get used to the "new rules" and even find our values \u200b\u200bin them.

Profit

Obvious advantages from the experience of using Linux / * NIX

  • Knowledge of Linux operating systems.

This is a frequent requirement in many companies to the tester position. Several times I passed and everywhere knowledge Linux was quite an important criterion. And if the candidate constantly uses this operating system as the main one, then for the employers is already a big plus.

  • Working with servers

Installation Apache, Nginx, Package assembly, Git, server applications, Memchaached, Sphinx, Elasticsearch, Databases, Deploying software environments and still a lot of interesting solutions for which Linux is perfect. Experience with such means, will also play your hand.

  • New architecture

For those who always used Windows and did not think about how it works, it will be a look at something new. In my opinion, this OS will allow you to have a more visual idea of \u200b\u200bhow the file system is arranged and how programs interact with iron.

This is the most powerful tool for any user. Having received an initial idea, you can write your own scripts that will reduce routine actions and develop interest in programming. In addition, there are a bunch of utilities in the terminal, one Vim text editor is worth something.

  • Convenience

In the end, I consider Ubuntu 14.04 convenient OS. Maybe I still do not use all her capabilities to this day, but I all set up to my taste and quite satisfied. Now I can not even imagine how effective I would work on Windows.

Minuses

Setting. For me, this is the most important minus OS Linux family. The system is very flexible and allows you to change almost any parameter, but it is precisely in this weakness. Sometimes you can spend a lot of time to make one small setting.

If you are testing Web platforms with a complex backend and constantly work with servers via SSH, then Linux for tester This is an excellent OS. There are many people who will say that you can use Windows utilities, such as Putty or something similar, but I think it is better to know how the server itself is arranged, because it will certainly use the same Linux / * NIX.

Will cope when the load on the processor reaches 100 percent. Thus, it is possible to identify problems with cooling and solve them before they create real inconvenience. In this material, we will tell about how to conduct a processor test stress using LINX and OCCT programs.

One of the most famous programs for stress testing processor is the LINX program. This program is completely free and is a graphical interface for the LINPACK program developed by Intel. With this program, you can create a limit load on the processor and thereby find out to what temperature the processor will warm up.

In order to conduct a stress test processor using LINX, to your computer, unpack any folder and run the linx.exe file. After starting the program, you will see approximately such a window as in the screenshot below. Here there are two "Start" and "Stop" buttons with their help you can run and stop the stress test.

But, do not rush to run LINX. You still need some kind. For this purpose, you can use HWMONITOR. This program is designed to monitor the current system parameters. With it, you can track the temperature, load, the speed of rotation of the coolers and much more.

Install and run on your computer. After startup, scroll through the list of the parameters that tracks HWMonitor to processor parameters. When stress testing, you need to pay attention to the speed of rotation of the coolers, temperature and clock frequency of the processor.

After everything is ready, you can run LINX test stres. To do this, just click on the "Start" button.

After starting stress testing, we start watching the processor temperature in the HWMONITOR program. If the processor cooling system is working, then at first the temperature will increase dramatically, but after the fans are folded at full power, it must decrease and stabilize at one mark. In the screenshot below, it can be seen that the temperature first jumped up to 80 degrees (MAX column), and then dropped to 72 degrees (Value column).

If the cooling system of the processor is faulty or it simply does not cope with heating, the temperature will continue to grow throughout the dough stress. If the temperature oversteps the mark of 80 degrees and continue to increase, then testing is better to interrupt so as not to bring the computer before the emergency reboot.

To turn off the test stress simply click on the "Stop" button in the LINX program. If the computer is hung, and the "Stop" button does not work, then restart the computer with the RESET button on the system unit.

Testing a processor using OCCT

OCCT - another very popular program for stress testing processor. OCCT is equipped with two processor testing algorithms at once. This is a LINPACK, which is used in LINX, as well as its own OCCT algorithm. In this case, the OCCT is equipped with a more advanced interface. With it, you can track the temperature, load and other processor parameters. So when testing with OCCT, the HWMONITOR program is no longer needed.

In order to conduct a processor test stress using OCCT, install and run on your computer. Next, you need to go to the Test tab that you want to use and click on the "ON" button.

Further all just like with LINX. If the processor cooling system is properly, the temperature will first join, and then it will decrease and stabilizes on some mark. If the cooling system is not proper or does not cope with the load, the temperature will continue to grow. In this case, the stress test must be stopped.

I drove the LinPack test and thought: but is it time for me to change the thermal chaser on my laptop?

Yes, according to the results of several tests in a row (I will not choke an article by pictures) it can be seen that the processor goes into trottling (passing the clocks and a discharge of frequency when heated), but how fast does he start doing it?

Stripe processor in the Linux terminal

Having won this question and searching for the utilities on the Internet, I realized that the main problem in solving the tasks I put - simultaneous launch, at least a pair of utilities and disassembled eyes in two windows ... And I came to the conclusion that I was more suitable for the console version, rather than multicolored windows of open programs.

I started with sysbench:

sudo Apt Install Sysbench

sysbench --num-threads \u003d 4 --test \u003d CPU --CPU-MAX-PRIME \u003d 100000 RUN

  • --num-threads \u003d 4 - this is the number of threads, I have a dual-core four-way Intel® Core ™ i7-640m, therefore 4;
  • --cpu-max-prime \u003d 100000 - This is the maximum number of operations performed, I put at 100,000, because The default is 10,000, the test is completed too quickly.

Then I switched to Linpack. Since I have a processor from Intel and I have some share of Lena (lazy - the engine of progress), I took, downloaded and unpacked the finished Intel-Ovsky Linpack, after creating a LINPACK directory in the home directory:

mkdir ./linpack
CD ./LINPACK
Wget http://registrationcenter-download.intel.com/akdlm/irc_nas/9752/l_mklb_p_2018.3.011.tgz.
tar -xvzf ./l_mklb_p_2018.3.011.tgz.

For AMD processors, this option would not try, as the compiler from Intel inserts the bookmarks checking the processor and if it is not Intel ... Well, you will think about a hundred and other unnecessary instructions, the processor will perform and will deliberately lose in performance. For AMD, it is better to collect LINPACK from source code, for example, from these. In this article, I will not consider the assembly from source - read Readme in Source Code.

Let's return to Intel-Ovsky Linpack-y. There is a lot of things too much and I do not need, but what you need to consider regarding version 2018.3.011. Immediately go to the right directory, so that you will not recruit long commands:

cd ./l_mklb_p_2018.3.011/benchmarks_2018/linux/mkl/benchmarks/linpack

Since the default Intel-oski LINPACK is sharpened to test the servers Xeon, create their own file that will be used as input options - simply reducing the number of tests, otherwise tired "couple-triple days" waiting for the test. I have Linux Mint Lmde 3, so I use the XED text editor, and I like it with a great functionality, especially when I run it from the root - it changes the color to red. And so, creating in the same directory in which they switched, file, for example, My_Test:

And in the created file copy the following contents:

Shared-Memory Version of Intel (R) Distribution for Linpack * Benchmark. * Other Names And Brands May Be Claimed As The Property Of Others.
Sample Data File Lininput_xeon64.
5 # Number of Tests
1000 2000 5000 1000 20,000 # PROBLEM Sizes
1000 2000 5008 10000 20,000 # Leading Dimensions
4 2 2 2 1 # TIMES TO RUN A TEST
4 4 4 4 4 # Alignment Values \u200b\u200b(in Kbytes)

Well, and actually launch Linpack with the created file:

./xlinpack_xeon64 -i ./my_Test

./xlinpack_xeon64 ./my_Test

You can still link the stress-ng or stress, but the task set by me does not decide anyway. The output of temperature, frequencies and time from the beginning of the start These utilities do not show me.

The temperature can show Sensors - more about the installation of this utility. And this utility will be needed in the future review of my question. Linux is great and mighty: one and the same task can be solved in different ways. For Si I was lazy to take and I wrote the missing part of me on Bash, for the rows did not work out so much. Without the SENSORS installed, my script will not work. Fixing the trottling naturally did not write - it will also be visible on the discharge of frequency and temperature. Here is the script itself:

#! / BIN / BASH
Out \u003d 0 # Variable control over the test process
PID_TEST \u003d "TTY" # PID test process (made an existing directory to run without arguments)
CPUS_NUM \u003d $ (CAT / PROC / CPUINFO | GREP -CI "Processor") # number of processors / nuclei / streams
Echo -en "\\ 033 [? 25L" 1\u003e & 2 # Hide Cursor
Echo -en "\\ 033 [^:] *: // G" | Sort -U # output processor model
Echo -en "\\ 033 \u003d $ (SENSORS | SED" / CORE "" $ I "" /! D; S /.* CRIT \u003d + \\ (* \\) [.] ° C). * / \\ 1 / ")
if [-n "$ (CPU_CRIT_TEMP [i])"]
Then.
Let CPU_RED_TEMP [i] \u003d CPU_CRIT_TEMP [i] -10
Let CPU_YEL_TEMP [i] \u003d CPU_CRIT_TEMP [i] -30
CPU_MIN_TEMP [$ i] \u003d 1000
CPU_MAX_TEMP [$ i] \u003d 0
fi
Done
start_time \u003d $ (Cat / Proc / Uptime | SED "S / [.]. * $ //") Run time
if [-n "$ 1"]
Then.
script_pid \u003d "$$"
(IF! [Email Protected] \u003e "$ 0_out" 2\u003e & 1 # Running a test file
Then.
KILL -S SIGABRT $ SCRIPT_PID # Send a signal to the main script to start failure
FI 2\u003e / DEV / NULL) &
Pid_Test \u003d "$!" # PID test process
fi
While (True) # temperature control
do.
for ((i \u003d 0; i<$cpus_num; i++))
do.
CPU_FREQ [$ i] \u003d $ (CAT / SYS / DEVICES / SYSTEM / CPU / CPU $ (I) / CPUFREQ / SCALING_CUR_FREQ | SED "s /...$ /")
CPU_TEMP [$ i] \u003d $ (SENSORS | SED "/ CORE" "$ I" "/! D; s / .* \\ (. * \\) [.] ° C [\\ t] * (. * / \\ if [-n "$ (CPU_TEMP [i])"]
(($ (CPU_TEMP [I])
Then.
if (($ (CPU_TEMP [I])\u003e $ (CPU_MAX_TEMP [I])))< ${cpu_min_temp[i]})) && cpu_min_temp[$i]=${cpu_temp[i]}
CPU_MAX_TEMP [$ i] \u003d $ (CPU_TEMP [i])
Then.
Time_max [$ i] \u003d $ (CAT / PROC / UPTIME | SED "S / [.]. * $ //")
{!LANG-ad43121fbccecd8013787e55e9fab4c2!}
LET TIME_MAX [i] \u003d TIME_MAX [i] -STart_Time
fi
if (($ (CPU_TEMP [I])\u003e $ (CPU_RED_TEMP [I])))
Then.
Echo -en "CPU $ (i): \\ t"
Echo -en "\\ 033)"
Echo -en "\\ 033)"
Echo -en "\\ 033)"
Echo -en "\\ 033)\u003e $ (CPU_YEL_TEMP [i])))
Then.
Echo -en "CPU $ (i): \\ t"
Echo -en "\\ 033)"
Echo -en "\\ 033)"
Echo -en "\\ 033) ° C; Max:"
Echo -en "\\ 033)"
Echo -en "\\ 033) sec)"
ELSE.
Echo -en "CPU $ (i): \\ t"
Echo -en "\\ 033)"
Echo -en "\\ 033)"
Echo -en "\\ 033) ° C; Max:"
Echo -en "\\ 033)"
Echo -en "\\ 033) sec)"
fi
ELSE.
Echo -en "CPU $ (i): \\ t"
Echo -en "\\ 033)"
Echo -en "\\ 033. * $ //")
Let Time \u003d Time-Start_Time
Echo -en "Time: \\ T $ Time SEC."
[!! -d "/ proc / $ (PID_TEST)"] && break # output at the end of the test (the best way to control on COMM and CMDLINE, but ... laziness)
["$ Out"! \u003d "0"] && Break # Exit when mistakes dough
Echo -en "\\ 033 [$ (i) A \\ R" 1\u003e & 2 # Transfer of a cursor up on $ 1 rows and at the beginning of a string
Sleep 0.1 # Pause, so that the frequency output is not strong
Done
Echo ""
Echo -en "\\ 033 [? 25H" 1\u003e & 2 # Enable cursor
if [["$ Out" \u003d\u003d "0" && -n "$ 1"]]
Then.

rm -fr "$ 0_out"
EXIT 0.
ELIF [["$ Out" \u003d\u003d "1" && -n "$ 1"]]
Then.
Kill -9 "$ PID_TEST" 1\u003e / dev / null 2\u003e / dev / null
Cat "$ 0_out" | SED "/ ^ $ / d; / sample data / d; / CPU Frequency / d; / Parameters Are Set /, / Data Alignment Value / D"
rm -fr "$ 0_out"
EXIT 1.
ELIF ["$ Out" \u003d\u003d "1"]
Then EXIT 1.
ELIF ["$ Out" \u003d\u003d "2"]
Then.
Echo -en "\\ 033)