Test 1: On-demand Load


Test #1: On-demand Load

This is the most basic test and will tell you more about the system than any of the others. The Fabrikam technicians will create five or so test files with the encoder, and then stream them to the client.

Encoding Test Files

The first step is to create the test files. The technicians follow these steps to encode content for the tests:

  1. Connect a video source to the video capture card and audio card.

    Use a capture utility, such as Microsoft VidCap32 or Windows Media 9 Capture, to confirm that the capture card driver is working properly by setting the program to preview the incoming video feed.

    Open the volume control and confirm that the audio driver works, and the audio is set properly. You can use an audio program that has an accurate audio meter to set up the sound level.

    After you have confirmed the driver works, close the capture program.

  2. Open Windows Media Encoder 9 Series.

    There are many ways to configure the encoder. However, for these tests, the technicians will use the New Session wizard and preconfigured compression settings. In the New Session dialog box, they click the Capture audio or video wizard, and then make the following selections:

    • Select the video and audio capture devices.

    • Enter a file name and path to be used for the first output file, such as c:\media\test1.wmv.

    • In Content Destination, select Windows Media server.

    • In Encoding options, select Multiple bit rates (CBR) for video and audio. In Bit rate, select only the 125 Kbps check box for the first file. For the other four or five files, use different bit rates, and try a file that contains two or three bit rates. For example, encode a file at 160 Kbps and another at 332 Kbps.

    • Enter metadata such as title and author.

  3. Encode 30 to 60 seconds of the video source. As the encoder runs, the technician keeps an eye on CPU load in the Monitor panel. If the load is consistently over 60 to 70 percent, the quality of the encoded video may be compromised. You can lower CPU usage by closing programs like screen savers and instant messengers. You can also try closing the Video preview panel.

    You can also configure the encoder to store content temporarily as it is being captured, and then compress and encode the content automatically when the capture is finished. When doing so, the CPU-intensive processes of capturing and encoding are performed at different times, so the quality of the encoded file is less likely to be adversely affected by an overburdened computer. If CPU load is still high, you will have to lower the encoding bit rate.

  4. Open the file in Windows Media Player and check playback. Then repeat steps 2 and 3 to create the remaining test files.

  5. After encoding five or six files, copy them to the default publishing point on each Windows Media server. When Windows Media Services is installed, a set of folders is created. The folder %systemdrive%\WMPub\WMRoot is set as the default publishing point and contains some more sample files that can be used for testing. Move the default publishing point and the content, if necessary, to the new data volume designated for digital media content.

Checking Server Configuration

With the files available to the Windows Media server, the technicians will open the Windows Media Services snap-in and configure the cluster.

  1. On the encoding computer click Start, click Administrative Tools, and then click Windows Media Services. The Windows Media Services snap-in opens.

  2. In the console tree on the left, add a group, and name it Cluster.

  3. Add each Windows Media server to the Cluster group.

  4. Right-click Windows Media Services, click Export console configuration, and then enter a location and name. The next time a technician opens the Windows Media Services snap-in, he can reopen the group by importing the configuration file.

  5. In the console tree on the left, expand each server, and then expand Publishing Points. On each, click the default publishing point, and then click the Source tab in the details pane. The new files should appear in the Source list. If you add files after opening the Source tab, click the Refresh button to update the list. If you copy files to a new data volume, make it the source of the default publishing point.

  6. By default, the root publishing point is set to deny new connections as a security measure. Before content can be streamed from the publishing points, a technician must click the Allow new unicast connections button on the row below the list on each server.

  7. On each server, on the Properties tab, click the Logging plug-in and enable client logging. The client log provides a detailed record of client activity, such as listing all clients, the streams they played or attempted to play, times, and errors. The Fabrikam test will not necessarily use this log. However, logging adds to the load on the servers and will therefore give a more complete picture of the server as it would function in production.

Streaming Files

With the server cluster configured, the technicians can start streaming content to Windows Media Player. These are the procedures used for the test:

  1. On the client computer, open Windows Media Player 9 Series.

  2. Open and stream one of the test files. In the Open URL dialog box, type the URL of the file (rtsp://WMCluster/test1.wmv). If the file streams correctly, the technicians can go on to the next test and use Windows Media Load Simulator. If there is a problem, they will retrace their steps and locate the source of the problem. The following are potential problem areas:

    • Wrong URL. The Player displays the error message “File or path not found.” Make sure that the file is in the default root folder, and that the file name and path are correct in the URL.

    • Network connectivity. The Player displays the error message “Server not found.” The Player might not find a server because of a mistyped URL or a problem with the network cable or switch.

    • NLB service. The Player displays a “Server not found” error if the load balancing service is not working. Try streaming the file directly from a server, using a URL such as rtsp://LAN01/test1.wmv.

    • Security. Windows Media Player displays the error message “Access is denied.” Authorization and authentication have been added to the server or publishing point, and the user who is logged on to the client computer does not have access.

    • Codec. The Player error indicates that you are attempting to stream a file for which there is no codec installed. The Player attempted to download the codec, unless the download codec feature was disabled, but could not locate the codec site to install it.

If your client computer is running an earlier version of Windows, such as Windows 2000, you can use Windows Media Player versions 6.4 or 7, but you will not be able to use the new features that are available only with Windows Media Player 9 Series. Also, earlier versions of the Player do not include the new Windows Media 9 Series codecs.

If your streaming media system must support earlier versions of Windows Media Player, copy one of the files you just encoded to the client, then reconfigure the client computer and connect to the Internet. When you attempt to play the file, Windows Media Player will automatically download the new codecs. Once the codecs are installed, reconnect the client computer to the closed LAN.

Alternatively, you can encode the files with a custom compression setting using an earlier codec.

Configuring Windows Media Load Simulator

Windows Media Load Simulator approximates the processing and network usage of one or more clients streaming content from a server. Windows Media Load Simulator does not use the streams, so it does not need to use the client computer’s CPU and RAM to decompress and render the streams. Without having to decompress the streams, one computer can simulate the load of a hundred or more clients. Even though the data is not used, the streams are very real from the point of view of the server and the network. The server and network behave during a simulation the same as they would under a real load.

Windows Media Load Simulator should not be used to test server load over the production network because it can affect the operation of the entire network. However, Windows Media Load Simulator is sometimes used to establish a performance baseline, which is difficult to do in a lab environment. If you choose to use Windows Media Load Simulator in production, be aware of the security, operational, and network risks involved in doing so.

As you run Windows Media Load Simulator, check the performance of the Windows Media server computers and the streams that they are delivering by using the Windows Media Performance Monitor. The Performance Monitor gives you the picture from the server side. At the same time, Windows Media Load Simulator displays streaming errors that are generated as it attempts to connect, stream, and seek within streams. After you run a simulation, you can check the performance and error logs created by Windows Media Load Simulator. All of this information will give you an understanding of how the servers will function under various load conditions.

As the Fabrikam technicians set up Windows Media Load Simulator, you will see that many different usage scenarios that can be created. You can simulate the load of almost any number of clients. You can set the number of clients and assign various tasks to them. For example, you can have 30 clients playing files all the way through, 10 clients just opening and closing connections, and 10 more seeking in files. You can also monitor the effect of using authentication and authorization. Handling security and client control add to the load on the server and bandwidth usage on the network.

Before opening Windows Media Load Simulator, make sure you log on to the same user account that was used to install the program (usually the administrator account). This is important because Windows Media Load Simulator installation makes changes to the Windows Media Player configuration file that is individualized for each user. If you do not log on as the user who installed Windows Media Load Simulator, you will not be able to stream using the MMS protocol.

The following procedures are used to configure Windows Media Load Simulator for testing:

  1. Open Windows Media Load Simulator.

  2. On the Tools menu, click Configurations (Wizard).

  3. In the wizard, enter the following information:

    • Enter the name of the target server for the load test. In this case, the Fabrikam technicians enter the cluster address (WMCluster).

    • Select the protocols to use. Select both MMS protocols (MMST and MMSU) and both RTSP protocols (RTSPT and RTSPU), but not HTTP. The MMST and RTSPT options use the TCP/IP transport protocol; the MMSU and RTSPU options use the UDP transport protocol.

    • Add the names of the test files. The files and the protocols selected are added to the list, as shown in the figure 17.2.

    click to expand
    Figure 17.2: Files have been selected for the streaming test.

    • Enter client profiles. A profile is a client behavior. Enter the number of clients you would like to stream content for one or more behaviors. Figure 17.3 shows a sample profile configuration.

    click to expand
    Figure 17.3: A client profile configuration.

    • Test duration. The Fabrikam technicians will stop the simulator manually, but you can specify a test duration.

    • Enable Client-side Logging. Select this check box to send client
      activity information to the Windows Media server logging system on each server. You may want to use the logs to study the simulation results, such as to see how NLB redirects client requests. However, because the simulator does not actually use the streams, the information may not tell you very much.

    • Enable Load Simulator Logging. Select this check box and enter a location for saving the log file. This log shows the test results generated by Windows Media Load Simulator. An entry is made for each client describing the client’s streaming experience. Figure 17.4 shows a sample client entry taken from a log opened in Microsoft Excel.


    Figure 17.4: Load Simulator log information can be viewed in Excel.

    • Turn off Server Performance Logging. This log records the server performance monitor. However, because clients will be connecting to the cluster, no performance information can be obtained to create the log. You can view Windows Media Performance Monitor on each computer or from the group in the Windows Media Services MMC snap-in.

HTTP is not enabled when you install Windows Media Services because it uses port 80 by default, which is the same port used by IIS. If you want to try HTTP streaming, enable the protocol in the Windows Media Services snap-in and change the HTTP port number. Then add the port number to the URL in Load Simulator (for example, http://WMCluster:8090/test1.wmv).

For the client profiles, you may want to start with a conservative number and a straightforward profile, just to see how the program works. For example, you might enter 10 clients in the Long Play profile, and 0 in all the others. Clients with the Long Play profile simply play the content. If the 10 clients are streaming a 100 Kbps file, you should see a total bandwidth of around 1000 Kbps. Clients with the Seek profile simulate users seeking to different parts of files. As you run the simulation, you will notice that bandwidth fluctuates with the content. With different profiles, the bandwidth increases as clients perform actions, like opening and closing files and seeking. For more information about the meaning of the different profiles, see Windows Media Load Simulator Help.

After you are comfortable with the results, you may want to see what happens when 30 clients connect and play content all the way through, five receive content through progressive streaming, and 10 seek or change playback position within files. Simply streaming a file adds one kind of load to the server. Opening, closing, seeking, and other client actions add another kind of load. As you add different profiles, you can see how different aspects of the server are affected by watching the performance monitors.

Before you can run a simulation, you must place a Windows Media file with the name WMLoad.asf in the root folder of each server (\WMPub\WMRoot). Any Windows Media file can be used. Pick one that is small, copy it to the WMRoot folder, and rename it.

This file serves as a simple security measure to prevent unauthorized simulations against a server. The file can be any Windows Media file. The important thing is the name. Without this file present in the default root folder, Windows Media Load Simulator will not stream from the server. Windows Media Load Simulator is designed to test loading in a protected environment. In production, the program could be used to launch a denial of service attack. To prevent unauthorized users from running simulations, remove the file when the servers are in production.

To view the performance of the system during the test runs, the Fabrikam technicians open the following system monitors:

  • Client Task Manager. On the client computer, run Task Manager and keep an eye on CPU Usage on the Performance tab.

  • Group details. In the Windows Media Services MMC snap-in on the encoding computer, watch the group of servers in the details pane, which will show connections and bandwidth usage.

  • Server Performance Monitor. Expand each server in the group, and then click the View Performance Monitor button on the bottom row of the Monitor tab for each server. You can add or remove performance counters to get different views of the servers, and you can view the performance of the whole server or individual publishing points. You can also monitor load-balancing operations by creating a Windows Media Performance Monitor configuration with all the servers listed in a common view. For more information about the counters, see Windows Media Services Help.




Microsoft Windows Media Resource Kit
Microsoft Windows Media Resource Kit (Pro-Resource Kit)
ISBN: 0735618070
EAN: 2147483647
Year: 2005
Pages: 258

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net