Load testing using another server¶
Configuring an Ubuntu server¶
-
Install Xvfb, Xorg to work with a virtual output device
-
Install a dummy sound card (this step may be skipped in Ubuntu 20.04 and newer)
-
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 Section "ServerFlags" Option "MaxClients" "2048" EndSection
-
Install Apache and set up SSL, if you plan to place a player test page on the same server
-
Install Chrome
Scripts for load testing¶
A gzip file with scripts to perform load testing can be downloaded here.
The archive contains
- the
player
directory containing Web player scripts start_xorg.sh
- the script to start Xorgloadtest.sh
- the script to start tests
Scripts of the player must be available from the Apache HTML directory: place the player directory to /var/www/html/tests/player
, for example. The player.html
test page accepts parameters. For example:
The following parameters are supported
- stream name:
streamName=test
- autoplay:
autoplay=true
- resolution:
resolution=640x480
(in this case, transcoding will be enabled on WCS server, that inscreases server CPU load) - media playback technology:
mediaProvider=WebRTC,MSE
You can also use Embed Player
page directly from WCS server to test:
https://wcs:8888/embed_player?urlServer=wss://wcs:8443&streamName=test&mediaProviders=WebRTC&autoplay=true
The loadtest.sh
script can accept the following parameters:
mandatory:
url
- the URL of the player page with all parameters orurlsfile
- the path to a file that contains multiple such URL that will be used one by one
optional:
stressrate
- time interval of adding a new subscriber, in millisecondsttl
- lifetime of a subscriber in secondsmaxsubscribers
- maximum number of subscribers