Re: [LARTC] Gamest and QoS

2004-08-19 Thread Andy Furniss
Marcin Sura wrote:
Hi
  I share my bandwith (adsl 512/128) between 12 users. I set up simple qos script for
  incoming (IMQ) and outgoing traffic using htb in root, 4 classess and esfq qdisc at
  leafs.
If you are NATing then you need to patch/select options for IMQ, so that 
 esfq will work properly with local addresses.

  Interactive traffic goeas to class1 , http,mail etc. to class2, p2p,
  ftp to class3, and rest to class4. Classess divide link in
  proportion 20% (prio 1), 40% (prio 2), 20% (prio 3) ,20% (prio 4)
If you really want latency to come first using HTB you need to give 
class one almost all of the rate and make the rest borrow.

  This works very well when users surfing internet (www,mail, ssh), but is
  insufficient when i really need low, stable latency for example for games.
  Games traffic  is in class1.
  Without QoS, while uploading some files via ftp i have pings (in my favourite
  game) 1000+. With my qos script my ping lower to 150 - 300, but is
  very unstable.
On just upload you should be able to get between your baseline ping and 
about 90ms with 128k and MTU 1500.

There is a tweak to HTB you can use to help accuracy -
Set HTB_HYSTERESIS 0 in net/sched/sch_htb.c
If I had 128k up I would mss clamp to say 576 any traffic classes that 
send alot of data. I would do this for bittorrent anyway as it it hard 
to shape (ingress) and reducing the packet size helps.


  Is there any way to configure htb, to have good, __STABLE__ pings ( 40 - 100)
  while other people exploring the internet.
This can be tricky, shaping traffic from the wrong end of the bottleneck 
is not as easy as upstream.

I have 512 down and can stop browsing hurting latency by having a class 
with ceil half my rate (about 80% of link speed). Using connbytes the 
first 80KB of new connections go here and it has a short (16 packet) 
queue - so that packets get dropped and get the new connections out of 
slowstart before they get too fast.

The trouble is that it only works well if there is no other traffic 
using the bandwidth. If you share and let bulk traffic have any spare 
then there will be a brief latency rise when people browse big pages.

P2P and bittorrent are harder to shape on ingress than real servers 
and need lower % of bandwidth and clamping to keep the packets small.


  Is use default htb parameters, maybe i must change some of them? Any
  suggestions?
Set burst on bulk classes low and quantums to MTU / what you clamp to.
Unless you are going to try Ed Wildgooses' DSL patch, set ingress and 
egress to 80% of advertised bandwidth.

Andy.
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] Gamest and QoS

2004-08-18 Thread Jonathan Soh
Without QoS, while uploading some files via ftp i have pings (in my
 favourite
game) 1000+. With my qos script my ping lower to 150 - 300, but is
very unstable.
  
Is there any way to configure htb, to have good, __STABLE__ pings ( 40
 - 100)
while other people exploring the internet.

I've had this problem for about a year now, I'm not sure what the cause is
exactly but I think it has to do with the minimum burst size that HTB must
have, which is something like 1.5kbytes (per class), combined with the
restricted timers that linux QoS uses. Anyway, what I ended up doing is using
the prio qdisc (which doesn't do rate limiting, only prioritises packets)
wrapped inside a TBF qdisc for its rate limiting. See my script below.

 One question I'd be wondering, is how to filter the game packets into
 the class.  I'm a UT2k4 fan, and it's not as easy as just filtering
 based on port as the server ports are all over the map.  Perhaps one
 would have to look at the packet size instead.  Hopefully it would be
 constant or small.

One way to filter this that might work, is to just put all the UDP traffic in
your interactive class, which I assume UT2k4 uses. Not very many programs
besides games use UDP traffic for its data transfer, so it should work
without putting too much unwanted packets into your interactive class. As
well, if your using ipp2p or port matching your p2p/ftp traffic, they won't
be put into the interactive class. It's quite important to put your packet
marking statements (iptables) in the right order also, if you do it in the
wrong order all your packets will end up in your interactive class (happened
to me in the beginning :) ). My script below should clarify things.

Download my script here:
http://quebeck.dyndns.org/temp/simple.htb

I haven't finished fine tuning it yet, but the basic traffic shaping works.

Jon

Find local movie times and trailers on Yahoo! Movies.
http://au.movies.yahoo.com
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] Gamest and QoS

2004-08-18 Thread mjoachimiak

While using htb have a look at r2q option and quantum (1500 bytes more or
less).
Threre is a special formula for it: quantum=(rate in kilobytes)/r2q it shuld
1500 byte. Try to set r2q to have on this level.Good thing is to have
conn-limit patch from patch-o-matic to limit max connection from one
client - it lowers ping too.

Please do write what did you do and if it helped to resolve the problem.
Good luck.
 Without QoS, while uploading some files via ftp i have pings (in my
  favourite
 game) 1000+. With my qos script my ping lower to 150 - 300, but is
 very unstable.
  
 Is there any way to configure htb, to have good, __STABLE__ pings
( 40
  - 100)
 while other people exploring the internet.

 I've had this problem for about a year now, I'm not sure what the cause is
 exactly but I think it has to do with the minimum burst size that HTB must
 have, which is something like 1.5kbytes (per class), combined with the
 restricted timers that linux QoS uses. Anyway, what I ended up doing is
using
 the prio qdisc (which doesn't do rate limiting, only prioritises packets)
 wrapped inside a TBF qdisc for its rate limiting. See my script below.

  One question I'd be wondering, is how to filter the game packets into
  the class.  I'm a UT2k4 fan, and it's not as easy as just filtering
  based on port as the server ports are all over the map.  Perhaps one
  would have to look at the packet size instead.  Hopefully it would be
  constant or small.

 One way to filter this that might work, is to just put all the UDP traffic
in
 your interactive class, which I assume UT2k4 uses. Not very many programs
 besides games use UDP traffic for its data transfer, so it should work
 without putting too much unwanted packets into your interactive class. As
 well, if your using ipp2p or port matching your p2p/ftp traffic, they
won't
 be put into the interactive class. It's quite important to put your packet
 marking statements (iptables) in the right order also, if you do it in the
 wrong order all your packets will end up in your interactive class
(happened
 to me in the beginning :) ). My script below should clarify things.

 Download my script here:
 http://quebeck.dyndns.org/temp/simple.htb

 I haven't finished fine tuning it yet, but the basic traffic shaping
works.

 Jon

 Find local movie times and trailers on Yahoo! Movies.
 http://au.movies.yahoo.com
 ___
 LARTC mailing list / [EMAIL PROTECTED]
 http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


[LARTC] Gamest and QoS

2004-08-17 Thread Marcin Sura
Hi

  I share my bandwith (adsl 512/128) between 12 users. I set up simple qos script for
  incoming (IMQ) and outgoing traffic using htb in root, 4 classess and esfq qdisc at
  leafs.

  Interactive traffic goeas to class1 , http,mail etc. to class2, p2p,
  ftp to class3, and rest to class4. Classess divide link in
  proportion 20% (prio 1), 40% (prio 2), 20% (prio 3) ,20% (prio 4)

  This works very well when users surfing internet (www,mail, ssh), but is
  insufficient when i really need low, stable latency for example for games.
  Games traffic  is in class1.

  Without QoS, while uploading some files via ftp i have pings (in my favourite
  game) 1000+. With my qos script my ping lower to 150 - 300, but is
  very unstable.

  Is there any way to configure htb, to have good, __STABLE__ pings ( 40 - 100)
  while other people exploring the internet.

  Is use default htb parameters, maybe i must change some of them? Any
  suggestions?

  

-- 
Pozdrawiam
 Marcin mailto:[EMAIL PROTECTED]

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] Gamest and QoS

2004-08-17 Thread Trevor Cordes
On 18 Aug, Marcin Sura wrote:
 
   Without QoS, while uploading some files via ftp i have pings (in my favourite
   game) 1000+. With my qos script my ping lower to 150 - 300, but is
   very unstable.
 
   Is there any way to configure htb, to have good, __STABLE__ pings ( 40 - 100)
   while other people exploring the internet.

I'm new to this, but I plan on doing what you describe eventually.  From
what I read the most important thing will be to use the prio parameter
and set the game class lower than all the other classes.  That should
ensure a game packet always goes out first.  I'd also make sure your
ceil isn't set higher than your adsl can realistically achieve.  Perhaps
lowering the burst on the other links might help too.

One question I'd be wondering, is how to filter the game packets into
the class.  I'm a UT2k4 fan, and it's not as easy as just filtering
based on port as the server ports are all over the map.  Perhaps one
would have to look at the packet size instead.  Hopefully it would be
constant or small.

Certainly let me/us know how it goes!

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/