-
Notifications
You must be signed in to change notification settings - Fork 81
Shaper
Shaper — Click element; shapes traffic to maximum rate (pkt/s)
Shaper(RATE)
Ports: 1 input, 1-2 outputs
Processing: Pull
Shaper is a pull element that allows a maximum of RATE packets per second to pass through. That is, traffic is shaped to RATE packets per second. Shaper is dependent on the timing of its pull requests; if it receives only sporadic pull requests, then it will emit packets only sporadically. However, if it receives a large number of evenly-spaced pull requests, then it will emit packets at the specified RATE with low burstiness.
Pull requests on optional output port 1 return packets that do not meet the shaping condition at the time of the pull. Use with care: packets are now pulled from upstream without shaping. (This is different from RatedSplitter, whose optional output port 1 emits packets that would otherwise just have been dropped.) Port 1 can be useful for sampling in pull context, as in the example below.
Shaper cannot implement every rate smoothly. For example, it can smoothly generate 1000000 packets per second and 1000244 packets per second, but not rates in between. (In-between rates will result in minor burstiness.) This granularity issue is negligible at low rates, and becomes serious at very high rates; for example, Shaper cannot smoothly implement any rate between 2.048e10 and 4.096e10 packets per second.
Rate limited printing in pull context:
..
-> Shaper(10)
=> ( [0] -> Print -> [0];
[1] -> [1] )
=> RoundRobinSched
-> ..
- rate (read/write) — Returns or sets the RATE parameter.
BandwidthShaper, RatedSplitter, RatedUnqueue
Generated by click-elem2man from ../elements/standard/shaper.hh:8
on 2018/10/03.