How to Stress your CPU in Linux

I found very simple methods to stress your CPU in Linux I know it’s not the requirement we are getting but sometimes for testing we can do that. yes and dd command can help to put the stress

  I have one Linux VM hosted on VMware Workstation I allocated two CPU each with 2 cores.                                                                                                                                                                                                      

Yes > /dev/null &” Command

On First core of Second CPU :

 1

On First Core of First CPU.

 2

On Second core of each CPU it got distributed equally.

3 

 

Now all cores are 100% utilized.

 4

 

Issued kill command to kill the yes. Utilization came normal.

 5

 

“dd if=/dev/zero of=/dev/null” command

Now using the dd command to put the stress on system. it also putting the load in single core only but it will put the load in system space not in user space.

 6

I Opened another terminal and ran the dd command this time in background. Load came into CPU0.

7

Issued another dd command load is distributed now.

 8

 

 

That’s it otherwise CPU is gonna come out and gonna kill me 🙂

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s