[LARTC] Optimize online gaming at expense of web access

Linux Advanced Routing and Traffic Control

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

 



I've read the advanced routing FAQ (I suppose that's a given, or I 
wouldn't have found my way to this mailing list!), and I'm assimilating 
the information therein... but I'm still unsure of how to best optimize 
my system.  Basically, I have a LAN at home that goes through a RH 7.1 
system which serves as a NAT gateway (I use iptables) to the internet 
through an IDSL connection.  Since it's IDSL, it's not all that fast. 
Problems arise when my wife is playing an online game (Ultima Online) on 
one computer, while I am browsing large web pages or downloading files 
via the Web or while outsiders access my web page (I run apache on the 
RH system).  So, I'd like to give http a lower priority than other 
system activity.

My basic question is, what's the best way of doing this?

One example in the HOWTO seems close, but I'm not confident that I 
understand it well enough to adapt it:  section 15.4, "Prioritizing 
interactive traffic".  It recommends using the standard pfifo_fast 
scheduler; if I understand correctly the idea is to set the TOS bits to 
have telnet and ftp control connections go into band 1, while ftp data 
goes into band 2.  This raised a bunch of other questions for me:

Looking at the table in 9.2, it seems that the TOS bits will only send 
packets into bands 1 and 2.  What goes into band 0?  Are there other 
differences between the four TOS settings?  The names certainly suggest 
so.  Are they relevant to the task at hand? What if none of the bits are 
set -- what happens then?  And, in the table, what is TC_PRIO?  Where is 
it used?  I get the feeling that that's a *very* basic question, but I 
haven't figured it out.

Anyway, using this approach, I assume that I can toss packets into band 
2 instead of 1 by using:

# iptables -A PREROUTING -t mangle -p tcp --sport telnet \
   -j TOS --set-tos Minimize-Throughput
# iptables -A PREROUTING -t mangle -p tcp --sport ftp \
   -j TOS --set-tos Minimize-Throughput
# iptables -A PREROUTING -t mangle -p tcp --sport ftp-data \
   -j TOS --set-tos Maximize-Throughput

Hopefully the packets sent back and forth by Ultima Online will be in 
band 0 or 1, and this will solve my problem.  Is that right?

Thanks!

Bruce




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