The verified that both the normal and maximum burst can be set to a minimum value which depends on the following rule:
If we attempt to set the burst size to a smaller value, then the burst size is set to 31250 Kby, i.e. the maximum configurable value.
police CIR normal-burst-size PIR maximum-burst-size conform-actionexceed-action violate-action mls qos class-map match-all B1high match access-group 151 class-map match-all B2high match access-group 150 policy-map Bbandwidth class B2high police 300000000 2500000 2500000 conform-action set-prec-transmit 2 exceed-action drop class B1high police 50000000 2500000 2500000 conform-action set-prec-transmit 1 exceed-action drop interface GigabitEthernet3/4 description to sunlab3g no ip address wrr-queue queue-limit 10 45 wrr-queue cos-map 1 1 0 wrr-queue cos-map 1 2 3 wrr-queue cos-map 2 1 1 4 6 priority-queue cos-map 1 2 5 rcv-queue cos-map 1 2 3 service-policy input prova1 switchport access-list 150 permit tcp host 131.154.100.3 host 131.154.100.2 eq 50150 access-list 151 permit tcp host 131.154.100.3 host 131.154.100.2 eq 50151
Policing can be of two types:
The PFC2 supports classification, marking and policing using policy maps.
Interfaces can be in one of the following states (interface state is fundamental to define the rule to set the internal DSCP value, i.e. the value used to set the TOS byte written in transmitted packets):
Tx: iperf -c 131.154.100.2 -t 3600 -p 50006 -l 16000 -w 64000 -N -i 10 Rx: iperf -s -p 50006 -i 10The application generates memory-to-memory data exchanges.
The TCP socket size was set to 64000 by (sufficient to achieve maximum throughput, given the small local RTT). Tests with larger socket buffer sizes were run without significant different in performance.
Summary:
Comments:
Command line: police 50000000 normal-burst-size maximum-burst-size conform-action transmit exceed-action dropGiven a reference CIR value equal to 50 Mbps, we see how throughput varies as a function of the normal burst size. In general, for buffer sizes smaller than the congestion window of the TCP application throughput is penalized, since TCP incurs in packet loss as soon as the cwind is extended beyond the normal burst size. Similarly, if the normal burst size is larger than the maximum cwind, then no improvement in performance can be appreciated. This behavior was observed on Cisco routers C7200 and C7500 and IBM routers.
On the other hand, in this test we see that throughput increases linearly when normal burst size increases.
We assume that this behavior may be due to the implementation algorithm adopted on the device. More analysis and understanding of this are needed.
Command line: police CIR normal-burst-size maximum-burst-size conform-action transmit exceed-action drop
For different CIR rates, once fixed a given CIR value, the normal burst size is varied so that the minimum value which allows the TCP applications to get an end-to-end throughput close the CIR is determined.
CIR varies in the range [10, 100] Mbps, the step chosen is fixed and equal to 10 Mbps. The following figure shows that the normal burst has to quite large, in comparison to the packet MTU in use (1500 by) and the socket size: in fact for a CIR target value of 10 Mbps, the minimum buffer size has to be equal to 600 Kby.
For each additional 10 Mbps of target rate approximately 500 Kby of burst size have to be added to the current burst size. This behaviour contradicts the behavior seen on different platforms, according to which for bucket sizes larger than a given threshold no increase in throughput is observed.
Command line: police 50000000 128000 128000 PIR (PIR bit/sec) conform-action transmit exceed-action set-prec-transmit 1 violate action dropIn this test we keep the CIR constant and we set the normal burst size to a a constant value (128 Kby), which is not sufficient to let the source get the committed access rate: the rate achieved without PIR configuration is only 5.4 Mbps.
The following picture shows that the gain derived from the introduction of a PIR rate is considerable, so that the application is able to get a rate equivalente to the configured PIR.
The following graph shows shows the different dipendency of the UDP and TCP protocol on the PIR configured for two identical streams, with the only difference that the rate of the UDP stream is constant and equal to 90 Mbps (including the IP and UDP overhead):
Tx: iperf -c 192.168.8.3 -t 200 -p 50006 -u -b 88.3 -i 10 Rx: iperf -s -u -p 50006 -i 10As expected, UDP is not dependent of the burst tolerance configured, and the achieved rate exactly equals the PIR configured. This confirms the hypothesis that the performance issues of TCP streams are intrinsically related to the TCP rate control adaptivity.
Command line: police 50000000 128000 maximum-burst-size 71000000 conform-action transmit exceed-action set-prec-transmit 1 violate action dropIn this test we keep all the parameters constant with the exception of the maximum burst size, the goal is to evaluate the benefit instroduced by having a maximum burst size and to define a configuration rule.
Similary to what seen with variable normal burst sizes, the maximum burst size tuning is
critical for good TCP performance. The relationship between performance and bucket size is
again linear.
The improvement we get when adding a burst size larger than the normal burst
size is due to the capability of the second leaky bucket to absorb TCP packets
that would be otherwise dropped by the first leaky bucket.
if normal burst size=maximum burst size= 128 Kby, the average throghput is
only 33 Mbps, while if the maximum burst size is larger, then the achived
throughput can freely increase up to CIR, this implies that PIR is not always
sufficient to increase the expected TCP rate, especially when the maximum burst
size is not sufficient to store the excess burstiness which was rejected by
the first leaky bucket.