Seedbox Hosting

Remote Control for your Torrents

Seedbox Hosting header image 2

How to tune your connection settings

December 6th, 2007 · 5 Comments

Sometimes I see people run all their torrents at unlimited number of connections. I used to do the same at first - until i noticed that the upload and download speeds began dropping suddenly, and the Torrenflux web interface became nearly unresponsive - sometimes taking 2 or 3 minutes to load a single page.

What was happening? Other servers on the same network were running fine at high speeds, why was my server starting to suck?

Server Load.

Torrentflux shows you the load of your server, right on the front page. If this gets very high it generally means the server is overloaded. What causes this? More often than not it is a sign that all the ram on the server is being used up. When your server has used up all its physical ram and starts using virtual ram, your upload and download speeds will suddenly drop. The server still has the bandwidth available to it, but it just can’t put it to use.

Each server has 150Mb or 300Mb ram and 500Mb swap space (virtual ram). When a server uses up all its physical memory, it starts to use the hard drive instead - which is very slow. The server can quickly be brought to its knees this way.

One of the main causes of a server using up all its ram is too many connections. Try to keep your total connections down to around 40 or 50. (Twice as much if you have 300Mb ram.) To do this requires setting the Max Connections and/or Max Upload Connections settings for each torrent. The number of connections you need to set each torrent at depends on how many torrents you want to run at one time. Remember to restart each torrent after you change the Max Connections or the Max Upload Connection settings of that torrent.

Torrenflux is a powerful tool, and it takes some practice to pilot it at its full potential. If you invest the time to learn how to properly tune your seedbox, you will find your ratio will skyrocket and you will enjoy it much more.

 Update:

Setting the Max Connections only works for the Bittornado or the Mainline backend clients.  If you use the Transmission client, these settings will be ignored as this client doesn’t support that feature.  Transmission will connect to as many as it can and must be controlled by Max Upload Speed and Max Download Speed settings.   There are many advantages to using Transmission however, as it has a much smaller memory footprint and is written in C++ and therefore is lean and mean compared to Bittornado or Mainline which are written in Python. 

If you have a bunch of torrents that you want to remain active and available to seed, but are not seeding constantly, Transmission is probably a good choice as it uses much less memory.  However, if you need more control you will want to use one of the other two - probably Tornado - although you need to run a lot less of them. 

Tags: Uncategorized

5 responses so far ↓

  • 1 Eric // Dec 7, 2007 at 11:40 am

    thanks for the help, i was also wondering on what should be the max upload slots

  • 2 admin // Dec 7, 2007 at 1:13 pm

    Hi Eric,

    There is no setting for “Max Upload Slots”. There is “Max Upload Rate” and “Max Upload Connections”. The latter setting could be thought of as slots I guess because an upload connection really represents one person transferring data from your server.

    Depending on how many actively seeding torrents you have, you should keep this number low enough so that your server doesn’t get so many connections as to put the Server Load over 1.0.

    The Max Connections is the total connections (up and down). So you might start off by setting Max Connections at 10 and Max Upload Connections at 4. See how that goes with all your other torrents, and adjust as needed.

    It takes a bit of experimentation, but you will get the hang of it.

  • 3 sharegorg // Dec 13, 2007 at 7:04 pm

    I have followed the directions above and am running only 4 torrents, but server load is at 2.65 and all ram is used up (even the swap), and it takes me 15+ minutes to refresh pages or do anything. 3 torrents are on tornado so that i can limit connections, because there are a lot of peers and the other one only has 7 peers w/1 connected so I have it on transmission.

    What else can I tune to get better results?

  • 4 admin // Dec 16, 2007 at 7:12 am

    sharegorg: Fixed. The old web server, Lighttpd, would leak memory so badly that it sometimes ate up to 90% of the ram on the server. These problems are no more now that we replaced Lighttpd with the high performance Nginx webserver. Each new server now comes with Nginx.

  • 5 aic // Jul 16, 2008 at 10:19 am

    These are good tips; I’ve noticed a large difference in my seeds: They’re actually seeding now.

    I am using a different host, and I’m still waiting for my SBH account… but this has proven worthy for the time being.

    Thanks for the tips!

Leave a Comment