Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(972)

Side by Side Diff: src/network/doc/queue-limits.rst

Issue 298220043: Byte queue limits (Closed)
Patch Set: Updated version Created 8 years, 8 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 Queue limits
2 ------
3
4 .. heading hierarchy:
5 ------------- Chapter
6 ************* Section (#.#)
7 ============= Subsection (#.#.#)
8 ############# Paragraph (no number)
9
10 This section documents the queue limits model, which is used by traffic control
11 to limit the NetDevices queueing delay. It operates on the transmission path of
12 the network node.
13
14 The reduction of the NetDevices queueing delay is essential to improve the effec tiveness of
15 Active Queue Management (AQM) algorithm.
16 Careful assessment of the queueing delay includes a byte-based measure of the Ne tDevices
17 queue length. In this design, traffic control can use different byte-based schem es to
18 limit the queueing delay. Currently the only available schema is DynamicQueueLim its, which is
19 modelled after the dynamic queue limit library of Linux.
20
21 Model Description
22 *****************
23
24 The source code for the model lives in the directory ``src/network/utils``.
25
26 The model allows a byte-based measure of the netdevice queue. The byte-based mea sure
27 more accurately approximates the time required to empty the queue than a packet- based measure.
28
29 To inform the upper layers about the transmission of packets, NetDevices can cal l a couple
30 of functions:
31
32 * ``void NotifyQueuedBytes (uint32_t bytes)``: Report the number of bytes queued to the device queue
33 * ``void NotifyTransmittedBytes (uint32_t bytes)``: Report the number of bytes t ransmitted by device
34
35 Based on this information, the QueueLimits object can stop the transmission queu e.
36
37 In case of multiqueue NetDevices this mechanism is available for each queue.
38
39 The QueueLimits model can be used on any NetDevice modelled in ns-3.
40
41 Design
42 ======
43
44 An abstract base class, class QueueLimits, is subclassed for specific
45 byte-based limiting strategies.
46
47 Common operations provided by the base class QueueLimits include:
48
49 * ``void Reset ()``: Reset queue limits state
50 * ``void Completed (uint32_t count)``: Record number of completed objects and r ecalculate the limit
51 * ``int32_t Available () const``: Return how many objects can be queued
52 * ``void Queued (uint32_t count)``: Record number of objects queued
53
54 DynamicQueueLimits
55 ##################
56
57 Dynamic queue limits (DQL) is a basic library implemented in Linux kernel to lim it the Ethernet
58 queueing delay. DQL is a general purpose queue length controller. The goal of DQ L is to calculate
59 the limit as the minimum number of objects needed to prevent starvation.
60
61 Three attributes are defined in the DynamicQueueLimits class:
62
63 * ``HoldTime``: The DQL algorithm hold time
64 * ``MaxLimit``: Maximum limit
65 * ``MinLimit``: Minimum limit
66
67 The HoldTime attribute is modelled after 1/HZ in use in Linux DQL library. The d efault value
68 is 4 ms. Typical values for HoldTime are in the range from 10 to 1 ms (correspon ding to the typical
69 values of HZ which varies from 100 to 1000). Reducing the HoldTime increases the responsiveness of
70 DQL with consequent greater number of limit variation events. The limit calculat ed from DQL is in the
71 range from MinLimit to MaxLimit. The default values are respectively 0 and DQL_M AX_LIMIT.
72 Increasing the MinLimit is recommended in case of higher NetDevice transmission rate (e.g. 1 Gbps)
73 while reducing the MaxLimit is recommended in case of lower NetDevice transmissi on rate (e.g. 500 Kbps).
74
75 There is one trace source in DynamicQueueLimits class that may be hooked:
76
77 * ``Limit``: Limit value calculated by DQL
78
79 Usage
80 *****
81
82 Helpers
83 =======
84
85 A typical usage pattern is to create a traffic control helper and configure
86 the queue limits type and attributes from the helper, such as this example:
87
88 .. sourcecode:: cpp
89
90 TrafficControlHelper tch;
91 uint32_t handle = tch.SetRootQueueDisc ("ns3::PfifoFastQueueDisc", "Limit", Ui ntegerValue (1000));
92 tch.AddPacketFilter (handle, "ns3::PfifoFastIpv4PacketFilter");
93
94 tch.SetQueueLimits ("ns3::DynamicQueueLimits", "HoldTime", StringValue ("4ms") );
95
96 then install the configuration on a NetDevices container
97
98 .. sourcecode:: cpp
99
100 tch.Install (devices);
OLDNEW

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b