1. Install Xvfb, Xorg to work with a virtual output device
apt-get install xvfb -y apt-get install x11-xkb-utils xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic xserver-xorg-core xserver-xorg-video-dummy alsa-base -y |
2. Install a sound card dummy
apt-get install linux-image-extra-4.4.0-62-generic -y modprobe snd-dummy |
3. Configure a virtual video device: edit the configuration file/usr/share/X11/xorg.conf.d/xorg.conf
Section "Device" Identifier "Configured Video Device" Driver "dummy" Option "ConstantDPI" "true" VideoRam 192000 EndSection Section "Monitor" Identifier "Configured Monitor" HorizSync 31.5-48.5 VertRefresh 50-70 Modeline "1600x1200" 22.04 1600 1632 1712 1744 1200 1229 1231 1261 Modeline "1600x900" 33.92 1600 1632 1760 1792 900 921 924 946 Modeline "1440x900" 30.66 1440 1472 1584 1616 900 921 924 946 ModeLine "1366x768" 72.00 1366 1414 1446 1494 768 771 777 803 Modeline "1280x1024" 31.50 1280 1312 1424 1456 1024 1048 1052 1076 Modeline "1280x800" 24.15 1280 1312 1400 1432 800 819 822 841 Modeline "1280x768" 23.11 1280 1312 1392 1424 768 786 789 807 Modeline "1360x768" 24.49 1360 1392 1480 1512 768 786 789 807 Modeline "1024x768" 18.71 1024 1056 1120 1152 768 786 789 807 Modeline "768x1024" 19.50 768 800 872 904 1024 1048 1052 1076 EndSection Section "Screen" Identifier "Default Screen" Monitor "Configured Monitor" Device "Configured Video Device" DefaultDepth 24 SubSection "Display" Depth 24 Modes "1600x1200" "1680x1050" "1600x900" "1400x1050" "1440x900" "1280x1024" "1366x768" "1280x800" "1024x768" EndSubSection EndSection |
4. Install Apache
apt-get install apache2 |
5. Install Chrome
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list apt-get update apt-get install google-chrome-stable |
A gz file with scripts to perform load testing can be downloaded here.
The archive contains
Scripts of the player must be available from the Apache HTML directory: place the player directory to, for example /var/www/html/tests/player.
The player.html test page accepts parameters. For example:
http://<server IP>/tests/player/player.html?streamName=test&autoplay=true |
The followin parameters are supported
The loadtest.sh script can accept the following parameters:
required
optional
1. Start Xorg
./start_xorg.sh |
2. Start loadtest.sh with chosen parameters
For example,
./loadtest.sh -url http://127.0.0.1/tests/player/player.html -maxsubscribers 50 -stressrate 1000 |
or
./loadtest.sh -urlsfile urls.txt -stressrate 500 -ttl 30 -maxsubscribers 50 |