Stress Test Your Ubuntu Computer with ‘Stress’Sometimes, stress testing a  (despite what

it uses) can be a very useful thing. For example, if you have a faulty hardware, say a , then you can run disk I/O intensive tests to see whether it is stable or not.Or, if you have just overclocked your hardware (CPU, GPU, RAM …) and want to make sure that it won’t make your computer unstable, before applying those changes permanently, then stress testing is among the best ways of knowing that also (or for evaluating the capability of your PC in general).Stress testing can also be used to benchmark certain software applications, such as an

or a

(for instance) as well. If you use Ubuntu and prefer a tool with a GUI, then . It has a simple user interface and very easy to use, and is primarily a benchmarking tool. But, if you are okay with using the command-line, then you can also try ‘Stress’.It lets you put stress on your:*. CPU*. RAM*. Disk Drive (only supports write tests).It can not stress other hardware such as the GPU though. You can also delay the starting of the stress tests and make it automatically exit after running for a certain amount of time (in seconds) as well.Remember, ‘Stress’ is not actually a benchmarking utility, as it does not give you any speed related outputs (like ‘lbench’ does), but is only a utility that lets you stress your computer. Still, you can use it as a work load generator, for while benchmarking other utilities, such as an I/O scheduler, as mentioned above too.If interested, you can install it in Ubuntu 12.10 Quantal Quetzal, 13.04, 12.04 Precise Pangolin, 11.10, 10.10 and 10.04 by using the below command in your Terminal window.sudo apt-get install stressHow to use it?You can use ‘Stress’ to stress the above mentioned hardware individually or you can stress them all at the same time too.If you , then you can use it in the below format (on your Terminal window, of course).stress -c Depending on the type of your CPU, make sure to replace ‘‘ accordingly. For example, if you have a CPU with four cores and would like to stress them all, then you should be using the below command.stress -c You can also enter a number, higher than the available CPU cores for adding a lot more stress on the CPU as well. In other words, if I put 50 individual processes to stress my CPU (‘stress -c ‘), rather than using 4 processes, it will make the OS more unstable.Note: You can cancel (exit) ‘Stress’ anytime by pressing ‘Ctrl’ + ‘c’ keys or by closing the Terminal window.Let’s say that I wanted to stress my 4GB RAM module using three processes, with each about 256 in size (by default). Then I’ll use the below command.stress -m You can again replace ‘‘ with the number of processes to be used, plus, can also change the size of the processes by using the ‘–vm-bytes …’ attribute.So if I wanted to use

process with each sizing around 300MiB, then I’ll use the below command.stress -m

–vm-bytes 300MNote: However, for stressing your RAM, the CPU also has to do a lot of work as well. And as a result, if the used processes were more or equal to the available cores, then they will use 100% of your CPU power.If you want to stress the disk drive only, then use the below command.stress -d ‘‘ represents the number of processes that will be used to stress your disk drive. Again, you can replace this number accordingly. By default, ‘Stress’ uses 1GB file size for each process (you use the ‘–hdd-bytes’ argument for changing that), so make sure your have enough free space left before running this test.For stressing my HDD with 2 processes, with each sizing around 512MB, I can use the below command.stress -d

–hdd-bytes 512MNote: Unlike with the RAM stress test, HDD stress test does not require a lot of CPU usages.If I wanted to stress the CPU, RAM and the HDD at the same time, then I can use it in the below format.stress -c 4 -m 2 -d 1As you can see, in this instance, ‘Stress’ will stress the CPU using four processes, RAM will be stressed using 2 processes (each sizing around 256MiB) and the disk will be stressed with a process that is about 1GB in size.‘Stress’ also lets you run these tests for a chosen time frame. Let’s say that I wanted to run the above test, only for 40 seconds, then I’ll simply add the ‘-t’ argument and the new command will look like the below one.stress -c 4 -m 2 -d 1 -t 40sAfter running for 40 seconds, it will exit automatically.You can also use the ‘-t’ argument while running other individual tests as well. Its manual contains all these details. You can use the below command for reading it.man stressBut please remember that, stressing your hardware unnecessarily is not recommended as it can easily damage them. So use it only, when it is absolutely necessary.Related PostsAn RHCE, ‘Linux’ user with 14+ years of experience. Extreme lover of Linux and FOSS. He is passionate to test every Linux distribution & compare with the previous release to write in-depth articles to help the FOSS community.I was looking for a way to stress my cpu to so that I can check that my cooler master hyper tx3 cpu cooler was working or not. It works nicely. Thanks a lot.Is there any way to load CPU with 75% or 50%? I mange to load 25% by adding some usleep into code but cant get 75% of CPU load.Hi Gayan,I am new to linux, want to try learn it, bought a cheap second hand intel core2 dell, with 3 gig ram, and 160g HDD, I want to stress the system to check if machine is ok, like not overheating.What would be a nice stress that I could run for a long period to monitor it?Regards,HenryIs it possible to write the output of these commands to file? or is it possible to run these with vmstat etc simultaneously?or do i need to run the stress and compare vmstat before and after stress?Hi!One quick question,If I do:stress -m 4do I actually testing all of ram but sequentially, or I’m just testing couple of megs like a range for example from 0 to 600M ? Do the program testing all of my ram just writing to different location and freeing other and then accomplish test of all of my ram eventually?I don’t know how to ask, but do I have to know special command for testing 8 gigs of ram to be tested properly all of them? For example:stress -m 4 –vm-bytes 1000MDo I actually testing only range of ram from 0 – 1000M or its only chunk of data tested in one sub test and freed step by step, eventually testing all of my ram?I’m not a specialist, but its good to know how it works, cause I don’t know how to test my 8 gigs of ram, cause I can’t do it with memtest86+ cause the never version (only new version is working properly from what I know for newer ram modules) is only for UEFI bios and I don’t have one. Its relatively new hardware but without UEFI support. The ram is Patriot 1600MHz, and when I do memtest86+, at first it just works and then it is slowing down. So the gurus from memtest are recommending me to use newer memtest like from 6 version, but It cant run from non UEFI bios and its sad…Also if anyone knows how to run this never memtest, let me know please.Checkout this tool we have created for linux. It uses stress and has a stress options menu. It also show the current Frequency Utilization and Temperature of you CPU. Perfect for stability testingThis site uses Akismet to reduce spam. .Recent PostsContactAbout HecticGeekWelcome to HecticGeek, it is an independent blog founded back in 2010. We cover in-depth Linux OS, product review with other all technology-related software and tools. Our mission is to provide valuable and trustful technology-related content to our users.

Leave a Reply

Your email address will not be published.