User Tools

Site Tools


realtime:documentation:howto:tools:worstcaselatency

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
realtime:documentation:howto:tools:worstcaselatency [2017/02/08 14:24]
anna-maria adapt links to new namespace
realtime:documentation:howto:tools:worstcaselatency [2018/08/23 15:00] (current)
ebugden [Requirements] Add hackbench link
Line 6: Line 6:
  
 Following tools are being used by this test: Following tools are being used by this test:
-  * [[realtime:​documentation:​howto:​tools:​cyclictest|cyclictest]]+  * [[realtime:​documentation:​howto:​tools:​cyclictest:start|Cyclictest]]
   * [[realtime:​documentation:​howto:​tools:​ltp|Linux Test Project]]   * [[realtime:​documentation:​howto:​tools:​ltp|Linux Test Project]]
-  * hackbench (part of the [[https://​git.kernel.org/​cgit/​utils/​rt-tests/​rt-tests.git/​|rt-tests]].)+  * [[realtime:​documentation:​howto:​tools:​hackbench|Hackbench]] ​(part of the [[https://​git.kernel.org/​cgit/​utils/​rt-tests/​rt-tests.git/​|rt-tests]].)
   * other commands like taskset, chrt, ping, dd, tar and netperf which is usually available by default in most linux systems.   * other commands like taskset, chrt, ping, dd, tar and netperf which is usually available by default in most linux systems.
  
Line 23: Line 23:
 time cyclictest -t1 -p 99 -i 1000 -n -l 1000000000000 -d 86400 -m -a 1 time cyclictest -t1 -p 99 -i 1000 -n -l 1000000000000 -d 86400 -m -a 1
 </​code>​ </​code>​
 +
  
 ==== Stress Environments ==== ==== Stress Environments ====
 +Following are some simple scripts which can be used to generate loads on target system:
 +<WRAP center round info 80%>
 +Note that these are reference commands and slight modifications to the commands might be required depending on the version of the command you are using. For example, busybox version of ping does not support the '​-l'​ argument.
 +</​WRAP>​
 +Below test code is background stress for the worst case in RT system.
 <code sh> <code sh>
-# Now, Below test code is background stress for the worst case in RT system. 
 time cyclictest -t50 -p 80 -i 10000 -n -l 100000000000 -d 86400  -a 3 time cyclictest -t50 -p 80 -i 10000 -n -l 100000000000 -d 86400  -a 3
 +</​code>​
  
-taskset -c 2,3 ./​stress.20080904.sh +Following is another way to generate heavy CPU load. 
----------------------------+<​code ​sh>
 #!/bin/sh #!/bin/sh
 # Most hardcore test (Ingo Molnar - http://​lkml.org/​lkml/​2005/​6/​22/​347) # Most hardcore test (Ingo Molnar - http://​lkml.org/​lkml/​2005/​6/​22/​347)
Line 39: Line 45:
 # some source code(ltp-full-20090531) consists of sched_setschduler() with FIFO 99. # some source code(ltp-full-20090531) consists of sched_setschduler() with FIFO 99.
 cd ltp-full-20090531;​ while true; do ./​runalltests.sh -x 40; done  & cd ltp-full-20090531;​ while true; do ./​runalltests.sh -x 40; done  &
-----------------------------+</​code>​
  
-For 100% Usage of CPU Load using ping + 
-# Should ​run as root to preload more than 3 packets.+For 100% Usage of CPU Load using ping. This command should ​run as root to preload more than 3 packets. 
 +<code sh>
 taskset -c 0 /bin/ping -l 100000 -q -s 10 -f localhost & taskset -c 0 /bin/ping -l 100000 -q -s 10 -f localhost &
 taskset -c 1 /bin/ping -l 100000 -q -s 10 -f localhost & taskset -c 1 /bin/ping -l 100000 -q -s 10 -f localhost &
 taskset -c 2 /bin/ping -l 100000 -q -s 10 -f localhost & taskset -c 2 /bin/ping -l 100000 -q -s 10 -f localhost &
 taskset -c 3 /bin/ping -l 100000 -q -s 10 -f localhost & taskset -c 3 /bin/ping -l 100000 -q -s 10 -f localhost &
-----------------------------+</​code>​
  
-For 100% Usage of I/O Load using linux-2.6.30 tar source like tiobench s/w. +For 100% Usage of I/O Load using linux-2.6.30 tar source like tiobench s/w. Don't forget disk total usage ratio (ex: df ). Clone the repository using ''​git clone [[git://​git.kernel.org/​pub/​scm/​linux/​kernel/​git/​stable/linux-stable.git]] linux-stable''​ 
-Don't forget disk total usage ratio (ex: df ). +<code sh>
-git clone git://​git.kernel.org/​pub/​scm/​linux/​kernel/​git/​torvalds/linux-2.6.git linux-2.6.30+
 cd /opt cd /opt
-while true; do taskset -c 0 tar cvzf test1.tgz ​ ./linux-2.6.30 ​; done  & +while true; do taskset -c 0 tar cvzf test1.tgz ​ ./linux-stable ​; done  & 
-while true; do taskset -c 1 tar cvzf test2.tgz ​ ./linux-2.6.30 ​; done  & +while true; do taskset -c 1 tar cvzf test2.tgz ​ ./linux-stable ​; done  & 
-while true; do taskset -c 2 tar cvzf test3.tgz ​ ./linux-2.6.30 ​; done  & +while true; do taskset -c 2 tar cvzf test3.tgz ​ ./linux-stable ​; done  & 
-while true; do taskset -c 3 tar cvzf test4.tgz ​ ./linux-2.6.30 ​; done  & +while true; do taskset -c 3 tar cvzf test4.tgz ​ ./linux-stable ​; done  & 
-----------------------------+</​code>​
  
-# Estimate file space usage ( for I/O Load)+Generating ​I/O load using du 
 + 
 +<code sh>
 while true; do taskset -c 3 /bin/du / ; done  & while true; do taskset -c 3 /bin/du / ; done  &
-----------------------------+</​code>​
  
-Network Stress ( Network Performance & Stress )+Generate network loads 
 +<code sh> 
 +First start the server...
 /​usr/​bin/​netserver /​usr/​bin/​netserver
-/​usr/​bin/​netperf -H 192.168.155.20 ​-t TCP_STREAM -A 16K,16K -l 3600+# then start netperf to connect to the server 
 +/​usr/​bin/​netperf -H <​IP_ADDR_OF_SERVER> ​-t TCP_STREAM -A 16K,16K -l 3600
 # Streamming Stress using firefox webbrowser. # Streamming Stress using firefox webbrowser.
 firefox http://​www.intomail.net/​stream.php firefox http://​www.intomail.net/​stream.php
-----------------------------+</​code>​
  
-USB Disk I/O Stress(External HDD's I/O )+USB Disk I/O Stress(External HDD's I/O ) 
 +<​code>​
 cd /media/usb/ cd /media/usb/
-taskset -c 2 tar cvzf test5.tgz ​ /​media/​usb/​linux-2.6.30 ​&+git clone git://​git.kernel.org/​pub/​scm/​linux/​kernel/​git/​stable/​linux-stable.git linux-stable 
 +taskset -c 2 tar cvzf test5.tgz ​ /​media/​usb/​linux-stable ​&
 </​code>​ </​code>​
 A lot of these tests produce a lot of output. It can be redirected to ''/​dev/​null''​ so that it does not flood the terminal. This can especially be a problem when using a serial console. A lot of these tests produce a lot of output. It can be redirected to ''/​dev/​null''​ so that it does not flood the terminal. This can especially be a problem when using a serial console.
realtime/documentation/howto/tools/worstcaselatency.1486563877.txt.gz · Last modified: 2017/02/08 14:24 by anna-maria