|
|
YOUR FEEDBACK
SOA World Conference
Virtualization Conference $50 Savings Expire June 24, 2008... – Register Today! Did you read today's front page stories & breaking news?
SYS-CON.TV SYS-CON.TV WEBCASTS |
TOP LINKS YOU MUST CLICK ON Industry News
An Inexpensive Network Emulator for Testing Applications
Pre-deployment application behaviors
By: Stu Mitchell
Nov. 10, 2006 11:00 AM
Digg This!
Page 2 of 2
« previous page
Testing Methodology
Testing
Netem is used to emulate the properties of wide area networks such as delay, bandwidth restrictions, and packet loss. The code is available in recent Linux kernels; version 2.6 and higher will suffice. Netem was used to implement network delay (e.g., 10ms latency) on a laboratory PC running Fedora Core 4 Linux distribution with 100Mbps LAN ports. To restrict bandwidth, Quality of Service (QoS) controls were implemented using the hierarchical token bucket. Extensive documentation is available on the Web at the following locations:
The emulator was configured as a bridge to eliminate the need for changing IP addresses on the client. Queuing parameters were applied to both interfaces (eth1 and eth0) to shape both incoming and outgoing traffic. Eth0 is the upstream interface, which is connected to the wide area network. Eth1 is the downstream interface, which is connected to the client. Commands
# Set up Ethernet 1
trpr - Trace Plot Real-Time Collect data using tcpdump, then calculate the rates with trpr and display the results with gnuplot. Trpr requires the hex output. When working with a slower computer, two steps are needed: capture the binary data, then write the hex file for trpr.
tcpdump -l -n -w /tmp/test.dmp Several experiments were run to validate the performance of the emulator. The tests are by no means exhaustive, but they do show that the emulator performs as expected. Figure 3 shows the result of an iperf (bandwidth test) session over a 100Mbps LAN link, using two Pentium 400s with the Linux OS. The plot was produced using the tools described above: tcpdump, trpr, and gnuplot. The transfer rate is about 80 Mbps. Next, two plots are made with the simulator between the sending and receiving station. The first plot (See Figure 4) shows the results of setting the emulator at 128Kbps (in/out), and the second plot (See Figure 5) shows the results for a T1 (1.54Mbps). The latency is 80ms.
Lab-grade Testing One-way latency was measured as the "netem" latency parameters were varied from 0ms to 1000ms. The results are listed in Table 3. Except for 0ms latency, the actual performance was about 11ms slower than the delay parameter as set. For example, the "netem" delay parameter was set to 20ms and the measured response was 30.8ms. Throughput was measured to determine if the set queuing speed matched. Using the same test configuration as above, measurements were taken at T1 speeds and 128Kbps speeds. (Figure 6) At T1 speed (1.544M bits per second), the measured throughput was 194 frames per second. Each frame was 1000 bytes long, which is equal to a rate of 1.552Mbps [1000 bytes X 194 frames X 8 bits/byte = 1552000 bits per second]. When the emulator was set for 128Kbps, the measured results were 15 frames per second, which corresponds to 120Kbps. (Figure 7) Again, this is probably close enough for qualitative measurements. (Packet sizes could be varied to see if finer resolution may be obtained.) A packet sniffer captured traffic through a bridge (i.e., br0), and there seemed to be a discrepancy between the number of packets measured versus the number of packets sent by the Spirent test equipment. Ethereal (sniffer) indicated the packet was 996 bytes long, not 1000, as configured on the Spirent test equipment. The Ethernet header was 14 bytes, the IP header was 20, and the rest of the packet was 942. This is moot for the purposes of this test, but further work should be conducted to account for the "missing" 4 bytes.
References Page 2 of 2 « previous page ENTERPRISE OPEN SOURCE MAGAZINE LATEST STORIES . . .
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
|
SYS-CON FEATURED WHITEPAPERS MOST READ THIS WEEK |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||