Re: HTB speed

Linux Advanced Routing and Traffic Control

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

 



Hi,

just putting the answer to my own question here, for those who have the same problem, and read the mailing list archive.

The timing of the P4 based on "jiffies" is hopeless, it's different for every processor, and can be a wrong by a factor 3.

If the tsc (time stamp counter) is used, the htb works fine, the error in speed is now only about 1 %.

It's set by:

in pkt_sched.h:

#define PSCHED_CLOCK_SOURCE     PSCHED_CPU

that's all, I wonder why it's not default to do this, or maybe it's an idea to make the packet scheduler detect the presence of tsc when the module is loaded.

Cheers,
Jeroen.


On Fri, 12 Mar 2004 10:58:40 +0100
Jeroen Vriesman <j.vriesman@xxxxxxxxx> wrote:

> Dear all,
> 
> I'm running htb on 2.4.24, following setup:
> 
> running on a bridge, ebtables patch, firewall marks with iptables, and an SFQ for every HTB.
> 
> Everything works fine, so I don't go into details, there is just one thing which suprises me:
> 
> When I configure HTB to shape to about 900 kbit/s, the resulting speed is about 400 kbit/s.
> 
> For higher speeds it's more accurate (but stil too slow), for lower speeds it gets worse.
> 
> Does anyone here have any idea why? I've just added a "correction factor" to my scripts, so it's kind of allright, but I would like to know if others experience the same thing.
> 
> Jeroen.
> _______________________________________________
> LARTC mailing list / LARTC@xxxxxxxxxxxxxxx
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
> 
_______________________________________________
LARTC mailing list / LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux