Author Topic: Connections limits  (Read 1244 times)

lokito50

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Connections limits
« on: January 09, 2018, 06:05:18 AM »
Hi all,
I'm new here and would like some guidance as to how to configure my connection limits in options. I have a 60MBps DL/10 MBps UL cable connection and have about 175 torrents seeding to a private tracker. I'd like to maximize the use of my line so any tips would be appreciated.
Cheers
« Last Edit: January 09, 2018, 06:12:00 AM by lokito50 »

Switeck

  • Forum addict
  • ****
  • Posts: 1379
  • Karma: +89/-0
    • View Profile
Re: Connections limits
« Reply #1 on: January 09, 2018, 06:17:39 AM »
While ONLY seeding, set connections per torrent really low, like 5-10. Most won't have more than 2 peers anyway on private trackers. And even if they do, not for long!

60 MEGABYTES/SECOND DL or 60 megabits/second download? (These are almost a magnitude apart in value.)
(same for the 10 MBps UL)

lokito50

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: Connections limits
« Reply #2 on: January 09, 2018, 04:40:50 PM »
Megabits haha

Switeck

  • Forum addict
  • ****
  • Posts: 1379
  • Karma: +89/-0
    • View Profile
Re: Connections limits
« Reply #3 on: January 10, 2018, 08:51:39 PM »
Then the 10 megabits/second upload bandwidth is the big limiting factor.
Raw speed, that's 1.25 MEGABYTES/SECOND. TCP/IP networking and BitTorrent protocol overheads can reduce that to closer to 1 MEGABYTE/SECOND...or about 1000 KiloBYTES/second upload max in qBitTorrent.
Depending on how stable the connection is and how much over-provisioning your ISP does as well as contention ratio (and they're extremely unlikely to tell you how much they do of either) can change how closely you can get to the speed limits before everything downloading or uploading bursts close to max and then falls almost to 0.

The upload speed has to be split between all active torrents and every active upload slot on those torrents, but if it's too slow from each downloading peer's point of view they will auto-snub or ban your ip address.
Beyond that, best performance seems to be with average upload speed PER upload slot is at least 5 KB/sec or as high as 100 KB/sec on private trackers.
1000 KB/sec split into 100 KB/sec upload slots would give only 10 global max upload slots...so that's almost certainly too few.

Try 50-100 global max upload slots. Average speed each could get if all active would be 10-20 KB/sec. Your connection will look a little faster than a 56k dial-up modem to them that way.
Each active torrent needs at least 2 upload slots to run correctly, so that also puts an upper limit on max torrents that can be uploading at once.
That means 25-50 max active torrents at once. (That doesn't have to count seeding torrents that are started but have no connected peers!)

You won't want a torrent or 2 "hogging" all the upload slots or connections, especially while seeding...so limits on them might work best if set to:
10-50 max connections per torrent (10 while only seeding, 50 while downloading...still enough to flood out your connection considering how many private tracker seeds are fast fiber lines)
3-10 max upload slots per torrent

If torrent queueing even works (there's been bugs reported with it), set max active torrents to slightly more than all the torrents you expect to be running at one time or enable don't count slow torrents.
For downloading torrents, you might want to limit qBT to downloading only 2-10 torrents at a time.
Or just disable torrent queueing altogether.

In advanced settings, I recommend setting max half open connections no higher than 20 at once. On private trackers, most peers+seeds aren't firewalled so at 20 half open qBT could try to connect outgoing to 100's or even 1000+ ips per minute. New incoming connections and already established peer/seed connections do not count against the half open limit, so higher is NOT better!

Depending on what drive/s your torrents are on, you may need to give qBT a large ram cache. A slow HDD cannot keep up with the speed of your connection, because it has to read from possibly 100+ different files at once. I strongly recommend using preallocate files to vastly reduce fragmented downloads and defragging HDDs can help the DL/UL speeds a little bit. SSDs see massive write amplification from downloading torrents using qBT, but seeding copied torrents from SSDs works great.
qBT 32bit versions WILL CRASH if the cache is set larger than ~1000 MB!
Both qBT 32bit and 64bit versions can and probably will use about 30% more ram than the max cache size you set.
Cache duration might as well be 600 seconds, (max allowed) otherwise the value of loading stuff into the cache isn't as useful.

lokito50

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: Connections limits
« Reply #4 on: January 11, 2018, 05:46:35 AM »
Then the 10 megabits/second upload bandwidth is the big limiting factor.
Raw speed, that's 1.25 MEGABYTES/SECOND. TCP/IP networking and BitTorrent protocol overheads can ....
Oh wow that was lengthy. Thank you so much. Here are my settings so far.
Under advanced I have Max # of half-open connections set to 20. Disk cache set to 1024MiB and the expiry interval set to 600s. I also check marked the pre-allocate disk space for all files. Anything else you can think of? What do you think about these settings?

Switeck

  • Forum addict
  • ****
  • Posts: 1379
  • Karma: +89/-0
    • View Profile
Re: Connections limits
« Reply #5 on: January 11, 2018, 07:33:27 AM »
While seeding, those settings should work great.
You may want to bump max connections per torrent up to 50 for whenever you want to download a torrent in a real hurry.

lokito50

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: Connections limits
« Reply #6 on: April 11, 2019, 03:01:26 AM »
Hi all, just to revisit. I had to reformat my pc and lost my settings. If I want to seed to my max upload how should I set everything up?
My ISP connection is now 150Mbps down and 15Mbps up. I was seeding up to 1200 B/s combined between a few torrents prior to re-formatting.
Cheers,

Switeck

  • Forum addict
  • ****
  • Posts: 1379
  • Karma: +89/-0
    • View Profile
Re: Connections limits
« Reply #7 on: April 12, 2019, 01:45:06 PM »
A linear increase in settings from 10 mbits/sec UL to 15 mbits/sec UL would be a 50% increase, but many BitTorrent settings don't scale or only scale minimally.

Upload is still the limiting factor, although fortunately you probably meant 1200 KB/s not 1200 B/s.
So 1200 KiloBYTES/second upload max in qBitTorrent.

1200 KB/sec split into 10-20 KB/sec average speed upload slots would be 60-120 global max upload slots.
Even with each torrent using a bare minimum of 2 upload slots each and 120 global max upload slots, you'd still be limited to 60 max active torrents at once.
A much more reasonable number of active torrents at once would be closer to 10-30.

I don't really recommend using torrent queuing in qBT because it was pretty messed up and doesn't work correctly last I tried it. (but that's been awhile, like v3.1.0 or something ancient.)
But you can still limit your torrents by not starting too many at once unless you're certain that very few will have active peers and/or seeds on them.

You won't want a torrent or 2 "hogging" all the upload slots or connections, so set the max connections per torrent to maybe 1/10th global max connections and set max upload slots per torrent to no more than 50-80% max connections per torrent OR 1/10th global max upload slots (whichever is lower).
May want more connections per torrent while downloading, but probably not more than double the 1/10th global max connections.

In advanced settings, I recommend setting max half open connections to 10 or no higher than 20 at once.

A slow HDD is even less likely to keep up with the faster speed of your connection. I strongly recommend using preallocate files to vastly reduce fragmented downloads and defragging HDDs can help the DL/UL speeds a little bit. SSDs see massive write amplification from downloading torrents using qBT, but seeding copied torrents from SSDs works great.

Disk cache set to 1024MiB and the expiry interval set to 600s...because of qBT limits.

lokito50

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: Connections limits
« Reply #8 on: April 12, 2019, 10:22:05 PM »
A linear increase in settings from 10 mbits/sec UL to 15 mbits/sec UL would be a 50% increase, but many BitTorrent settings don't scale or only scale minimally.

Upload is still the limiting factor, although fortunately you probably meant 1200 KB/s not 1200 B/s.
So 1200 KiloBYTES/second upload max in qBitTorrent.

1200 KB/sec split into 10-20 KB/sec average speed upload slots would be 60-120 global max upload slots.
Even with each torrent using a bare minimum of 2 upload slots each and 120 global max upload slots, you'd still be limited to 60 max active torrents at once.
A much more reasonable number of active torrents at once would be closer to 10-30.

I don't really recommend using torrent queuing in qBT because it was pretty messed up and doesn't work correctly last I tried it. (but that's been awhile, like v3.1.0 or something ancient.)
But you can still limit your torrents by not starting too many at once unless you're certain that very few will have active peers and/or seeds on them.

You won't want a torrent or 2 "hogging" all the upload slots or connections, so set the max connections per torrent to maybe 1/10th global max connections and set max upload slots per torrent to no more than 50-80% max connections per torrent OR 1/10th global max upload slots (whichever is lower).
May want more connections per torrent while downloading, but probably not more than double the 1/10th global max connections.

In advanced settings, I recommend setting max half open connections to 10 or no higher than 20 at once.

A slow HDD is even less likely to keep up with the faster speed of your connection. I strongly recommend using preallocate files to vastly reduce fragmented downloads and defragging HDDs can help the DL/UL speeds a little bit. SSDs see massive write amplification from downloading torrents using qBT, but seeding copied torrents from SSDs works great.

Disk cache set to 1024MiB and the expiry interval set to 600s...because of qBT limits.
Thank you for reaching out again. I meant 1000-1200 KiB/s sorry. Here are my settings as I still get a little confused understanding each one. What do you think?

Global max number of connections         500
Max number of connections per torrent  50
Global max number of upload slots        120
Max number of upload slots per torrent  10



Before I reinstalled, I always had a few active torrents seeding up using my shitty upload speed. But I forgot my settings and now it seems hard to get a few going for my ratio.
Let me know if I should change anything else. I made the other changes under advanced so that's done.
Cheers,

Robertomcat

  • Member
  • **
  • Posts: 41
  • Karma: +0/-0
    • View Profile
Re: Connections limits
« Reply #9 on: April 13, 2019, 11:05:42 AM »
I strongly recommend using preallocate files to vastly reduce fragmented downloads and defragging HDDs can help the DL/UL speeds a little bit. SSDs see massive write amplification from downloading torrents using qBT, but seeding copied torrents from SSDs works great.

Hello good day!

I understand that pre-assignment is not the solution for defragmenting files. It is best to use a temporary folder (if possible on another disk), and fragmentation is eliminated when Qbt moves the file from the temporary folder to the final destination folder.

Switeck

  • Forum addict
  • ****
  • Posts: 1379
  • Karma: +89/-0
    • View Profile
Re: Connections limits
« Reply #10 on: April 14, 2019, 01:26:32 PM »
Before I reinstalled, I always had a few active torrents seeding up using my shitty upload speed. But I forgot my settings and now it seems hard to get a few going for my ratio.
Let me know if I should change anything else. I made the other changes under advanced so that's done.
The problem may well be simply a lack of connected peers on torrents. Settings changes in qBT likely cannot fix that.

Other stuff I recommend disabling...
UPnP/NAT-PMP under Connection (it's above your global max connection settings).
Local Peer Discovery under BitTorrent (it tries to find Peers/Seeds on the same LAN as you using broadcast/multicast packets that can really hose networking)
Torrent Queueing also under BitTorrent (so buggy it's sad...you'll need to manually start/stop torrents)

In qBT's advanced settings:
Resolve peer host names (DNS lookups can be brutal, especially on qBT startup)
Resolve peer countries (GeoIP)  (same reason, and also does a flag lookup)
Download tracker favicon (there was even a remote exploit in the wild for this one!)
uTP-TCP mixed mode algo. best set to Prefer TCP.
I strongly recommend using preallocate files to vastly reduce fragmented downloads and defragging HDDs can help the DL/UL speeds a little bit. SSDs see massive write amplification from downloading torrents using qBT, but seeding copied torrents from SSDs works great.
I understand that pre-assignment is not the solution for defragmenting files. It is best to use a temporary folder (if possible on another disk), and fragmentation is eliminated when Qbt moves the file from the temporary folder to the final destination folder.
Pre-assignment on HDDs works decently well with the latest versions of libtorrent. qBitTorrent v4.1.5 isn't using the latest -- it was released almost 5 months ago.
qBT's main problem with pre-allocating/pre-assignment on HDDs wasn't fragmentation -- the problem was it ZERO-filled every byte instead of fast allocating. Start a multi-GB torrent with pre-allocate enabled and other reads/writes of torrents nearly ground to a halt while qBT writes out a few billion bytes of 0's in a row.

Robertomcat

  • Member
  • **
  • Posts: 41
  • Karma: +0/-0
    • View Profile
Re: Connections limits
« Reply #11 on: April 14, 2019, 02:04:42 PM »
Before I reinstalled, I always had a few active torrents seeding up using my shitty upload speed. But I forgot my settings and now it seems hard to get a few going for my ratio.
Let me know if I should change anything else. I made the other changes under advanced so that's done.
The problem may well be simply a lack of connected peers on torrents. Settings changes in qBT likely cannot fix that.

Other stuff I recommend disabling...
UPnP/NAT-PMP under Connection (it's above your global max connection settings).
Local Peer Discovery under BitTorrent (it tries to find Peers/Seeds on the same LAN as you using broadcast/multicast packets that can really hose networking)
Torrent Queueing also under BitTorrent (so buggy it's sad...you'll need to manually start/stop torrents)

In qBT's advanced settings:
Resolve peer host names (DNS lookups can be brutal, especially on qBT startup)
Resolve peer countries (GeoIP)  (same reason, and also does a flag lookup)
Download tracker favicon (there was even a remote exploit in the wild for this one!)
uTP-TCP mixed mode algo. best set to Prefer TCP.
I strongly recommend using preallocate files to vastly reduce fragmented downloads and defragging HDDs can help the DL/UL speeds a little bit. SSDs see massive write amplification from downloading torrents using qBT, but seeding copied torrents from SSDs works great.
I understand that pre-assignment is not the solution for defragmenting files. It is best to use a temporary folder (if possible on another disk), and fragmentation is eliminated when Qbt moves the file from the temporary folder to the final destination folder.
Pre-assignment on HDDs works decently well with the latest versions of libtorrent. qBitTorrent v4.1.5 isn't using the latest -- it was released almost 5 months ago.
qBT's main problem with pre-allocating/pre-assignment on HDDs wasn't fragmentation -- the problem was it ZERO-filled every byte instead of fast allocating. Start a multi-GB torrent with pre-allocate enabled and other reads/writes of torrents nearly ground to a halt while qBT writes out a few billion bytes of 0's in a row.

Thanks, I've also taken note of the geo-ip resolution and the favicon, it was the only thing I did not have disabled. I only use private trackers, and I think it does not matter much.

As for the pre-assignment, I only see utility in the case that you have a disk almost full, and serve to warn you that there is no space, it is not a way to defragment

Switeck

  • Forum addict
  • ****
  • Posts: 1379
  • Karma: +89/-0
    • View Profile
Re: Connections limits
« Reply #12 on: April 14, 2019, 10:59:52 PM »
If you only use private trackers definitely disable DHT.
PEX you can leave enabled because it won't do any harm if private tracker torrents are properly marked as private torrents.

Robertomcat

  • Member
  • **
  • Posts: 41
  • Karma: +0/-0
    • View Profile
Re: Connections limits
« Reply #13 on: April 15, 2019, 10:38:49 AM »
Yes, everything is disabled. Thanks