Don’t mess with half-open connections!

September 7, 2007

TorrentFreak has a decent tutorial on speeding up your torrent downloads, but watch out for the first tip, it can cripple all other Internet apps including your web browser!

My Windows XP SP2 was installed of an nLite customised CD, with the max half-open connections setting set at 250 (up from the default 10 in XP SP2). Following the advice in the tutorial, I set my uTorrent to 50 connections instead of the default of 8. Within minutes my already open Firefox window would not follow links, new tabs would not even show any attempting connection activity.

After much checking with IE, Opera, in different user accounts no browser worked (all this with uTorrent chugging away with the new setting). Finally I reduced uTorrent back to 8 connections (lower than the XP limit of 10) and now the browser is slowly crawling back to normal. Its still a little flaky but as uTorrent closes its connections this will hopefully stabilise.

Now the kicker is this — I could max out the 1Mbit connection if I removed the download throttles, without touching the max half-open connections (set to 8 by default)! So not only is this setting not really useful, it is potentially quite disastrous for the overall health of the Internet connection.

Best to just leave it alone.

Advertisements

23 Responses to “Don’t mess with half-open connections!”

  1. Ernesto Says:

    Hi Sumod, this seems to be happening only with the newer versions of uTorrent, not at the time I wrote the article. I guess I need to update the tutorial.


  2. […] 1. Hack the max half-open TCP connections Update: this tweak is NOT recommended if you use uTorrent >1.7, it may lead to unstable behavior. […]

  3. Imran Says:

    Awwwwwww… crap… i have utorren 1.7.4

  4. Kinyo Says:

    I have utorrent 1.7.5

    and just applied the patch yesterday to up the max connected peers to its default (i think 50?)

    well, with 1.7.5, it is downloading alot faster even though up speed is alot lower

    maybe a setting was changed in 1.7.5 to change this – i have tested firefox / opera / IE 7 and everything is up to date with windows upadate.

    i have windows xp pro sp2

    I’m thinking that it’s not much of a problem anymore.

    Just thought I’d update you all with this new information

  5. Tomorer Says:

    Im on the uTorrent 1.7.5, and the patch did what the man says above, at the top, completely screwed my Firefox browser. I just got the patch back up and the option to undo was ther [U]. I did that, then was prompted to restart, and lucikly the browser works again. Im still not sure if its affteted the connection permantly or something.It does seem considerably slower right now. It may just be temporary.

    I say dont mess with this patch unless you know your stuff. Im a windows XP home user, and the system jhust cant handle it. As far as I know. It probably requires more patches. Over and out.

  6. SharK Says:

    I am using XP SP2 and i applied the patch and twitch it to 75 and it went smoothly. Nothing went wrong with any of my browser. Not sure where or what i did right actually.. Download speed is way faster.. Anyways, i am using uTorrent 1.7.5.. πŸ˜‰

  7. MarkP Says:

    There may be a router issue here – apparently some routers, like my old D-link, start to choke at 200 open connections. Having said that, I found that hacking the winxp half open connections setting actually solved the problem that you describe, and I’d be tempted to see what happened with lower values – 100 half open connections in windows and 25 in uTorrent, for instance, and see if you found the same behaviour.

  8. Hikmatun Says:

    So do i . Just update Utorrent yesterday to 1.7.5 arrghhh. SO can i roll back to my previous Torrent or what’s better? πŸ™‚

  9. Shought Says:

    ———————–Quote———————–
    MarkP Says:
    November 24, 2007 at 10:32 am

    There may be a router issue here – apparently some routers, like my old D-link, start to choke at 200 open connections. Having said that, I found that hacking the winxp half open connections setting actually solved the problem that you describe, and I’d be tempted to see what happened with lower values – 100 half open connections in windows and 25 in uTorrent, for instance, and see if you found the same behaviour.
    ——————–End Quote——————–

    I think you have a point there, max the Windows half open connections to like 100 and take 50 for uTorrent. This way uTorrent won’t use all of them you should check with your own pc how far you can go. First try this then change 50 to 60, 70, 80, so on until something happens.

  10. matt Says:

    used the patch, slowed down my entire computer, was pgrading to xp64 and now my hard drive will not wipe tp take the new xp, any ideas?

  11. Stingaxe Says:

    With 1.7.6 uTorrent, setting the half open connections back to 8 made it faster.

  12. djferrick Says:

    Hi. Thanks for the tip. I updated to 1.7.6 and then my internet and my torrents slowed and stopped. Had I not read this I would not have known to reset my half open connections back to 8. Now it’s all working perfectly again. Cheers

  13. Matt Says:

    I’m using 1.7.7 and have it set at 80 IE won’t work when utorrent is running but just turn utorrent off and IE is back to normal. So watch TV when downloading! easy!

  14. Christian Says:

    You can avoid your torrent downloads crippling your other internet apps.

    1) Don’t set the half open connections to 250 – that is WAY to much for a 1 Mbit connection.
    The patch suggests 50 connections and that should work well for most people. There are diminishing returns to increase the limit of connections anyways so don’t feel bad about setting a lower limit.

    2) Too much traffic and too many packets choke programs using the internet connection, but you can resolve this problem by using QoS traffic shaping either in your hardware router, your software router, or on your own pc.
    It prioritizes internet traffic according to importance, so your torrent traffic will not choke internet browsing and will make your internet connection feel much more responsive. It should also boost your speed because the connection will be utilized better.
    Whatever you set your max connection limit to , make sure to reserve a few connections for other traffic like browsers and mailprogram and such. 10 connections reserved should be plenty, as it is after all the max limit on a unpatched Windows pc.
    So if you patch your limit to 50 , set your torrent program to use max 40.

    For a hardware router you can use a custom firmware with QoS , like f.x Tomato :
    http://www.polarcloud.com/tomato/
    If you need a router then I suggest Buffalo routers – They are quite good in my experience.

    For a software router (usually a linux pc) there are several way to do this and packages that help you do this .. I did a quick search and found http://www.mastershaper.org/ which looks interesting.

    For a Windows client you can use Cfosspeed : http://www.cfos.de/speed/cfosspeed_e.htm
    Cfos also have a page that explains traffic shaping :
    http://www.cfos.de/traffic_shaping/traffic_shaping_e.htm
    A good read if you are new to the subject.

  15. escafu Says:

    c’mon people it’s not that hard.. if you patch your windows xp tcpip.sys to 50 half-open connections then in utorrent set net.max_halfopen to 40. this will keep the same ratio (8/10). also you need to limit utorrent’s upload and download rates so it doesn’t use up all your bandwidth. utorrent 1.7.7 is working like a frickin’ champion for me now after using LvlLord’s patch, and my email, browser etc. all still work fine (on a 128k connection!).

  16. VuJa Says:

    This shit fucked up my computer it runs slower and torrent is still fucked up………

  17. xenover Says:

    Ture, Don’t Mess with the net.max_halfopen!
    It just turn’s your browser very slow!
    But if you DID it already just change it back to 4 (on utorrent) then it’ll be normal again

  18. b10nary Says:

    I am running utorrent ver. 1.8 build 11813 and my browser speeds are super fine, and downloads are fast as usual, running winxp sp3 too.

  19. Sumod Says:

    Excellent points! Linksys WRT54G in particular chokes up really fast. I have set ut to do no more than 50 connections per torrent and a total of 200 connections, which is working great, saturates a 2mbit connection now.

    However, ‘max half-open connections’ affects the _rate_ at which the connections get estabilished, and is therefore of much less utility as a tweakable property. Its side effect of choking the network is limited to the TCP/IP stack of just the pc running ut, not the entire home network, so in my case it was not the router’s fault.

    Thanks for the useful pointers!

  20. Agrees with the rest Says:

    I have to agree with you about the whole “max half-open connections” issue. I have the newest version of UTorrent and it was, at times, completely choking up my page loading speeds. One I undid the changes the browsing speeds increased (Also, I’m not sure if this is coincidence, but my dl. speed increased as well o.O).

    I also have to agree that the Linksys WRT54G Is prone to choking up. I may look into the newer version or a different one entirely.

    Good luck to all of you.

  21. JesseG Says:

    Or you could put DD-WRT on your Linksys. If you set the TCP timeouts to 180 seconds (UDP is fine at 120, but 180 doesn’t hurt either) you can get away with the max of 4096 connections in a router with 16 MB of memory. And it runs so smooth, never have to reboot the dang router, etc. The 15m load average when I’m maxing out my uTorrent (I have conservative download/upload limits) is only around 0.10 to 0.20… so the router really isn’t even breaking a sweat.

    If you are having speed issues in your browser then you’re either:

    Overloading your connection RATE, limit your downloads to allow at least 32KB/s through, or more like 128KB/s if you have a multi Mb/s down.

    Or – you’re overloading the connection limit on your router. If rebooting the router “helps” restore the connection than that’s the problem is your router is chocking on the connections. Some Linksys routers leave connections open for half an hour, lol. So changing the half-open connections OR NOT can choke those routers either way. The thing you need to be careful of on those is the TOTAL amount of connections allowed. And limiting that can hit your download speeds more than half-open limits, but that’s what you get for running crappy software on your router. Upgrade to DD-WRT. πŸ˜‰


  22. […] Update: this tweak is NOT recommended if you use uTorrent >1.7, it may lead to unstable behavior. BScommerceΒ is a regular online program with a silly admin, why I said silly because admin copied […]


  23. […] Update: this tweak is NOT recommended if you use uTorrent >1.7, it may lead to unstable behavior. […]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: