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

Speeds have dropped dramatically

Discussion in 'HyperWRT Firmware' started by drunknmunky, Dec 16, 2005.

  1. drunknmunky

    drunknmunky Network Guru Member

    So I downloaded HyperWRT, the brand new one in order to resolve the issues with my WRT54G and its constant resets. I am a frequent p2p'er and ever since the installation of the new firmware as well as pasting the speed boost startup script, my speeds are now only about a quarter of what I used to have. Does anyone propose a resolution for this?

    Thank you
    Billy
     
  2. NateHoy

    NateHoy Network Guru Member

    Odd. I'm running Tofu 11, and it's pretty darned fast from here.

    Do you have QoS set up? How is it configured? What startup script, specifically, do you have loaded (Tofu technically does not require a startup script, by the way. He fixed the "P2P bug" in the tuilt-in firmware defaults).
     
  3. drunknmunky

    drunknmunky Network Guru Member

    I do not have QoS setup as I don't know what it does. I'm also not sure about the p2p bug but I have the brand new version of the Tofu firmware

    Firmware Version : v4.30.1, HyperWRT 2.1b1 +tofu11

    I honestly don't even know how to identify the mac address of my own pc on the network
     
  4. NateHoy

    NateHoy Network Guru Member

    OK, then what is the "speed boost startup script" you are referring to?
     
  5. drunknmunky

    drunknmunky Network Guru Member

    echo 4096 > /proc/sys/net/ipv4/ip_conntrack_max
    echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts
    echo 1 > /proc/sys/net/ipv4/icmp_ignore_bogus_error_responses
    echo 512 > /proc/sys/net/ipv4/neigh/default/gc_thresh1
    echo 2048 > /proc/sys/net/ipv4/neigh/default/gc_thresh2
    echo 4096 > /proc/sys/net/ipv4/neigh/default/gc_thresh3
    echo "600 1800 120 60 120 120 10 60 30 120" > /proc/sys/net/ipv4/ip_conntrack_tcp_timeouts
     
  6. NateHoy

    NateHoy Network Guru Member

    OK, that's the standard script for fixing the P2P bug (router crashes every day or two when using P2P). Those fixes are already set up in the latest Tofu build, and to be honest I think a few of those settings are too aggressive. Try taking that startup script out of the router and restarting.
     
  7. drunknmunky

    drunknmunky Network Guru Member

    any other possible solutions?
    as in set into th newest build? you mean that 2.1 beta already has that within the script rather than me pasting it again?

    would setting up the qos by ethernet port be efficient or by device and mac address?

    Also, what would the setting for upstream bandwidth become?
     
  8. drunknmunky

    drunknmunky Network Guru Member

  9. SteelersFANinMA

    SteelersFANinMA Network Guru Member

    Try setting the QOS bandwidth to 8x your upstream from your ISP. So, if you have 384 kbps upstream: 384x8=3072. Device name = Computer name which you can find by right clicking on My Computer>properties>computer name. Mac Address = the mac of your wireless adapter/NIC. There are several places to find the correct Mac to enter found in the GUI of your router's firmware. The easiest is probably to check the status page.

    As far as the startup script goes, you don't need any of that anymore with the latest Hyperwrt firmwares. That script wasn't really a speedbooster, it just set a shorter period of time to get rid of all the dead connections that would clog up the router's memory when using p2p applications.

    Qos by Ethernet port is used when you have say, another computer, a playstation or xbox connected to one of the router's ethernet ports. Since you're talking about p2p, that shouldn't come into play unless you're running p2p through a computer that is connected to the router through one of the ethernet ports. Which is of course, not a wireless connection.

    You could try Qos by Application priority along with device priority. Just add the name of the p2p application, set the priority level and then check the applications info. to find the port/s that it uses and add it. Also, when it comes to p2p ports, some ISP's block or cap certain ports that are known to be used by p2p applications. So, if possible, set the ports to something different than the default. Say for instance, your p2p program uses port 6881, change it to something like 16881 in the settings of your p2p program and then add that to the Qos application priority settings.

    You could also try port forwarding or port triggering to manually open ports. If you try this, I would suggest port triggering as port forwarding opens the ports and keeps them open until you change the settings again or you set the router to clear all forwards at each startup, which is a new feature in tofu10/11. Port triggering will manually open and close the ports as needed, (when data is sent or received through the triggered port/s). So, it's a little bit more safe than forwarding. If you use a software firewall like ZoneAlarm, make sure you also allow traffic through it on the correct ports.
     
  10. NateHoy

    NateHoy Network Guru Member

    I'm going to have to differ with SteelersFAN. I've never heard of setting your QoS upstream bandwidth anything above your actual bandwith, and from my understanding of QoS (which I fully admit is limited), I would think it would negate QoS. Every bit of advice I've ever seen is to set QoS Upstream at 80-90% of your real, tested upstream bandwidth.

    I've found that MAC address based QoS seems to be more efficient and effective than by Ethernet port, and I've tried both, but the difference is pretty negligible in my limited testing.
     
  11. SteelersFANinMA

    SteelersFANinMA Network Guru Member

    I may be wrong about what # to set the upstream bandwidth. I believe I saw the 80-90% that Natehoy mentioned at some point also. However, I will quote a part of a post where danielhaden, a moderator for Hyperwrt.org and a member of linksysinfo.org gave the info. to me about upstream being set to 8x.

    http://hyperwrt.org/forum/viewtopic.php?id=476

    The following quote can be found in second post of the thread listed above:

    "Quality Of Service, QOS is greatly useful in radio heavy environments. Set one thing to high, and that would be the mac addresses of your computers. Set the speed to manual and about 8x higher than your connection rate in KBps."
     
  12. SteelersFANinMA

    SteelersFANinMA Network Guru Member

  13. NateHoy

    NateHoy Network Guru Member

    Nope, there's no conflict, now that I understand what you meant. No ISP *EVER* rates their speed in kB (kiloBYTES), they use kb (kiloBITS). One KiloBYTE = 8 KiloBITS. Speeds are almost invariably expressed in kb, not Kb. After all, which sounds more impressive, a 56kb modem, or a 7kB modem? They are the same thing, but the 56kb modem will fly off the shelves. What a difference capitalization makes!

    Similarly, my 256kbps upload allows me to transfer, ideally, 32kB per second upstream. My ISP rates it as kbps, and not kBps, because 256kb is more saleable than 32kB. Download rates are rated the same way.

    So, yes, you would multiply the KiloBYTE upload speed of your ISP by 8, but since your ISP is quoting in KiloBITS, you'd have to divide by eight first to convert KiloBITS to KiloBYTES, then you can multiply by eight again to get KiloBITS. ;)

    So, you are correct, but telling someone to multiply the upload by 8 assumes they have the upstream number in kB, which is exceedingly rare.

    However, having now understood the two languages you and I were speaking, I wouldn't put your full bandwidth speed in the field, regardless. There will always be a little overhead, so it's good to leave at least a small margin, to start, then work up or down to see what works best for you, your cable modem your bandwidth load, your traffic types, and your ISP. The answer will vary. But 80-90% is a good starting point.
     
  14. NateHoy

    NateHoy Network Guru Member

    Yes, and frankly, I finally gave up trying to prioritize my non-Vonage traffic. I took out the Ethernet port based QoS, and just run Vonage at HIGHEST ("Premium", in QoS parlance), and everything else unspecified.

    I still have the ports set to LOW for BitTorrent, but I've turned off the "optimize for gaming apps", which I think turns off those fields in HyperWRT. I also played around with the upload rate and I'm having very good luck at about 96% of rated, which is an improvement over my previous setting of about 85%. But, I honestly think that number is different for each application, since there is a variable amount of overhead depending on the types of things being done. VoIP seems to be pretty efficient.
     
  15. SteelersFANinMA

    SteelersFANinMA Network Guru Member

    I understand KB and Kb. So, the correct entry should be found like this?

    ISP Upstream = 384 Kbps

    384x.83=319 (rounded up from 318.72 and using the 83% method)

    Also, If I have used Cablenut and TCP Optimizer to tweak my TCP/IP settings and I now get scores of over 400 kbps on upload speed tests, should I factor that in when figuring out the correct entry for QoS, or should I just use the ISP rating for upstream?
     
  16. NateHoy

    NateHoy Network Guru Member

    Hmm. That's an excellent question. One that a good set of tests will bear out, no doubt. (grin).

    Always base your numbers on tested speed rather than rated speed. As long as you aren't getting artificial speed ratings from using compression or something, you should be good with the actual, tested speed, whether it be lower or higher than your ISP's rated numbers.
     
  17. danielhaden

    danielhaden Network Guru Member

    Sorry about the Kbits VS Kbytes confusion. QOS is in Kbits and the internet browser's meters are in Kbytes.

    Putting in all of your MAC addresses, regardless of manual speed setting, can reduce lag by enabling bandwidth streaming. This does work for downloads. This does not work on "auto" setting. This does not work with ethernet port priorities.

    The higher number you put in for the "manual" speed selection, the less effective QOS will be at stopping other usage and the faster your Internet will go. Of course too high of a number disables QOS entirely.

    Now that somebody has mentioned it, you CAN put in a number that is higher than your upload rate. QOS will be far less effective at slowing down the lowest priority bandwidth. Bandwidth streaming will still work. Internet browsing will go faster than with a low number. 8x is far too much. The maximum number that you can use while still retaining any benefit of QOS is 83% of your advertised download rate. Since cheap DSL is advertised in Kbits, no conversion is necessary. 83% of 1500 is 1245. That is the download rate and QOS is still working. In fact, this is the way it is used at my house, because I do not use VOIP.

    Of course, VOIP may not work well with a figure this high. Multiple clients simultaneously browsing the web with no lags works fine with a figure this high. So, test and find the highest figure that works for you. ;)

    After all, that speed setting just turns the effectiveness of QOS up (smaller number=harsher QOS) and down (higher number=faster QOS).
     
  18. NateHoy

    NateHoy Network Guru Member

    Just to clarify - higher number = faster QoS and also less effective QoS.

    If your QoS thinks it has more bandwidth to play with than you actually have, QoS will try to stuff more packets into the pipe than will actually fit. Set it too high, and you might as well not have QoS in the first place, because your modem, and not your QoS, will become your bottleneck.

    So, basically, in "mission critical" QoS applications, your upstream bandwidth should be set to exactly what your available bandwidth is, allowing for overhead (and that's where the "start with 80-90%" of rated bandwidth and play" math comes in). Set it too low, and you artificially lower your bandwidth because QoS won't attempt to fill the pipe, and you'll always have a certain amount of slack upstream bandwidth. Set it too high, and QoS will become less effective, because you'll be making your modem, and not your QoS engine, handle the overages.

    If your available upstream bandwidth is variable, well, then things get ugly. Because you have to choose between limiting yourself to the lowest common denominator and having strictly working QoS, or raising the bar a bit and having QoS that doesn't work 100%, but at least allows your apps to take full advantage of your bandwidth at all times.

    As far as I know, downstream QoS is pretty useless. QoS is only effective at putting data INTO the restrained pipe. So in the case of outbound/upstream QoS, I can tell my router which packets to dump into my cable modem first, and which to hold for a few tics to "make room" in the pipe for the stuff I want.

    But the restrained downstream/inbound pipe is controlled by my ISP, who decides the order of packets to be dumped to my cable modem and presented to me. I take that data from a 3mbit connection and accept it on a 10mbit connection, so there's no sense trying to prioritize the packets on the inbound side, since I can receive them and process them faster than they are arriving.

    My ISP probably receives them on a 100mbit connection, but they have no way of having me tell them that I am interested in a certain type of packet first. They just take 'em as they come, and pump them toward my cable modem, which is capped at 3000kbit, and they are processed in the order they are received, or pretty close.

    If my ISP could feed me 100mbit and my router could only handle 10mbit, then inbound QoS would make sense, and it certainly does for a lot of applications. But not many of them are going to happen in a scenario with a $50 router. So I doubt (and I hope Tofu or Thibor can confirm or deny this for sure) much processing happens in inbound QoS on the 54G/GS/GL series firmwares.
     
  19. Thibor

    Thibor Super Moderator Staff Member Member

    you're quite right nate, inbound QoS is not performed here. we've dabbled with it, but imho it doesn't seem very effective, as i would've expected considering your very full description
     
  20. NateHoy

    NateHoy Network Guru Member

    Thanks for confirming that.

    I've often wondered how you possibly could get inbound QoS working without a really cooperative ISP and some standard communication method for sending QoS preferences to a remote machine upstream of the bottleneck (which is unlikely in the EXTREME, to put it mildly).

    Of course, on a FiOS connection, maybe inbound QoS becomes useful again on a 10mbit Ethernet network, or slow wireless. But if I had FiOS available, I'd be making sure my network could handle all of it, or I'd not be complaining about the fact that I can *only* use 10mbit of my available Internet connection. ;)
     
  21. SteelersFANinMA

    SteelersFANinMA Network Guru Member

    OK, I'm starting to understand QoS a little more. However, I'm getting confused by daniel mentioning 83% of download rate. I thought it was upload rate? Anyway, can someone just make this simple for me?

    I have a 4000/384 cable connection. In manual setting, should I put in 83% of 4000 dl or 83% of 384 ul? Thanks for any replies.
     
  22. NateHoy

    NateHoy Network Guru Member

    83% of 384, or ~357.

    Better answer is to go to www.dslreports.com/tools and do a speed test on an idle internet connection. Do a few tests over the course of a day or two. Whatever your tested upload is (not including overhead), enter that number or something JUST below it.

    If you find that your Internet upload speeds are being affected heavily by QoS (assuming it's not just that your "Premium" services are eating up all your bandwidth), the number is too low. The router is underestimating available bandwidth and is being too aggressive at throttling the connection. Raise the number a bit at a time, rebooting router between adjustments, until you like what you see.

    If you find that QoS is ineffective (eg. even if you have an application set at Highest/Premium, applications that are unprioritized or set at Bulk/Low priority are still interfering), then your Upload number is set too high. Decrease the number (again, rebooting between adjustments) until that issue subsides.

    Ideally, you would set the number at your EXACT upload bandwidth, allowing for actual overhead, so the router clearly knows exactly what it can enqueue on the modem at any time. Then the router can throttle back just enough lower priority traffic to always allow higher priority traffic to be enqueued.

    Realistically, that number will change a bit every time you test it. Packets will need to be resent from the modem and/or the router. Jitter will happen. Packets will be lost. Packets will be misdirected. Noise will kill a few. "Stuff Happens". So the amount of actual overhead depends on the quality of the line, the type of data being transferred, and a jillion other factors.

    So, for your connection, you have to start with the best numbers you can get and play with the number and get the "magic one" that meets your needs and your priorities. And, as Thibor has confirmed, none of this counts for DOWNLOAD, since you cannot control how your ISP sends you packets anyway.

    OR, you can set it to "auto". What will happen at "auto" is (in my experience), the router will be unaware of your real upload bandwidth until the pipe starts filling up (heavy usage, when it's got some real numbers it can work with), then it will adjust and react to the amounts it really sees. This can cause some periods where QoS takes a long time to adjust to real network conditions, and it either overthrottles or underthrottles, and you get really poor results for a short period.

    However, you could set it to auto, put your router under heavy load, and see what number IT comes up with (Tofu and Thibor's recent builds display this for you, right on the configuration screen). Might be interesting reading, and a good foundation for what YOU want to play with.
     

Share This Page