* [gentoo-user] traffic shaping and p2p
@ 2005-12-14 19:02 Matthias Langer
2005-12-14 19:11 ` Matthias Langer
2005-12-15 7:53 ` [gentoo-user] traffic shaping and p2p Matan Peled
0 siblings, 2 replies; 11+ messages in thread
From: Matthias Langer @ 2005-12-14 19:02 UTC (permalink / raw
To: gentoo-user@lists.gentoo.org
I've a small home network, actuall consisting of two gentoo boxes, where
one box acts as router, firewall, svn server and desktop for my sister
(i know this isn't an optimal setup) and the other one is my
workstation.
Now, when i start a p2p app on my workstation the latency of my internet
connection suffers greatly, allthogh i've
384 kbit/s up and 3072 kbit/s down. I know that there are some
approaches to solve this kind of problem by categorizing packets and
assign different priorities to them, as explained at
http://gentoo-wiki.com/HOWTO_Packet_Shaping. However, my knowledge of
iptables and networking is very limited and i just want a simple and
clean solution as i don't plan to trick myself by switching my p2p apps
to non standard ports or manipulating the packet size ...
To cut a long story short: I want high latency for ssh, browsing,
subversion while offering p2p services a maximum of bandwidth in a small
homenetwork containing only 2 boxes.
Any suggestions ?
Thanks,
Matthias
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] traffic shaping and p2p
2005-12-14 19:02 [gentoo-user] traffic shaping and p2p Matthias Langer
@ 2005-12-14 19:11 ` Matthias Langer
2005-12-14 21:56 ` [gentoo-user] Book about GNU Copyright J.A.H.
2005-12-15 7:53 ` [gentoo-user] traffic shaping and p2p Matan Peled
1 sibling, 1 reply; 11+ messages in thread
From: Matthias Langer @ 2005-12-14 19:11 UTC (permalink / raw
To: gentoo-user
On Wed, 2005-12-14 at 20:02 +0100, Matthias Langer wrote:
> I've a small home network, actuall consisting of two gentoo boxes, where
> one box acts as router, firewall, svn server and desktop for my sister
> (i know this isn't an optimal setup) and the other one is my
> workstation.
>
> Now, when i start a p2p app on my workstation the latency of my internet
> connection suffers greatly, allthogh i've
> 384 kbit/s up and 3072 kbit/s down. I know that there are some
> approaches to solve this kind of problem by categorizing packets and
> assign different priorities to them, as explained at
> http://gentoo-wiki.com/HOWTO_Packet_Shaping. However, my knowledge of
> iptables and networking is very limited and i just want a simple and
> clean solution as i don't plan to trick myself by switching my p2p apps
> to non standard ports or manipulating the packet size ...
>
> To cut a long story short: I want high latency for ssh, browsing,
(what i mean is in fact low latency :-)
> subversion while offering p2p services a maximum of bandwidth in a small
> homenetwork containing only 2 boxes.
>
> Any suggestions ?
>
> Thanks,
> Matthias
>
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 11+ messages in thread
* [gentoo-user] Book about GNU Copyright .
2005-12-14 19:11 ` Matthias Langer
@ 2005-12-14 21:56 ` J.A.H.
0 siblings, 0 replies; 11+ messages in thread
From: J.A.H. @ 2005-12-14 21:56 UTC (permalink / raw
To: gentoo-user, gentoo-desktop,
Ulrich Plate Donnie Berkholz Tom Knight Michael Kohl Patrick Lauer Caleb Tennis Chris White
Cc: VOS Discussion
Book about GNU Copyright .
Can anybody here recommend a book from their Desktop which or that is
specifically focused so that the content of the book(s) can be used to
completely understand all GNU and or or Gentoo copyrights and issues
surrounding those legalities?
My grasp of GNU is narrow.
In your response here to this Email please make a point of CC``ing my
ingoing electronic mail message address for there are too many Emails
already due to unrelated bulk mail subscriptions which I do not read.
With utter sangfroid,
JASON (NOTE: I apologize for the fact that this may be an unrelated
request. Please do not automate your response. Thank you)
--
La simplicidad es la máxima sofisticación --- Leonardo Da Vinci
gentoo-gwn@gentoo.org mailing list
gentoo-users@gentoo.org mailing list
gentoo-desktop@gentoo.org mailing list
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] traffic shaping and p2p
2005-12-14 19:02 [gentoo-user] traffic shaping and p2p Matthias Langer
2005-12-14 19:11 ` Matthias Langer
@ 2005-12-15 7:53 ` Matan Peled
2005-12-15 17:05 ` Matthias Langer
1 sibling, 1 reply; 11+ messages in thread
From: Matan Peled @ 2005-12-15 7:53 UTC (permalink / raw
To: gentoo-user
Matthias Langer wrote:
> Now, when i start a p2p app on my workstation the latency of my internet
> connection suffers greatly, allthogh i've
> 384 kbit/s up and 3072 kbit/s down. I know that there are some
> approaches to solve this kind of problem by categorizing packets and
> assign different priorities to them, as explained at
> http://gentoo-wiki.com/HOWTO_Packet_Shaping. However, my knowledge of
> iptables and networking is very limited and i just want a simple and
> clean solution as i don't plan to trick myself by switching my p2p apps
> to non standard ports or manipulating the packet size ...
I've used that HOWTO (and contributed bits to it), and its great.
But why can't you just limit your P2P application's upload speed? I mean, the
program should have some controls that let you do that, right? I know every sane
bittorrent app has this.
--
[Name ] :: [Matan I. Peled ]
[Location ] :: [Israel ]
[Public Key] :: [0xD6F42CA5 ]
[Keyserver ] :: [keyserver.kjsl.com]
encrypted/signed plain text preferred
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] traffic shaping and p2p
2005-12-15 7:53 ` [gentoo-user] traffic shaping and p2p Matan Peled
@ 2005-12-15 17:05 ` Matthias Langer
2005-12-15 19:15 ` Holly Bostick
2005-12-16 13:08 ` Stroller
0 siblings, 2 replies; 11+ messages in thread
From: Matthias Langer @ 2005-12-15 17:05 UTC (permalink / raw
To: gentoo-user
On Thu, 2005-12-15 at 09:53 +0200, Matan Peled wrote:
> Matthias Langer wrote:
> > Now, when i start a p2p app on my workstation the latency of my internet
> > connection suffers greatly, allthogh i've
> > 384 kbit/s up and 3072 kbit/s down. I know that there are some
> > approaches to solve this kind of problem by categorizing packets and
> > assign different priorities to them, as explained at
> > http://gentoo-wiki.com/HOWTO_Packet_Shaping. However, my knowledge of
> > iptables and networking is very limited and i just want a simple and
> > clean solution as i don't plan to trick myself by switching my p2p apps
> > to non standard ports or manipulating the packet size ...
>
> I've used that HOWTO (and contributed bits to it), and its great.
>
> But why can't you just limit your P2P application's upload speed? I mean, the
> program should have some controls that let you do that, right? I know every sane
> bittorrent app has this.
>
Well, i use azureus - and of course i know that upload-speed can be
limited - which is maybe in fact the best solution to my problem.
However, what i have in mind is somehow similar to cpu-resources and
process-priority. If i start at process with nice level 15, it will get
all available cpu-resources without slowing down the other apps. As far
as i understand, this is not the same as limiting the process to, say
80% of cpu power. Now, what i want is the same for p2p apps - give them
as much bandwidth they can reasonably get but don't let them slow down
firefox, ssh etc. Because i want this setup just for my homenetwork, it
would perfectly suffice if packages get their priorities by examining
port-numbers. And because i want to at least partially understand what
i'm doing i would prefer a simple and clean setup. I know that in
principle the neccessairy steps to do what i wannt can be found in the
'Packet Shaping HOWTO'. But i wanted to hear experiences and opinions of
others first before starting messing around with my router. By the way,
there are many different packet shedulers in the kernel - and the HOWTO
only explains the HTP-scheduler. What about the other schedulers - can
they be usefull for my purposes too - and if yes, how can they be
configured and used ?
Matthias
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] traffic shaping and p2p
2005-12-15 17:05 ` Matthias Langer
@ 2005-12-15 19:15 ` Holly Bostick
2005-12-15 19:38 ` Matthias Langer
2005-12-16 13:14 ` Stroller
2005-12-16 13:08 ` Stroller
1 sibling, 2 replies; 11+ messages in thread
From: Holly Bostick @ 2005-12-15 19:15 UTC (permalink / raw
To: gentoo-user
Matthias Langer schreef:
> Now, what i want is the same for p2p apps - give them
> as much bandwidth they can reasonably get but don't let them slow down
> firefox, ssh etc.
In the case of Azureus specifically, your problem is actually not with
Azureus, but with Java (that's what's slowing down, and further what is
likely to be slowing down Firefox as well if it's running. Certainly I
find that running both Firefox and Azureus together is the fast road to
The System of Molasses).
You might consider aliasing Java to run at a "good" niceness
(in ~/.bashrc)
alias java="nice -n 15 java"
so that when Azureus starts the (many, many) Java processes that it
uses, they will be niced to something you can live with.
What effect this will have on Firefox, I cannot say, however.
Just an idea, hope it helps,
Holly
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] traffic shaping and p2p
2005-12-15 19:15 ` Holly Bostick
@ 2005-12-15 19:38 ` Matthias Langer
2005-12-16 13:14 ` Stroller
1 sibling, 0 replies; 11+ messages in thread
From: Matthias Langer @ 2005-12-15 19:38 UTC (permalink / raw
To: gentoo-user
On Thu, 2005-12-15 at 20:15 +0100, Holly Bostick wrote:
> Matthias Langer schreef:
>
> > Now, what i want is the same for p2p apps - give them
> > as much bandwidth they can reasonably get but don't let them slow down
> > firefox, ssh etc.
>
> In the case of Azureus specifically, your problem is actually not with
> Azureus, but with Java (that's what's slowing down, and further what is
> likely to be slowing down Firefox as well if it's running. Certainly I
> find that running both Firefox and Azureus together is the fast road to
> The System of Molasses).
Hmm, i can't confirm this, bacause as long as azureus is not
down/uploading heavily browsing is not really affected. But this may
differ from java-vm to vm. I use sun-jdk-1.5.05 because i do same java
programming stuff ...
>
> You might consider aliasing Java to run at a "good" niceness
>
> (in ~/.bashrc)
>
> alias java="nice -n 15 java"
>
> so that when Azureus starts the (many, many) Java processes that it
> uses, they will be niced to something you can live with.
>
> What effect this will have on Firefox, I cannot say, however.
>
> Just an idea, hope it helps,
>
> Holly
>
But thanks for your answer nevertheless,
Matthias
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] traffic shaping and p2p
2005-12-15 19:15 ` Holly Bostick
2005-12-15 19:38 ` Matthias Langer
@ 2005-12-16 13:14 ` Stroller
2005-12-16 15:45 ` Jondar Falcon
1 sibling, 1 reply; 11+ messages in thread
From: Stroller @ 2005-12-16 13:14 UTC (permalink / raw
To: gentoo-user
On Dec 15, 2005, at 7:15 pm, Holly Bostick wrote:
> Matthias Langer schreef:
>
>> Now, what i want is the same for p2p apps - give them
>> as much bandwidth they can reasonably get but don't let them slow down
>> firefox, ssh etc.
>
> In the case of Azureus specifically, your problem is actually not with
> Azureus, but with Java ...
> You might consider aliasing Java to run at a "good" niceness
Hi Holly,
Matthias seems to have confused the issue with his "bandwidth niceness"
analogy.
I believe that his problem are with saturation of his broadband
connection, in which case he'd get the same problem even if Azureus was
running on a different PC from his web-browser. Matthias wants to give
p2p maximum bandwidth & have the router sort it out so that he gets no
latency on other connections - this is what traffic-shaping does.
Stroller.
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] traffic shaping and p2p
2005-12-15 17:05 ` Matthias Langer
2005-12-15 19:15 ` Holly Bostick
@ 2005-12-16 13:08 ` Stroller
2005-12-17 13:47 ` Matthias Langer
1 sibling, 1 reply; 11+ messages in thread
From: Stroller @ 2005-12-16 13:08 UTC (permalink / raw
To: gentoo-user
On Dec 15, 2005, at 5:05 pm, Matthias Langer wrote:
>
> Well, i use azureus - and of course i know that upload-speed can be
> limited - which is maybe in fact the best solution to my problem.
> ... for p2p apps - give them
> as much bandwidth they can reasonably get but don't let them slow down
> firefox, ssh etc. Because i want this setup just for my homenetwork, it
> would perfectly suffice if packages get their priorities by examining
> port-numbers. And because i want to at least partially understand what
> i'm doing i would prefer a simple and clean setup.
I haven't used it yet, but my understanding of traffic-shaping is that
it's exactly what you want. I believe that other quality-of-service
mechanisms may require applications to be QoS aware (setting a QoS bit
in the packet header).
You're absolutely right in that reducing the bandwidth of the p2p app
isn't the ideal way to achieve what you want - I find latency in
browsing & surfing with BitTorrent consuming only 60% - 70% of my
upload - it doesn't help that other peers are continually making
requests of you. If you lower the bandwidth consumption in Azureous
then you have to remember to up it again when you go to bed - traffic
shaping WILL allow you to permanently maximise your p2p bandwidth, with
the ROUTER reducing it only when your priority services send packets.
> I know that in
> principle the neccessairy steps to do what i wannt can be found in the
> 'Packet Shaping HOWTO'. .... By the way,
> there are many different packet shedulers in the kernel - and the HOWTO
> only explains the HTP-scheduler. What about the other schedulers - can
> they be usefull for my purposes too - and if yes, how can they be
> configured and used ?
No idea. I hope you'll give us feedback when you've discovered more.
Stroller.
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] traffic shaping and p2p
2005-12-16 13:08 ` Stroller
@ 2005-12-17 13:47 ` Matthias Langer
0 siblings, 0 replies; 11+ messages in thread
From: Matthias Langer @ 2005-12-17 13:47 UTC (permalink / raw
To: gentoo-user
On Fri, 2005-12-16 at 13:08 +0000, Stroller wrote:
> On Dec 15, 2005, at 5:05 pm, Matthias Langer wrote:
> >
> > Well, i use azureus - and of course i know that upload-speed can be
> > limited - which is maybe in fact the best solution to my problem.
> > ... for p2p apps - give them
> > as much bandwidth they can reasonably get but don't let them slow down
> > firefox, ssh etc. Because i want this setup just for my homenetwork, it
> > would perfectly suffice if packages get their priorities by examining
> > port-numbers. And because i want to at least partially understand what
> > i'm doing i would prefer a simple and clean setup.
>
> I haven't used it yet, but my understanding of traffic-shaping is that
> it's exactly what you want. I believe that other quality-of-service
> mechanisms may require applications to be QoS aware (setting a QoS bit
> in the packet header).
>
> You're absolutely right in that reducing the bandwidth of the p2p app
> isn't the ideal way to achieve what you want - I find latency in
> browsing & surfing with BitTorrent consuming only 60% - 70% of my
> upload - it doesn't help that other peers are continually making
> requests of you. If you lower the bandwidth consumption in Azureous
> then you have to remember to up it again when you go to bed - traffic
> shaping WILL allow you to permanently maximise your p2p bandwidth, with
> the ROUTER reducing it only when your priority services send packets.
>
> > I know that in
> > principle the neccessairy steps to do what i wannt can be found in the
> > 'Packet Shaping HOWTO'. .... By the way,
> > there are many different packet shedulers in the kernel - and the HOWTO
> > only explains the HTP-scheduler. What about the other schedulers - can
> > they be usefull for my purposes too - and if yes, how can they be
> > configured and used ?
>
> No idea. I hope you'll give us feedback when you've discovered more.
Ok i found out that in fact the HFSC scheduler should be the one which
does exactly what i like because it handles bandwidth and latency
seperatley. Here is my current setup, which seems not to be ideal - ssh
is still slow when my upload is high:
# create the following tree
# 1:
# 1:1
# 1:10 1:20 1:30 1:40
# where 1:10 is for ssh, 1:20 for svn, 1:30 for surfing and 1:40 for
unmatched traffic
# creates the root qdisc
tc qdisc add dev eth0 root handle 1: hfsc default 40
# node 1:1
tc class add dev eth0 parent 1: classid 1:1 hfsc sc rate 441kbit ul rate
441kbit
# node 1:10 (ssh) - guaranty 1500b in 20ms with an overarall rate of
88kbit
tc class add dev eth0 parent 1:1 classid 1:10 hfsc sc umax 800b dmax
20ms rate 88kbit
# node 1:20 (svn) - guaranty 1500b in 30ms with an overall rate of of
147kbit
tc class add dev eth0 parent 1:1 classid 1:20 hfsc sc umax 800b dmax
30ms rate 147kbit
# node 1:30 (firefox) - garanty 20000b in 100ms with an overall rate of
120kbit
tc class add dev eth0 parent 1:1 classid 1:30 hfsc sc umax 20000b dmax
100ms rate 120kbit
#node 1:40 (unmatched)
tc class add dev eth0 parent 1:1 classid 1:40 hfsc sc rate 96kbit
# now that we have our qdiscs we need filters for them
# ssh
tc filter add dev eth0 protocol ip parent 1: prio 1 u32 match ip dport
22 0xffff flowid 1:10
# svn
tc filter add dev eth0 protocol ip parent 1: prio 2 u32 match ip dport
3690 0xffff flowid 1:20
# firefox
tc filter add dev eth0 protocol ip parent 1: prio 3 u32 match ip dport
80 0xffff flowid 1:30
Note that i use the u32 filter (must be enabled in the kernel) and not
iptables.
By the way, there is a very interesting article about traffic control
with qdiscs and different schedulers, in particular HFSC, written by the
author of HFSC himself in the german 'Linux Magazin' 02/2005.
I'll tell you about further experiences with HFSC - comments and
suggestions are welcome.
Matthias
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2005-12-17 13:51 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-14 19:02 [gentoo-user] traffic shaping and p2p Matthias Langer
2005-12-14 19:11 ` Matthias Langer
2005-12-14 21:56 ` [gentoo-user] Book about GNU Copyright J.A.H.
2005-12-15 7:53 ` [gentoo-user] traffic shaping and p2p Matan Peled
2005-12-15 17:05 ` Matthias Langer
2005-12-15 19:15 ` Holly Bostick
2005-12-15 19:38 ` Matthias Langer
2005-12-16 13:14 ` Stroller
2005-12-16 15:45 ` Jondar Falcon
2005-12-16 13:08 ` Stroller
2005-12-17 13:47 ` Matthias Langer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox