[Cake] statistics question?

Sebastian Moeller moeller0 at gmx.de
Tue Sep 29 11:35:03 EDT 2015


Hi list,

I just played around with cake a bit and noticed that some of statistics are odd:

# reset all counters:
user at computer:~/CODE/sch_cake> sudo tc-adv qdisc replace dev eth0 root pfifo_fast

# create a slightly silly, but permissible cake configuration:
user at computer:~/CODE/sch_cake> sudo tc-adv qdisc replace dev eth0 root cake diffserv8 atm overhead 100

# send some data in one of the higher class/bins (class 4) and look at the results:
user at computer:~/CODE/sch_cake> sudo ping -c 1 -s 16 -Q 4 gstatic.com ; sudo tc-adv -s qdisc
PING gstatic.com (173.194.112.215) 16(44) bytes of data.
24 bytes from fra02s17-in-f23.1e100.net (173.194.112.215): icmp_seq=1 ttl=57 time=18.6 ms

--- gstatic.com ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 18.685/18.685/18.685/0.000 ms
qdisc cake 801f: dev eth0 root refcnt 6 unlimited diffserv8 flows atm overhead 100 
 Sent 2753 bytes 20 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0 
           Class 0     Class 1     Class 2     Class 3     Class 4     Class 5     Class 6     Class 7  
  rate          0bit        0bit        0bit        0bit        0bit        0bit        0bit        0bit
  target       5.0ms       5.0ms       5.0ms       5.0ms       5.0ms       5.0ms       5.0ms       5.0ms
interval     100.0ms     100.0ms     100.0ms     100.0ms     100.0ms     100.0ms     100.0ms     100.0ms
Pk delay         0us         0us         0us         0us         0us         0us         0us         0us
Av delay         0us         0us         0us         0us         0us         0us         0us         0us
Sp delay         0us         0us         0us         0us         0us         0us         0us         0us
  pkts             0           0          19           0           0           1           0           0
way inds           0           0           0           0           0           0           0           0
way miss           0           0           9           0           0           1           0           0
way cols           0           0           0           0           0           0           0           0
  bytes            0           0        2695           0           0          58           0           0
  drops            0           0           0           0           0           0           0           0
  marks            0           0           0           0           0           0           0           0
qdisc fq 8009: dev ifb00 root refcnt 2 limit 10000p flow_limit 100p buckets 1024 quantum 3028 initial_quantum 15140 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0 
  0 flows (0 inactive, 0 throttled)
  0 gc, 0 highprio, 0 throttled
user at computer:~/CODE/sch_cake> 

Note how Class 4 reports one packet with 58 bytes? I am not sure what to make out of this as:
ICMP payload 16 bytes ICMP header 8 bytes IPv4 header 20 byte : Sum = 44 bytes
So 58 - 44= 14 or what the kernel considers to be the cost of an ethernet packet (but that should actually include preamble, frame check sequence and inter frame gap, but I digress).
But I had told cake to add 100 bytes of extra overhead (and keep the ethernet overhead) so at least I would have assumed 158 bytes, but since I also specified atm the size should have been
ceil(158/48)*53 = ceil(3.29166666667) * 53 = 4*53 = 212bytes.
So clearly cake reports the size of packets as they are passed into it from the kernel and not the (virtual) size as it sends them out, which should be documented somewhere?


Best Regards
	Sebastian









More information about the Cake mailing list