[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[altq 98] YOD (yet other doubts...)



Hello everyone.
I've maed a closer look to the last Kenjiro patch, and these are my results.

I have this CBQ configuration:
  Default class 75%
  Small Class 25%
  bandwidth: 4Mbps
  MTU 1500

The default configuration has an offtime of 27875us fot the 25% class. (I still have the old cbqd, the one with the wrong minburst, so that I expect to obtain a 3packets steady state burst).

Now I send only one flow in the 25% class and I trace some variable into the CBQ kernel.

In detail:
- now: variable "ifd->now_", in _rmc_wrr_dequeue_next
- ifnow: variable "ifd->ifnow_", in _rmc_wrr_dequeue_next
    (both variable are sampled when the packet is scheduled and the ifd statistics are updated)
- nowp: variable "ifd->now_", in rmc_update_class_util
    (that, for course, is equal to the previous variable "now")
- avg: it is the value 
         (((1 - RM_POWER) * avgidle) >> RM_FILTER_GAIN)
    that is added to tidle in rmc_update_class_util
- undertime: final value of variable undertime (microsec), set by rmc_update_class_util.


now: 278823 ifnow: 284089 nowp_: 278823 avg: 8767 undertime: 315465
now: 317958 ifnow: 287111
now: 318387 ifnow: 320980
now: 318784 ifnow: 324002 nowp_: 318784 avg: 5457 undertime: 352116
now: 355956 ifnow: 327024
now: 358048 ifnow: 358978
now: 358429 ifnow: 362000 nowp_: 358429 avg: 4189 undertime: 390493
now: 393958 ifnow: 365022
now: 398047 ifnow: 396980
now: 398430 ifnow: 401069 nowp_: 398430 avg: 2032 undertime: 428337
now: 431955 ifnow: 404091
now: 438044 ifnow: 434977
now: 438434 ifnow: 441066
now: 438818 ifnow: 444088 nowp_: 438818 avg: 7976 undertime: 474669
now: 477960 ifnow: 447110
now: 478398 ifnow: 480982
now: 478784 ifnow: 484004 nowp_: 478784 avg: 4736 undertime: 511395
now: 513959 ifnow: 487026
now: 518046 ifnow: 516981
now: 518435 ifnow: 521068 nowp_: 518435 avg: 4352 undertime: 550662
now: 553957 ifnow: 524090
now: 558049 ifnow: 556979
now: 558438 ifnow: 561071 nowp_: 558438 avg: 1332 undertime: 587645


There are a couple of things to note:
- undertime is always equal to  
       now + avg + 27875
   (that is absolutely correct, according to the code we have)
- packets are scheduled very fast (check the variable now). In other terms, packet are not scheduled one every 3ms, that is the transmission time for a 1500bytes packet on a 4Mbps link, but as soon as there is space in the network card buffer
- the steady state burst (3packets) is respected.

Now, some comments:
- we're very lucky that the value "avg" is quite high, otherwise we should not be able to meet the target throughput, because the suspension time (nowp+offtime) would be too short
    (but, are we sure that this is correct? that we should depend on the "avg" to get the right throughput? Is that correct that avg is so high, after the "target" 3 packet burst?)
- as far as I understand, the suspension time for a certain class should start when THE PACKET HAS FINISHED ITS TRANSMISSION. So we should add the transmission time of that packet to the suspension time. Shouldn't we?
- please note that the avgidle variable is computed according to the ifnow_, that can be quite different from nowp. Does it make sense to use ifnow_ to compute WHEN the class must be suspended and HOW it has exceeded its rate (avg), and use nowp to compute WHAT the ending of the suspension period will be?
- the target throughput is respected, because I transmit (more or less) 84 pkt/sec (timed 1500 bytes it gives ~1Mbps).

Conclusion...
- now I'm not so sure that "nowp" is the best choice to compute the suspension time (even if it was my suggestion...)
- i'm still wondering about using these two time variable, now_ and ifnow_ ... shouldn't we keep only one of them?

Sorry for the confusion in my mails, but the problem is that I don't have clear ideas myself...

Cheers,
(have a nice weekend :-)) )

	fulvio