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

Re: tbf rate



On Thursday 22 February 2001 12:28, Werner Almesberger wrote:
> corbu p wrote:
> > I tried to test it with rate between
> > 50Mbit and 60Mbit and very small paket size: 200byte.
>
> You have to understand that transmissions are scheduled at worst-case
> intervals of 1 jiffie (typically 10 ms), and that transmission time is
> calculated with microsecond resolution.
>
> This means that, in order to send at 60 Mbit/sec, you need to allow
> for bursts and buffers of at least 75000 Bytes. Transmission time
> calculations have a granularity of 7.5 Bytes, which can add further
> variations of up to ~4% in your case.
>
> Conclusion: TBF is unlikely to be useful for anything but very slow
> links.

Unless you're willing to compile the kernel yourself, setting HZ to 1024. 
This improves TBF by a factor of 10, and has no implications (AFAIK) because 
everything at user level seems to support this HZ value (it's the default on 
ALPHA architecture). With HZ=1024, TBF would work with a rate of 60 Mbit/s 
and a burst of 7500 bytes (much more acceptable than 75KB).

BTW, since all recent x86 processors (and others) have an internal TSC, 
certainly it wouldn't be difficult to add an internal interrupt generator 
triggered by TSC equalling some value. This would be incredibly helpful for 
generating very precise timers (especially for real-time systems). Is there 
any processor today implementing such a thing?

Rui Prior