Kernel Korner - Analysis of the HTB Queuing Discipline
In order to test the accuracy and performance of the HTB, we used the following pieces of network equipment: one Ixia 400 traffic generator with a 10/100 Mbps Ethernet load module (LM100TX3) and one Pentium 4 PC (1GB RAM, 70GB hard drive) running a 2.6.5 Linux kernel. Two testing models were designed, one to test policing accuracy and one to test bandwidth sharing.
The first model (Figure 3) was used for testing the policing accuracy of a specific defined class. Port 1 in the Ixia machine generated traffic sent to IP 192.168.10.200 from one or more streams. The Linux machine routed the packets to interface eth0 (static route) and then sent them back to the Ixia machine on Port 2. All of the traffic control attributes were defined on the eth0 interface. All of the analysis was completed based on traffic results captured on Port 2 (the Ixia machine).
The second model (Figure 4) was used to test the way the bandwidth of two streams from the same class is shared. In this case, another two Ixia ports for transmitting data were used.
Port 1, Port 2 and Port 3 in the Ixia machine generated traffic sent to IP 192.168.10.200, each using one stream. The Linux machine routed those packets to interface eth0 based on a static route and then sent them back to the Ixia machine on Port 2. Traffic control attributes were defined on the eth0 interface. All analysis was done based on the traffic result captures on Port 2 (Ixia machine).
In all of the tests, the sending ports transmitted continuous bursts of packets on a specified bandwidth. The Ixia 10/100 Mbps Ethernet load module (model LM100TX3) has four separate ports, and each port can send up to 100Mbit/s. The Ixia load module provided support for generating multiple streams in one port but with one limitation: it couldn't mix the streams together and served only one stream at a time. This limitation exists because the scheduler works in a round-robin fashion. It sends a burst of bytes from stream X, moves to the next stream and then sends a burst of bytes from stream Y.
In order to generate a specific bandwidth from a stream, which is part of a group of streams defined in one port, specific attributes of the Ixia machine's configuration had to be fine-tuned. The attributes that required fine-tuning and their definitions are as follows:
Burst: the number of packets sent by each stream, before moving to serve the next stream.
Packet size: the size of a packet being sent by a stream.
Total bandwidth: the total bandwidth used by all streams.
See Table 2 for Ixia configuration details.
Table 2. Ixia Configuration
|Stream||Generated-Bandwidth||Packet Size||Burst Size|
The goal was to determine the appropriate burst size that would achieve the requested generated bandwidth for each stream. Because all three streams used the same physical line, the way the data was sent on the line resembles the illustration in Figure 5.
The following equations define the relationship between the attributes:
Table 3 explains the variables used in the equation.
Table 3. Variables Used in the Attribute Relationship Equation
|Tc||The sum of the times (in seconds) it takes to send bursts 1-i (Tc1 + Tc2 + Tc3+...).|
|Bs-i||The number of packets in a burst of stream i.|
|Ps-i||The size of packet sent by stream i.|
|Tb||The total bandwidth sent by all streams (bits/sec).|
|Nc||The number of Tc bursts in one second.|
|Bn-i||The requested bandwidth of stream i (bits/sec).|
Assuming that the packet size is the same for all streams, as in the example, the remaining calculation is that of the burst size.
Because all the streams share the same bandwidth, the requested burst values can be found by examining the ratios between the requested bandwidths, using the equation Bs-i = Bn-i. This number could be unusually large, though, so it can be divided until a reasonable value is obtained. In order to have different packet sizes defined for each stream, the burst size values can be altered until the required bandwidth is obtained for each stream. A spreadsheet program simplifies the calculation of multiple bandwidths.
|Using Django and MongoDB to Build a Blog||Mar 05, 2014|
|What virtualization solution do you use/manage at work?||Mar 04, 2014|
|Our Assignment||Mar 04, 2014|
|March 2014 Issue of Linux Journal: 20 Years of Linux Journal||Mar 03, 2014|
|Have Resume - Will Travel||Feb 28, 2014|
|March 2014 Video Preview||Feb 28, 2014|
- Using Django and MongoDB to Build a Blog
- Our Assignment
- Linux Systems Administrator
- Senior Perl Developer
- Technical Support Rep
- Sign Up to Win a Silicon Mechanics Swag Pack!
- Use the Bash trap Statement to Clean Up Temporary Files
- UX Designer
- Zato—Agile ESB, SOA, REST and Cloud Integrations in Python
- Have Resume - Will Travel
- You have to be careful there
1 week 2 days ago
- Wonder when LJ is going to
1 week 3 days ago
- Puerto Rico Free Software
1 week 4 days ago
1 week 5 days ago
- I hate voice commands
1 week 5 days ago
- usabilty --- AGAIN with this nonsense
1 week 5 days ago
- Don't make excuses
1 week 6 days ago
- Sorry to let you know, but
1 week 6 days ago
- Ridiculous statement. Not a
2 weeks 1 hour ago
2 weeks 5 hours ago