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

What information does tomato/wrt54g-tm store over time?

Discussion in 'Tomato Firmware' started by mlcloud, Dec 28, 2009.

  1. mlcloud

    mlcloud Addicted to LI Member

    Hi, new user here.

    So I'm running at wr54g-TM with tomato 1.27, wireless, and I faced a number of problems; some which I managed to solve, and others which are still stumping me.

    Main Problem
    The router slows down after a few hours of use, the length depending on what applications I run. If I turn on few intense torrents, within a few hours, "ping 192.168.0.1" will return values all over 1k. A reboot will fix this instantly, and for the first hour or so, pings stay at a delicious 1ms regardless of what applications I have on. If I host, by my third wc3 (DotA) game (not torrent) pings to the router begin to reach 50ms, and spikes occasionally. Simultaneous torrenting and wc3 with QoS will render my router useless within 30 minutes, even if the first 5 minutes are beautiful.

    Things that might be important:
    -Overclocked to 250mhz, since I read a post (by Toast?) saying that that would be fine for most routers, even without a heatsink.
    -QoS is on, all prioritized except ACK, bandwidth 25mbps/3.5mbps, set the outbound limit to 2800 just to be safe.
    -Channel 7, txpwr set to 50, WPA2/AES encryption
    Here's my Conntrack/Netfilter settings:
    [​IMG]

    [​IMG]

    [​IMG]


    So my question is, what is Tomato accumulating within these hours that causes it to slow down so massively after a few hours? Why does it work so beautifully after a reboot? Is there a way to get the "effect" of the reboot without rebooting? For example, I've heard that you can "clear" the DNS cache via "killall dnsmasq" and then simply restarting the service... is there something similar I could do here?
     
  2. Toastman

    Toastman Super Moderator Staff Member Member

    You didn't publish your classification rules. Anyway, assuming your torrent class is "lowest" or "A", the snaps show you are allowing a couple of mbps of outgoing P2P traffic. If you get some good seeds (which will come online and build up gradually, hence the 30 mins to 2 hours) you might expect incoming data from P2P sites to rise to at least 20 to 30 times what you send out, which could exceed 60mbps! That will completely swamp your incoming downlink of 18Mbps. Set outgoing P2P to say 20% at first which will limit what comes back, and then place incoming bandwidth limits on your classes. Start with P2P class and set it to 5Mbps and see what happens.

    Also, 25Mbps is probably pretty close to the maximum the router can handle, with QOS, encryption etc. on it might just be struggling. Test this by setting both out going and incoming bandwidths lower, say 50%, again, see what happens. Under normal circumstances I have never seen a ping from the router over 1mS, so I think yours is just being asked to do too much.

    Don't forget to also disable DHT and Bit Torrent DNA, which can use a lot of bandwidth with no benefits.
     
  3. mlcloud

    mlcloud Addicted to LI Member

    Toastman, it's great that this post caught your eye.

    The router reaching high pings happens regardless of whether torrents are on or off; it just reaches this mode of "extreme pings" faster when torrents are on. I've seen pings to the router go to 700ms after a few games of hosting warcraft 3.

    If bandwidth swamping was the problem, turning off torrents and internet browsers should effectively reduce the latencies back to normal: I observe this via simultaneous speedtest runs, and then exiting out of the browsers, making my router go from 1 ms to 1.6 seconds (and then a few timeouts) and then back to 1ms.

    But perhaps there are some latent connections swamping my inbound connection (I know there isn't anything in the outbound, which you can monitor in the QoS graphs). I'll do some proper bandwidth monitoring (and I'll cut down the classifications to those 20-30% ranges you suggested, and set some better limits on my inbound) and see if anything changes.

    Thanks!
     
  4. mstombs

    mstombs Network Guru Member

    I suggest you login via telnet/ssh and look at the output of the command "top", this will tell you what processes are consuming what cpu/memory. We have seen scripts give symptoms such as yours - are you doing something fancy with the Leds for example?
     
  5. Planiwa

    Planiwa LI Guru Member

    Are your arping times wonky as well?

    Are you interested in monitoring your vital statistics?:

    Code:
    # vit
    LANClients Connections Free+Cached,Free(KiBi) Load Processes FWUptime WANUptime SysUptime FWMBkP Interface<Dn>Up ...
    VIT: br0:1   6 FC:6380 F:1988 .0 1/23 11d +16s 12d 12398/15337 ppp0<1605>2836 eth1<1840>2837
    # 
    

    Code:
    vit -h
    Syntax		vit [-h] [-H] [-k] [-p] [-t] [-dir] [-I] [Interface ...]
            Could put this in /jffs/vit and run it from Scheduler, eg: /jffs/vit -l -H -M
    -h		This help
    -H		Don't show title headers
    -k		Show kiloBytes instead of MegaBytes, or kiloPackets instead of Packets
    -c		Show connections/100 instead of connections
    -p		Packets instead of Bytes
    -d		Prepend Datestamp
    -s SLEEPSEC	Repeat every SLEEPSEC seconds, until interrupted
    -l              Send output to syslog
    -dir DIR	Write output to file HHMM in directory DIR.
    		NB: Use CRU in INIT script to control exact Minute!  (Scheduler is unpredictable.)
    		eg: cru a Vit '01,16,31,46 * * * * /jffs/vit -d -p -dir /jffs/vitlog'
    -M		Show all Memory measures: Free Cached Buffered Active Inactive (in KiBi)
    -I		Show all Interfaces
    Interface ...	one or more interfaces.  Default: ppp0 eth1
    
     
  6. Toastman

    Toastman Super Moderator Staff Member Member

    A few comments:

    Fine on the lack of Torrents on occasions when this happens. However, you must not assume because you have stopped torrent app means that it really has closed. uTorrent will often continue running. Bit Torrent DNS is a separate process and also continues to run. It is often necessary to kill the processes manually in Task Manager.

    mstombs comment about the scripts is very pertinent. Some of them run in a loop and take up resources.

    If not ... it seems that something running on your PC's may still be flooding your router with packets, since it takes some time to occur. There are many things it could be, viruses or mail bombs are pretty common. Planiwa's scripts can help you determine what is going on. You can also gain information by looking at the connection lists under QOS/View Details. What do they show when no torrents are running? Is there any sign that something is hammering your router with traffic?

    Switch off your PC's individually and see if the router enters this slide into doom without them. Start with as little as possible running, and take it from there.
     
  7. Planiwa

    Planiwa LI Guru Member

    The "bandwidth" (i.e. traffic) charts might give a clue.
    Ditto for the QoS connection charts, although those are easily misunderstood.

    In addition to traffic flow, one measure that may be useful is Packet Size.
     
  8. mlcloud

    mlcloud Addicted to LI Member

    Whoa, thanks for all the replies, everyone!

    Heh. "Under normal circumstances..." So I guess my usage is nowhere near normal :what:

    It's funny how Planiwa expects me to know how to apply that script, while Toastman says I might not kill the connections from uTorrent properly xD. Am I a computer newbie or guru here? While I do have all the processes and almost all the services running on my computer memorized, I guess I'm closer to the newbie: I don't know how to implement those scripts you gave me Planiwa, and after some time on Google, this is what I found:

    http://www.linksysinfo.org/forums/showthread.php?t=63456&page=2

    But I still don't know how to implement the script itself. I'm *very* interested in what vit has to show.

    The "router-slide-into-doom" seems to happening much more infrequently with inbound bandwidth restrictions, and so while I would like to think that was the main issue, there are some other things I'd like to inquire about:

    Take a look at this:
    [​IMG]
    XDCC download via mIRC, going at a third of what it normally does and giving me massive spikes. There are 40 concurrent connections reported by Tomato, with an outbound of less than 8kB and an inbound of less than 140kB (most of which was being taken by the XDCC download itself). Youtube, downloads from HTTP servers, all similarly give me high latencies. Top reports nothing but itself using over 0% of the CPU. Any other information that might be helpful, I'll do my best to gather.

    And then after a reboot:
    [​IMG]

    Another bot even maxed out what my current inbound QoS permitted me (~800kBps) with my latency never going into two digits. There are still 40 concurrent connections with the upload speeds at similar levels pre-reboot, with the inbound speed higher (primarily because the XDCC downloads are going faster). Ten minutes later, things are still stable (giving programs a chance to reconnect after the reboot).

    It's almost like the router becomes ... "sensitive" after prolonged use.

    How can I monitor packets going through the router? Is there a "queue" in the router that sorts out packets according to the classifications set by QoS?

    Again, thanks a lot for the responses.
     

Share This Page