{"id":4522,"date":"2018-07-26T16:34:45","date_gmt":"2018-07-26T16:34:45","guid":{"rendered":"https:\/\/geekdecoder.com\/?p=4522"},"modified":"2018-07-26T16:34:45","modified_gmt":"2018-07-26T16:34:45","slug":"stress-test-centos-with-stress","status":"publish","type":"post","link":"https:\/\/www.qbytes.cloud\/index.php\/2018\/07\/26\/stress-test-centos-with-stress\/","title":{"rendered":"Stress Test CentOS with Stress"},"content":{"rendered":"<p>First, you need to download the file using Wget and then install it using RPM on your system to enable the EPEL repository.<\/p>\n<p>RHEL\/CentOS 7 64 Bit<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n\n# wget http:\/\/dl.fedoraproject.org\/pub\/epel\/epel-release-latest-7.noarch.rpm\n# rpm -ivh epel-release-latest-7.noarch.rpm\n\n<\/pre>\n<p>## RHEL\/CentOS 6 64-Bit ##<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n\n# wget http:\/\/dl.fedoraproject.org\/pub\/epel\/6\/x86_64\/epel-release-6-8.noarch.rpm\n# rpm -ivh epel-release-6-8.noarch.rpm\n\n<\/pre>\n<p>Check the installation<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# yum repolist\n*epel\/x86_64 Extra Packages for Enterprise Linux 7 - x86_64\n<\/pre>\n<p>Now, install stress<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# yum install stress\n<\/pre>\n<p>To test, first run the uptime command and note down the load average. Next, run the stress command to spawn 8 workers spinning on sqrt() with a timeout of 20 seconds. After running stress, again run the uptime command and compare the load average.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# uptime\n16:39:03 up 1 day, 18:32,  1 user,  load average: 0.15, 0.24, 0.14\n<\/pre>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nsudo stress --cpu  8 --timeout 20\nstress: info: &#x5B;65429] dispatching hogs: 8 cpu, 0 io, 0 vm, 0 hdd\nstress: info: &#x5B;65429] successful run completed in 20s\n<\/pre>\n<p>Now uptime again<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# uptime\n 16:40:18 up 1 day, 18:34,  1 user,  load average: 1.35, 0.59, 0.27\n<\/pre>\n<p>Spawn 8 workers spinning on sqrt() with a timeout of 30 seconds<\/p>\n<p>]# uptime<br \/>\n 16:41:52 up 1 day, 18:35,  1 user,  load average: 0.28, 0.43, 0.24<br \/>\n[root@server rogerp]# sudo stress &#8211;cpu 8 -v &#8211;timeout 30s<br \/>\nstress: info: [65654] dispatching hogs: 8 cpu, 0 io, 0 vm, 0 hdd<br \/>\nstress: dbug: [65654] using backoff sleep of 24000us<br \/>\nstress: dbug: [65654] setting timeout to 30s<br \/>\nstress: dbug: [65654] &#8211;> hogcpu worker 8 [65655] forked<br \/>\nstress: dbug: [65654] using backoff sleep of 21000us<br \/>\nstress: dbug: [65654] setting timeout to 30s<br \/>\nstress: dbug: [65654] &#8211;> hogcpu worker 7 [65656] forked<br \/>\nstress: dbug: [65654] using backoff sleep of 18000us<br \/>\nstress: dbug: [65654] setting timeout to 30s<br \/>\nstress: dbug: [65654] &#8211;> hogcpu worker 6 [65657] forked<br \/>\nstress: dbug: [65654] using backoff sleep of 15000us<br \/>\nstress: dbug: [65654] setting timeout to 30s<br \/>\nstress: dbug: [65654] &#8211;> hogcpu worker 5 [65658] forked<br \/>\nstress: dbug: [65654] using backoff sleep of 12000us<br \/>\nstress: dbug: [65654] setting timeout to 30s<br \/>\nstress: dbug: [65654] &#8211;> hogcpu worker 4 [65659] forked<br \/>\nstress: dbug: [65654] using backoff sleep of 9000us<br \/>\nstress: dbug: [65654] setting timeout to 30s<br \/>\nstress: dbug: [65654] &#8211;> hogcpu worker 3 [65660] forked<br \/>\nstress: dbug: [65654] using backoff sleep of 6000us<br \/>\nstress: dbug: [65654] setting timeout to 30s<br \/>\nstress: dbug: [65654] &#8211;> hogcpu worker 2 [65661] forked<br \/>\nstress: dbug: [65654] using backoff sleep of 3000us<br \/>\nstress: dbug: [65654] setting timeout to 30s<br \/>\nstress: dbug: [65654] &#8211;> hogcpu worker 1 [65662] forked<br \/>\nstress: dbug: [65654] <-- worker 65659 signalled normally\nstress: dbug: [65654] <-- worker 65658 signalled normally\nstress: dbug: [65654] <-- worker 65660 signalled normally\nstress: dbug: [65654] <-- worker 65656 signalled normally\nstress: dbug: [65654] <-- worker 65655 signalled normally\nstress: dbug: [65654] <-- worker 65657 signalled normally\nstress: dbug: [65654] <-- worker 65662 signalled normally\nstress: dbug: [65654] <-- worker 65661 signalled normally\nstress: info: [65654] successful run completed in 30s\n[root@server rogerp]# uptime\n 16:43:10 up 1 day, 18:37,  1 user,  load average: 1.87, 1.06, 0.49\n\n[\/bash]\n\n\n\n<\/p>\n","protected":false},"excerpt":{"rendered":"<p>First, you need to download the file using Wget and then install it using RPM on your system to enable the EPEL repository. RHEL\/CentOS 7 64 Bit # wget http:\/\/dl.fedoraproject.org\/pub\/epel\/epel-release-latest-7.noarch.rpm # rpm -ivh epel-release-latest-7.noarch.rpm ## RHEL\/CentOS 6 64-Bit ## # wget http:\/\/dl.fedoraproject.org\/pub\/epel\/6\/x86_64\/epel-release-6-8.noarch.rpm # rpm -ivh epel-release-6-8.noarch.rpm Check the installation # yum repolist *epel\/x86_64 Extra Packages &#8230; <a title=\"Stress Test CentOS with Stress\" class=\"read-more\" href=\"https:\/\/www.qbytes.cloud\/index.php\/2018\/07\/26\/stress-test-centos-with-stress\/\" aria-label=\"Read more about Stress Test CentOS with Stress\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-4522","post","type-post","status-publish","format-standard","hentry","category-administration"],"_links":{"self":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/4522","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/comments?post=4522"}],"version-history":[{"count":0,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/4522\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/media?parent=4522"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/categories?post=4522"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/tags?post=4522"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}