* [LARTC] Fair Queuing
@ 2002-11-22 13:49 ajay
2002-11-22 15:07 ` Stef Coene
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: ajay @ 2002-11-22 13:49 UTC (permalink / raw)
To: lartc
Dear all,
Am trying to distribute our 256kbps internet link to our internel
LAN and want to give 32kbps each to our 8 nodes. how should one go about it.
I have a server with 2 LAN cards.
LAN (192.168.0.0/24)<----->Linux Box<------->Internet Router<------->ISP
Thanx
AJ
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [LARTC] Fair Queuing
2002-11-22 13:49 [LARTC] Fair Queuing ajay
@ 2002-11-22 15:07 ` Stef Coene
2002-11-22 16:35 ` ajay
2002-11-22 17:06 ` Stef Coene
2 siblings, 0 replies; 6+ messages in thread
From: Stef Coene @ 2002-11-22 15:07 UTC (permalink / raw)
To: lartc
On Friday 22 November 2002 14:54, ajay@movingdelhi.org wrote:
> Dear all,
>
> Am trying to distribute our 256kbps internet link to our
> internel LAN and want to give 32kbps each to our 8 nodes. how should one
> go about it.
>
> I have a server with 2 LAN cards.
>
>
> LAN (192.168.0.0/24)<----->Linux Box<------->Internet Router<------->ISP
Do you want them to be able to share the bandwidth, or is 32kbps the maximum
they may get?
You can create 1 bounded class with rate = 256kbps and 8 child classes with
rate = 32kbps. And you need 8 filter so put the traffic in the 8 classes.
You can filter based on ip-address if the nodes has fixed ip-addresses. You
can do this with htb or cbq.
Stef
--
stef.coene@docum.org
"Using Linux as bandwidth manager"
http://www.docum.org/
#lartc @ irc.oftc.net
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [LARTC] Fair Queuing
2002-11-22 13:49 [LARTC] Fair Queuing ajay
2002-11-22 15:07 ` Stef Coene
@ 2002-11-22 16:35 ` ajay
2002-11-22 17:06 ` Stef Coene
2 siblings, 0 replies; 6+ messages in thread
From: ajay @ 2002-11-22 16:35 UTC (permalink / raw)
To: lartc
Thanx, I managed it to get the basic script working but the result IS NOT
satisfactory. What is happening is this:-
When any user (ex 192.168.0.4 in my script) starts to download a file
(Download1) after a while it settles down to the alloted bandwidth 32kbps.
If he puts another download (Download 2) after a while it occupies
approximately half of the total bandwidht alloted to 192.168.0.4. So far so
good.....
NOW, when the user(192.168.0.4) cancels any one of the downloads (Say
download 1) the other download (download 2) takes a very long time to grow
up to the total alloted bandwidth i.e 32kbps.
Why is that happening?
I can't figure it out. Could SFQ Help?
Script :
___________________________________________________________
/sbin/tc qdisc add root dev eth1 handle 1:0 cbq bandwidth 10Mbit avpkt 1000
/sbin/tc class add dev eth1 parent 1:0 classid 1:1 cbq bandwidth 10Mbit rate
256Kbit allot 1514 bounded
/sbin/tc class add dev eth1 parent 1:1 classid 1:2 cbq bandwidth 256Kbit
rate 32Kbit allot 1514 bounded
/sbin/tc filter add dev eth1 parent 1:0 protocol ip prio 1 u32 match ip src
192.168.0.4 flowid 1:2
/sbin/tc filter add dev eth1 parent 1:0 protocol ip prio 1 u32 match ip dst
192.168.0.4 flowid 1:2
________________________________________________________________
Thanx in advance
PS: Yes, I want each individual user to get 32kbps
----- Original Message -----
From: "Stef Coene" <stef.coene@docum.org>
> > Dear all,
> >
> > Am trying to distribute our 256kbps internet link to our
> > internel LAN and want to give 32kbps each to our 8 nodes. how should
one
> > go about it.
> >
> > I have a server with 2 LAN cards.
> >
> >
> > LAN (192.168.0.0/24)<----->Linux Box<------->Internet Router<------->ISP
> Do you want them to be able to share the bandwidth, or is 32kbps the
maximum
> they may get?
>
> You can create 1 bounded class with rate = 256kbps and 8 child classes
with
> rate = 32kbps. And you need 8 filter so put the traffic in the 8 classes.
> You can filter based on ip-address if the nodes has fixed ip-addresses.
You
> can do this with htb or cbq.
>
> Stef
>
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [LARTC] Fair Queuing
2002-11-22 13:49 [LARTC] Fair Queuing ajay
2002-11-22 15:07 ` Stef Coene
2002-11-22 16:35 ` ajay
@ 2002-11-22 17:06 ` Stef Coene
2 siblings, 0 replies; 6+ messages in thread
From: Stef Coene @ 2002-11-22 17:06 UTC (permalink / raw)
To: lartc
On Saturday 23 November 2002 06:58, ajay@movingdelhi.org wrote:
> Thanx, I managed it to get the basic script working but the result IS NOT
> satisfactory. What is happening is this:-
>
> When any user (ex 192.168.0.4 in my script) starts to download a file
> (Download1) after a while it settles down to the alloted bandwidth 32kbps.
> If he puts another download (Download 2) after a while it occupies
> approximately half of the total bandwidht alloted to 192.168.0.4. So far
> so good.....
> NOW, when the user(192.168.0.4) cancels any one of the downloads (Say
> download 1) the other download (download 2) takes a very long time to grow
> up to the total alloted bandwidth i.e 32kbps.
>
> Why is that happening?
I'm not sure, but when the scond download is started, both ends of the
connection are using as much bandwidth as possible untill packets are
dropped. If the connection has suddenly more bandwidth because the other
download is stopped, it takes some time before both ends of the connection
realize this. And when they do so, they are trying to push again as much as
possible untill they are throttled to 64kbps. I think that's the way how tcp
is handle the bandwidth limitaion.
> I can't figure it out. Could SFQ Help?
Not really. SFQ give each data stream the same opportunity to send something.
If one of the streams is gone, the other can send all of the time. But you
can try to add one to see what happens.
> ___________________________________________________________
> /sbin/tc qdisc add root dev eth1 handle 1:0 cbq bandwidth 10Mbit avpkt 1000
> /sbin/tc class add dev eth1 parent 1:0 classid 1:1 cbq bandwidth 10Mbit
> rate 256Kbit allot 1514 bounded
> /sbin/tc class add dev eth1 parent 1:1 classid 1:2 cbq bandwidth 256Kbit
> rate 32Kbit allot 1514 bounded
> /sbin/tc filter add dev eth1 parent 1:0 protocol ip prio 1 u32 match ip src
> 192.168.0.4 flowid 1:2
> /sbin/tc filter add dev eth1 parent 1:0 protocol ip prio 1 u32 match ip dst
> 192.168.0.4 flowid 1:2
> ________________________________________________________________
bandwidth is always the nic bandwidth so 10Mbit.
And shaping on eth1 is shaping all the packets that are leaving eth2. So the
usung src and dst in 2 filters is useless. The src filter will never match.
Stef
--
stef.coene@docum.org
"Using Linux as bandwidth manager"
http://www.docum.org/
#lartc @ irc.oftc.net
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 6+ messages in thread
* [LARTC] "Fair" queuing
@ 2004-03-30 7:44 Mihai Vlad
2004-03-30 12:00 ` Jeroen Vriesman
0 siblings, 1 reply; 6+ messages in thread
From: Mihai Vlad @ 2004-03-30 7:44 UTC (permalink / raw)
To: lartc
Hello again,
Is it possible to split a bandwidth equally among clients regardless of its
current link speed?
I have a link that can get bursty at times. At any given time the N active
sessions (the ones with non-empty queues) need to be serviced
simultaneously, each at a rate of 1/N'th of the link speed.
(This might not be a strictly HTB related question)
Thanks in advance,
Mihai Vlad
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [LARTC] "Fair" queuing
2004-03-30 7:44 [LARTC] "Fair" queuing Mihai Vlad
@ 2004-03-30 12:00 ` Jeroen Vriesman
0 siblings, 0 replies; 6+ messages in thread
From: Jeroen Vriesman @ 2004-03-30 12:00 UTC (permalink / raw)
To: lartc
I use SFQ for that, works fine.
On Tue, 30 Mar 2004 10:44:13 +0300
"Mihai Vlad" <mihaivlad@web-profile.net> wrote:
> Hello again,
>
> Is it possible to split a bandwidth equally among clients regardless of its
> current link speed?
>
> I have a link that can get bursty at times. At any given time the N active
> sessions (the ones with non-empty queues) need to be serviced
> simultaneously, each at a rate of 1/N'th of the link speed.
>
> (This might not be a strictly HTB related question)
>
> Thanks in advance,
> Mihai Vlad
>
>
>
> _______________________________________________
> LARTC mailing list / LARTC@mailman.ds9a.nl
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
>
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2004-03-30 12:00 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-22 13:49 [LARTC] Fair Queuing ajay
2002-11-22 15:07 ` Stef Coene
2002-11-22 16:35 ` ajay
2002-11-22 17:06 ` Stef Coene
-- strict thread matches above, loose matches on Subject: below --
2004-03-30 7:44 [LARTC] "Fair" queuing Mihai Vlad
2004-03-30 12:00 ` Jeroen Vriesman
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.