1

I am sitting behind an absolutely terrible router (NVG589, NVG599 is no better) mandated by my ISP, AT&T. The problem is that it has an abysmal limit of 2056 simultaneous connections. Since my connections are so limited, I want to be able to kill the connections that are the slowest. I can think of two applications where this would actually benefit me.

1) Torrenting: There are 20,000 people leeching, and I'm seeding 2056 of them. But 99% of them can only download at < 10kbs. I want to kill all those connections and only seed to people who can eat up my 1000Mbps line.

2) Tor relay: I've got 3,000,000 people who may need my relay, but 99% of them only want < 10kbps of traffic. I want to kill all those connections so that I can donate my bandwidth to high bandwidth users.

Note: in both cases my total number of connections is upper bounded at 2056. So the amount of bandwidth I can donate is upper bounded by 2056*(average bandwidth of user). Thus, I'm trying to maximize the average bandwidth usage of a user connected to me by killing low bandwidth connections. I'm not saying low bandwidth users don't deserve to download, I'm saying that my specific setup is best suited to handle high bandwidth users who otherwise have few or no alternatives.

Ideally I'm looking for a simple script (or one-liner) to find and (gracefully) kill all connections that don't use enough bandwidth (say at least 10kbps). I would expect the solution to use something like cutter.

1
  • @Hennes, no it is not. The number of connections in my client is already limited to 2056. Even if the number of connections is limited, I still have the problem that 99% of people who I'm connected to only want 10 kbps.
    – nullUser
    Commented Apr 12, 2015 at 18:07

1 Answer 1

0

You've got WAY too many connections. Unless you're on gigabit (you're not, you're on u-verse right?) you shouldn't have your bittorrent client set to any more than 400-500 connections.

Who on EARTH told you to set it any higher, and why would you? More conections don't mean 'faster', more connections means 'more overhead', which means more bandwidth needed just to keep track of the connections, so it's often slower to have more.

If you know the maximum UPLOAD speed (not download speed) of your connection, look it up on this table here, and set your client accordingly. trying to be too greedy and increase speeds by having more connections though, that's just flat out wrong.

5
  • I am on AT&T's "Gigapower" gigabit connection. In a single connection I can get about 1Gbps, but no one seeds at 1 Gbps, so I need to use more than one connection. The problem is that 99% of people seed at <1 Mbps and this is basically just wasting my time. I only want fast seeders. Kill the connections that are low bandwidth. As for the tor relay, a gigabit relay SHOULD be idling at around 65000 connections, which I could do if it weren't for the disgraceful NAT session limit.
    – nullUser
    Commented May 25, 2015 at 12:27
  • Ok, here's the thing about bittorrent then, you can't. Not easily, because it doesn't work that way. connections start off slow, because of bittorrents tit-for-tat. Clients upload in preference to clients that upload to them - basically a leaderboard. They'll feed you dribbles to encourage you to share back to them, and once you do and start moving up their preferred list, then they'll send more and more to you. Since you have connection limit issues, set hte limit low, it won't hurt it. Say 800 for torrent, 900 for tor. Make GOOD connections, not lots of weak ones. Commented May 25, 2015 at 13:39
  • I'm not looking for a way to do this through my bittorrent program, I'm looking looking for a way for e.g. my firewall to do it. The idea is simple. Whenever it sees a new bittorrent connection, wait 1 minute. After a minute, if the average amount of bandwidth through that connection is less than 1Mbps, close it. Repeat every minute. I absolutely agree that I want GOOD connections, not lots of weak ones. Since my NAT session limit is so low, in order to make use of my full gigabit connection, I need to kill the weak ones so that good ones can flourish. Think of it like artificial selection.
    – nullUser
    Commented May 25, 2015 at 15:25
  • no, you don't. You keep killing them, you won't build any 'credit' with them. Sometimes you just need to have a bit of patience. You should be able to easily use 100mbit of bandwidth with 600-700 connections. Commented May 25, 2015 at 22:25
  • I believe your objections are well intentioned, but you aren't answering my question. I want to kill low bandwidth connections. If that's a crappy idea please just tell me how to do it anyway so I can see for myself. I didn't make it clear in my question, but, due to the poor design of my mandated router, if I hit my NAT session limit, my entire LAN immediately comes to a halt. I absolutely need to kill sessions before that happens. Which sessions should I kill if not torrent connections that are nearly dormant?
    – nullUser
    Commented May 26, 2015 at 2:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .