1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

QoS for MMS

Discussion in 'Tomato Firmware' started by m00k0w, Dec 8, 2010.

  1. m00k0w

    m00k0w Networkin' Nut Member

    Hey there

    I'm torrenting a bunch of stuff which may but does not actually saturate the connection. I've got 5000/800 and it is using 3000 down (or even 100 down) but only maybe 500 up. 4000 connections. None of these numbers are overloading Tomato or my v3 because I can open 10 rich web pages at once and firefox lags to render them before there are any noticeable slowdowns in getting all the data.

    Still, a single 600k MMC stream in VLC lags. I have set the buffer to 15 seconds and it will play for half an hour, but once I open a single large web page it will have to stop for 5-20 seconds to buffer before resuming. I have posted on VLC forums that their player is not doing all it can to push harder to maintain a large buffer, but realize perhaps this issue is out of their league or a problem with MMS. However, WMP is handling the issue a bit better, but there is no problem when there are no torrents running.

    I have tried enabling QoS but it doesn't seem to prioritize it and seems to cause more slowdown. Tell me if this is correct:

    All defaults (including default class: low) except:

    down: 4500
    up: 730

    Classification entry:
    TCP/UDP destination port 1755, no size entered. Highest priority.

    I checked that there is in fact a connection dest 1755 from the IP serving the video while it is playing, in the View Details page.

    All the rest of the default examples remain on, and I've tried them all disabled. Assuming they're disabled, everything takes Low priority except for the MMS at highest right?

    Why doesn't this help? Load is .4 tops when this is running so it doesn't seem to be a cpu issue with a huge number of connections.

    Does the router need to be reset or something else done when this is set?

    What do I do to absolutely prioritize MMS port 1755, and leave all other traffic neutral but below this single exemption?
  2. Toastman

    Toastman Super Moderator Staff Member Member


    The most important, lower your maximum bandwidth setting to 66% of the MEASURED fastest upload speed to your ISP, tested with an online speedtester. If 730 was what you obtained, try setting 500. This is very important, especially for VOIP and games, but also for uninterrupted streaming video. If it works, you may try increasing this figure later. This graph shows why:


    (graph thanks to Jared Valentine).

    Next, improve your router's performance by attention to the Connection Tracking / Netfilter timeout settings. If you really have 4000 connections showing, then your P2P is out of control.

    Reduce the number of connections tracked by expiring old connections faster, probably around 3000 or more of those 4000 have already been closed. You will also see many connections under "unclassified" that are dead incoming connections to sockets that have been closed already. You can be very harsh with the timeout values - use the figures in this link as a guide. http://www.linksysinfo.org/forums/showthread.php?p=357556#post357556. Unnecessarily tracking 3500 connections will slow down the response time of the router. You may see the count drop to less than 500 - don't worry, this is normal.

    Set incoming maximum limits on classes so they can't saturate your incoming pipe. Note that the INBOUND LIMIT setting is not an overall limit, but this figure is just used to work out the percentages for the individual classes.

    You don't mention what version of Tomato you use, but the original default QOS rules are pretty useless for control of P2P. Try reading up on QOS in the thread below.
  3. m00k0w

    m00k0w Networkin' Nut Member

    Thank you for the info

    I have set the incoming lower. I actually realized that WMP takes the video over port 80 instead of 1755 and handles it much better, including allowing seeking, as double the data rate of the video comes in for quite a while after the video starts playing. It is really VLC's fault, or perhaps this video streaming host.

    I've already brought the numbers for TCP TimeWait and UDP Assured down to 30 seconds, and raised them to 400, the point at which excessive connections uses too much memory. It was actually killing the CPU to have it low. There are 2k torrents seeding and, at least when starting them, they use as many connections as possible. Later on, it drops to 500-1500.

    When you set the number too low as far as I know, connections that may, in a minute, start transferring, get closed, and need to be reopened. There isn't much problem in keeping this many open, as long as there is enough RAM. It's been 6-7k with no issues.

    Since the MMS/WMV is now coming along port 80, there are two rules I've set. Highest priority port 80/443, at 80-100% of the upsteam, and lowest bulk at 3-89% of upstream. This makes nothing lag and everything run smoothly. I presume when I open many pages at once, the stream would get bogged down but only when a strange client like VLC is accessing it. I'm already taking this up on their forums.

    What difference does the lower value make for the percentage selection?

Share This Page