Load test a Wowza Streaming Engine server

When scaling with Wowza Streaming Engine™ media server software to make streams available to larger audiences, we recommend load testing your Wowza Streaming Engine servers. You can do this by generating simulated player connections to a Wowza Streaming Engine instance to determine how many concurrent streams it can handle before it starts to slow down or get overloaded. The number of concurrent streams that Wowza Streaming Engine can comfortably manage varies depending on server hardware, network configuration, stream type, stream bitrate, and connection types. The only sure way to determine the limits for a particular configuration is to perform load tests that show when performance is likely to degrade. This article explains how to perform load tests with a Wowza Streaming Engine instance and an industry standard load testing tool, Apache JMeter™.

About load testing


A single computer running a load testing tool can simulate hundreds of player connections. A load testing tool is run on one or more computers that we'll call the client computer(s). We'll call the Wowza Streaming Engine installation that's being tested the target computer. Depending on the amount of traffic you want to simulate, you may need to run the tool on several client computers.

Load test a Wowza Streaming Engine server with Apache JMeter


We recommend using an industry standard load testing tool like Apache JMeter to load test your Wowza Streaming Engine servers. The following sections explain how to configure a basic test plan for simulating HLS or MPEG-DASH player connections to a Wowza Streaming Engine instance using Apache JMeter. Use this as an example for creating a test plan customized for your needs.

Configure the target computer

You don't need to install a load testing tool on the target computer. You just need a properly tuned Wowza Streaming Engine installation that is hosting the live or VOD content that you want to test. To tune the Wowza Streaming Engine instance on your target computer, see Tune Wowza Streaming Engine for optimal performance.

Notes: 
  • Make sure port 1935 (or the port you are using for load testing) is open on your router, firewall, and/or software firewall for the target computer.
  • For VOD streaming, much of the Wowza Streaming Engine instance’s performance is driven by the underlying system's I/O performance. Wowza Streaming Engine can only deliver streams as fast as the server can deliver bits from the disk to the server. To get the most server throughput, we suggest that you use RAID 0 or RAID 10 configurations with as many disks as possible in the RAID array.

Configure the client computer(s)

You may want to use a virtual machine or multiple virtual machines to quickly set up client computers. We recommend tuning the client computer(s) for optimal network performance.

Note: Apache JMeter is a Java-based application and is compatible with Java 8 or higher. Before you install and configure JMeter, if your client computer(s) does not already have a compatible version of Java installed, install Java.

Configure Apache JMeter

 
  1. Download and unzip Apache JMeter on a client computer.
  2. Download the JMeter Plugins Manager and copy it to the /lib/ext folder within the JMeter download.
  3. Install JMeter by running one of the following files in the bin folder within the JMeter download:
    • Linux: jmeter
    • Windows: jmeter.bat
    • macOS: jmeter.sh

    The JMeter user interface should launch.
  4. In JMeter, go to the Options menu and then click Plugin Manager.
  5. Click the checkbox for BlazeMeter - HLS Plugin.
  6. Click Apply Changes and Restart JMeter.

Create a test

 
  1. Right-click Test Plan and then click Add > Threads (Users) > Thread Group.
  2. On the Thread Group page, configure the following settings:
    • Number of Threads (users) – Enter the number of users to simulate. For example, 600. The number of player connections to simulate per client computer will depend on the type of client computer used and its processing capabilities.
    • Ramp-up period (seconds) – Enter the time, in seconds, for JMeter to get the full number of threads chosen up and running. For example, 10.
    • Loop Count – Click the Infinite checkbox to loop the thread connections until you stop the test. Alternatively, you can leave Infinite unchecked and specify the number of times to run the test.
  3. Right-click Thread Group and then click Add > Config Element > HTTP Request Defaults.
  4. On the HTTP Request Defaults page, click the Advanced tab.
  5. Configure the following Timeouts (milliseconds) settings:
    • Connect – Enter the time, in milliseconds, to wait for a connection to open. For example, 2000.
    • Response – Enter the time, in milliseconds, to wait for a response. For example, 5000.
  6. Right-click Thread Group and then click Add > Sampler > bzm - Streaming Sampler.
  7. On the bzm - Streaming Sampler page, configure the following settings:
    • Video: URL – Enter an HLS or MPEG-DASH playback URL with the IP address, streaming port, application name, and live or VOD stream name of the Wowza Streaming Engine instance on the target computer, similar to the following examples:

      HLS: http://[address]:[port]/[application]/[streamName]/playlist.m3u8
      MPEG-DASH: http://[address]:[port]/[application]/[streamName]/manifest.mpd

      See About playing Wowza Streaming Engine streams for information about playback URL formats for different streaming protocols and Wowza Streaming Engine.
    • Duration: Video Duration (seconds) – Click the option button to enable this and then enter the time, in seconds, for the video to play. For example, 120.
  8. Save the test plan (.jmx file) in the /bin folder in the JMeter directory.
  9. To copy this configuration and test plan to other client computers, create a .zip file of the entire JMeter directory and then copy it to the other client computers and unzip the contents.

Run the test plan

Before you run the test, confirm that the stream to test is ready on the target computer:

  • Live applications: Verify that the live stream is running.
  • VOD applications: Verify that the VOD file is in [install-dir]/content.

For optimal results, JMeter recommends running a test plan in CLI mode (Command Line mode).

  1. Launch JMeter if it is not already running.
    • Linux: jmeter
    • Windows: jmeter.bat
    • macOS: jmeter.sh
  2. Open a command-line interface.
  3. Change directories to the /bin folder within the JMeter install directory:
    cd [JMeter-install-dir]/bin
  4. Run the test plan with a command similar to the following example:
    ./jmeter -n -t [test-plan-name].jmx -l [test-results].jtl

    where [test-plan-name] is the name you selected when saving your test plan and [test-results] is a name of a file to create and save the test results.
  5. To stop running the test, enter Ctrl+. (or Command+. on macOS).

As your test runs, some of the test logs will appear in the command line interface similar to this:

summary +  15760 in 00:00:30 =  525.4/s Avg:   282 Min:     0 Max:  5715 Err:     0 (0.00%) Active: 600 Started: 600 Finished: 0
summary = 29266813 in 15:35:55 =  521.2/s Avg:   241 Min:     0 Max: 30161 Err:  1683 (0.01%)
summary +  15434 in 00:00:30 =  514.5/s Avg:   284 Min:     0 Max:  5349 Err:     0 (0.00%) Active: 600 Started: 600 Finished: 0
summary = 29282247 in 15:36:25 =  521.2/s Avg:   241 Min:     0 Max: 30161 Err:  1683 (0.01%)

Complete logs are saved to jmeter.log in the /bin folder by default.

You can also monitor your application and server performance from the Wowza Streaming Engine instance on the target computer. The Monitoring page for an application, the Server Monitoring page, and the Virtual Host Monitoring page provide comprehensive metrics with real-time data about CPU and memory usage, connection counts, client players, applications, and network statistics. For more information, see Monitor server connections, load, and application statistics in Wowza Streaming Engine.

After your test is stopped, you can view your test results in the /bin folder if you specified a file when starting the test.

More resources