[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[altq 12] Re: ALTQ internals
The two methods are identical but "avgidle" is scaled (x 32) in the
kernel for better precision and cheaper computation.
Let avgidle32 be (real) avgidle multiplied by 32.
avgidle32 = avgidle x 32
Instead of the following equation
avgidle = 31/32 * avgidle + 1/32 * idle
the kernel use
avgidle32 = 31/32 * avgidle32 + idle
= avgidle32 - 1/32 * avgidle32 + idle
Sally proposed this method in one of her notes on CBQ.
(Van Jacobson used a similar technique to estimate RTT in TCP.)
--Kenjiro
Fulvio Risso <F.Risso@cs.ucl.ac.uk> said:
>> Hello.
>> Checking the ALTQ internals, I discovered that the computation os the
>> *avgidle* parameter differs from the CBQ original proposal.
>> In fact,
>> ALTQ: altq_rmclass.c, function rmc_update_class_util
>> avgidle+= idle - (avgidle >> RM_FILTER_GAIN)
>> that means: avgidle = idle + (31/32) avgidle
>> CBQ (Floyd):
>> avgidle= w * avgidle + (1-w) idle
>> that means (if w= 31/32): avgidle= 1/16 idle + 31/32 avgidle
>> Why this difference?
>> Thanks a lot.
>> fulvio