Page 1 of 1

Recently switched and happy but speed intermittent (A:B w/ other clients common)

Posted: Sun Oct 18, 2015 7:32 am
by augmentus
Greetings,

I'm a mac-user but I believe these optimization questions are agnostic. *System/Settings questionnaire complete below*, and THANKS! This is my favorite client to data and I'm happy to report andy bugs and assist with the dev however I can. :)  I've seen vastly contradictory advice on the net regarding global max, max per torrent, upload slot, which is one reason I decided to register, as to consult the experts.

ISSUE: Not getting the same DL speeds as Transmission, and DL speeds in general jump around a lot. Upload in general is OK, though I've wanted to increase overall before leaving my old clients (Transmission, uT, Deluge). Based on advice I find on the net and my own knowledge/research, I've been playing with a few settings, but I'm not exactly sure what is helping or hindering.
Tonight I had 2 large multi-season show packs, so had plenty of time to compare, re-start, re-boot, and tweak settings.

DEVICES, ROUTER: My ISP's alleged package is 300mbps down and +/- 20mbps up, which I typically get or exceed wirelessly (R7000), but speediest.net data with apps/devices off/idle included. The devices on our home network (US-Cablle ISP to R7000 w/ 2 residents, Samsung SmartTV, Kodi box(SS), Roku (handful of extra channels/streams), and the few phones, tablets, etc.) But regardless of that, when I A:B test against transition, like tonight, I'm the only one home and all devices are idle or off. I have various ports forwarded, like for qBittorent, and also currently have UPnP enabled for the time being.

GOAL/DESIRE: Sorry for the wall of words, just hoping for some tips in the right direction re; optimization plan. I now have more settings than Mac: Transmission and uT and still learning what they all mean. I hope to determine why healthy torrents are jumping all over the place regarding speed at times, and hope to improve performance overall without hurting streaming from my other devices, ike Netflix, Amazon, Roku, the StreamSmart (on an isolated Guest Network).

FWIW: I'm mostly part of some private orgs, so need to keep disable DHT, PeX, Discovery (same settings as other A:B clients).

THANKS AGAIN!!!!

[My System & Settings]

Speedstest.net:

251.52 Mbps ( 31440 Kilobyte/sec)  80%  = 201 Mbps, 25125 KB/sec
14.42 Mbps ( 1802.5 Kilobyte/sec) ) 80%  = 11.5 Mbps = 1442 KB/sec

*Speed: Global Rate Limits:
Upload: 1150 KiB/s
Download: 20000 Kib/s

*OS&Version
Mac OS = 10.10.5 Yosemite
qBt OS = 3.2.4

*Connections

Listening port: 64444 (port forwarded, same port tested with other clients)

Upload slots: Global maximum and per torrent:
Global max  connections: 1200  (has been from  200- 1500 in Transmission. I read that keeping it lower, like 500, is actually better(?))
Max per torrent: 250  (has been 100 - 150 in Transmission w/ fast downloads)
Global max upload slots: Unchecked
Max upload slots per torrent: 9

Half-open connection value: 5 currently (have tried 20, 50, unsure if any effect)

Is uTP on or off?  ON
Rate limiting uTP?: ON, to ‘Transport Overhead’ only

*Torrent Queuing
Max active Downloads: 4
Max active Uploads: 4
Max Active Torrents: 5

Encryption on or off?: PREFER ENCRYPTION

IPv6 on or off?: OFF

Connection status? ONLINE (always)

DHT node count (on the status bar): N/A (DHT, PeX, Discovery = OFF)

Are you using a proxy or a VPN? NO

*A few Advanced settings I may have changed (and/or confused about):

Disk Write Cache: 512MB,  30 sec interval (I have 16GB Ram, SSD HD, 2.6GHz Intel i7)
Outgoing Ports: (Min): 0 (It was at 3 earlier, set back to 0)
Outgoing Ports: (Max): 0 (it was at 8 earlier, set back to 0)
Transfer List Refresh Interval: 1600ms (I may have accidentally changed this form default)
Resolve Peer Countries: ON
Maximum Half-Open Connections, 5 now (I don't understand what this even is(?))
Confirm Torrent Recheck: ON

*What type of user profile are you?

Do you seed more than download?  I seed more than download

How many tasks do you expect to run on average? 1 – 5 downloads at once would be great,  as many seeds uploading as possible (to build ratio at a few special places).

Do you use the machine for other tasks simultaneous with BitTorrent downloads: Yes, but very little is network or processor heavy afaik.

Are there other users on the LAN? 1 housemate with computer and phone (on different 2.4 GHZ band). Overall, a handful of devices like tablets, Xbox, PS3  ROKU, Samsung Smart TV (but al off during recent testing/optimizing), Android StreamSmart box, Roku private stream channels, Plex with same computer as server.

If a specific loaded task is a problem, please provide: Errors pop up sometimes and slowly rise a bit or go away. "qBt must be restarted' occasionally as well.

Seed and Peer counts in bracketed form x(n) ... The number in the bracket is possible, the number outside is actual.:
Torrent A:  Seeds 13(13)  Peers 0(1)  (jumping around from 12-15 MiB/s to as low as 2-5)
Torrent B: Seeds 36(46)  Peers 14(9) (" " ")

Again, thanks for any insight you may provide and I will keep an eye out for any issues I discover and report here.

Kind Regards

Re: Recently switched and happy but speed intermittent (A:B w/ other clients common)

Posted: Sun Oct 18, 2015 10:28 pm
by Switeck
"Encryption on or off?: PREFER ENCRYPTION"
"Maximum Half-Open Connections, 5 now (I don't understand what this even is(?))"

Half-open connections are outgoing connection attempts to potential peers, once the destination peer/ip responds with a reply packet, the connection is 2-way fully connected and not half-open. It's like calling a number on a phone...while it's ringing, it's half-open.
Making lots of half-open connections at once costs a little upload speed, and it may not help if many peers connect at once as then it costs download speed as well with the full handshake -- which is multiplied further if it's an encrypted handshake.
Half-open connections don't count incoming connections to you or already existing connections...but half-open connections may count against the global max connections and per-torrent max connections, so too many is not good for that reason as well.

"Are there other users on the LAN? 1 housemate with computer and phone (on different 2.4 GHZ band)."

If you're using wireless, it's not as good to have 100's of connections at once due to interference/lost packets. Hard-wired connections can get away with 500+ connections, even though it's not optimal for them as well.
Helps to also schedule much/most of your heavy downloading/uploading around your housemate so nobody have to suffer terrible internet lag. :)

"*Torrent Queuing
Max active Downloads: 4
Max active Uploads: 4
Max Active Torrents: 5"
"How many tasks do you expect to run on average? 1 – 5 downloads at once would be great,  as many seeds uploading as possible (to build ratio at a few special places)."

You can probably get away with more active torrents at once (maybe 20) with such a fast line and more seeding torrents (maybe 15-18) as well. On private trackers an active seeding torrent might only have 1-2 peers anyway and they won't be downloading quickly from you because they'll probably be downloading from 50+ other seeds at the same time.

Private tracker torrents can have crazy speed results because it's like a fight to see how many people can fit in a closet/phone booth at once. BitTorrent wasn't designed for knife-fighting over who can upload the most on the same torrent, only that the torrent should completely download. Extra rules on a tracker can make things even crazier.

"Global max  connections: 1200  (has been from  200- 1500 in Transmission. I read that keeping it lower, like 500, is actually better(?))
Max per torrent: 250  (has been 100 - 150 in Transmission w/ fast downloads)
Global max upload slots: Unchecked
Max upload slots per torrent: 9"

It helps to think about how other peers and seeds would see your connection in a torrent. If for instance you allow 9 upload slots per torrent and 100 connections per torrent, on a very busy torrent you might connect to 90 peers+10 seeds but will never upload to more than 9 peers at a time. So most will see you sharing nothing for the majority of the time. Increasing the connections per torrent just makes that worse. Ironically, it can mean the really fast peers will share less back to you...reducing download speed. With no global max upload slots limit, if you have too many busy torrents running at once...you'll be uploading relatively slowly to peers on each torrent.

>20 connections per torrent is overkill while only seeding.
>50 connections per torrent is probably overkill while downloading from private trackers that tend to have fast seeds.
Sadly, you can only set that 1 way...based on what you're doing at the time.

"FWIW: I'm mostly part of some private orgs, so need to keep disable DHT, PeX, Discovery (same settings as other A:B clients)."

Private-flagged torrents automatically disable DHT, PeX, LPD ...so you won't need to disable them globally unless you just want to. They might still help on public torrents. PeX helps the most so long as the torrent has working trackers.

"Disk Write Cache: 512MB,  30 sec interval (I have 16GB Ram, SSD HD, 2.6GHz Intel i7)"

That cache setting should work fine for your computer+connection. But if you're downloading to a solid-state drive (SSD), make sure you're not using sparse files as it's VERY hard on SSDs:
index.php/topic,2627.msg12725.html#msg12725

Re: Recently switched and happy but speed intermittent (A:B w/ other clients common)

Posted: Tue Oct 20, 2015 3:34 am
by augmentus
Thanks for the help Switeck! That has definitely assisted me in tweaking things. I just grabbed 3 torrents from what is essentially a public tracker though one must be invited. These seeds are always quite fast in Transmission and I'm having trouble breaking through the 2 MB/sec wall. I experimented with the "Connection Limits" a bit, and am currently at 1250/30.

May I ask if any of the settings in this pic look strange? http://imgur.com/cpfHXiu I may have accidentally changed a few over the weekend. I appreciate the SSD advice and shut that off. Changes I make to 'outgoing ports' and 'half connections' don't seem to have much effect at all.

I'm thinking about actually leaving the Netgear firmware, as perhaps that is an issue. I'm essentially running 4 networks, though the 2.4G and 5G "Guest' only have 1 or 2 devices each and here and there the router seems to be getting clogged up. But as I said, I've tested several times back and forth with Transmission and it's still winning. For other reasons (buggy behavior changing drives, folders and file renames) is why I'm leaving Transmission, plus I like the open-source spirit and increased settings/controls with qBittorrent. :)

Thanks again! 2M/sec isn't so bad for the 1-2GB content most common in my world.

EDIT: For clarity, Tranmission jumped to this and over in like 10 seconds: http://imgur.com/wG0QtjU and then I checked with qB, and while it did get to around 10 at one point, it wasn't until a minute or so. (and mimicked the settings exactly from Transmission) Weird.. I wish I could crack open Transmission and see wtf is going on, or had the capture/debug skills that some of you do to check. :)

To be fair, it behaves like that much more consistently with a single torrent and gets a bit choked up when multiple, tends to devote all resources to one at a time, more or less.

Re: Recently switched and happy but speed intermittent (A:B w/ other clients common)

Posted: Tue Oct 20, 2015 1:32 pm
by Switeck
It's ok to seed torrents from the SSD, as that doesn't hammer it with 16-64 KB writes -- just lots of reads. But that's only worthwhile for the busiest seeding torrents, as SSD space can still be considered precious/expensive.

I suggest lowering global max connections down to 300. Your router's routing table might not even ALLOW 1000+ connections at once! It will definitely slow down at 1000+ connections even if it does allow them.

In advanced settings...
Raise the disk cache expiry interval from 30 seconds to 600 seconds (10 minutes). No use throwing away cached data every 30 seconds.
Set Outgoing ports Min and Max back to 0. I'm pretty sure those are port numbers not how many outgoing ports are allowed at once, and using port numbers below 1000 can be problematic.
Half-open connections at 20 will only help the first couple minutes when starting very busy torrents or after starting qBitTorrent, that's why you probably don't notice much effect.
Disable resolve peer countries (GeoIP) -- that makes additional connections to determine what the country is of connected peers/seeds. Hard on the router, nothing but eye-candy, and possibly incorrect to boot!

The other advanced settings seem ok.

Transmission actually has bad upload slot handling -- hard-coded to 14 per torrent. That's fine for people with >2 mbit/sec upload that only run a couple torrents at once, but awful for everyone else. Downloading-wise it might be ok for your connection as 14 upload slots isn't overkill. Transmission is open source too.

Test public torrent download speeds while you have connections per torrent set to 50. It might be higher than 2 MB/sec, depending on the quality of the seeds/peers on the torrent.

Re: Recently switched and happy but speed intermittent (A:B w/ other clients common)

Posted: Mon Oct 26, 2015 5:14 am
by augmentus
Thanks again, friend! With your advice and other web-research, I've been able to get speeds near Transmission and understand how to tweak/play to adjust.

To make a new download scream, I set global max connections near 300 and per torrent near 30. I've been able to exceed 10/15/20 meg/s for the smaller TV stuff and have it complete in a few minutes.

Other tweaks too but honestly, switching my R7000 to Kong has seemed to help immensely(!) I stuck to the last stable 2014, ignoring the wifi driver stuff, and it's been great.

I will keep playing and update this thread, but keeping the GLOBAL MAX lowish for Wifi (300ish) and max per torrent low (20-50-ish, I'm at 30) seems to be the way to go for me, with my TWC 300mbps service with the R7000.

Thanks again! Everything else on this thread, has helped a great deal and I advise anyone else with issues to follow Switch's suggestions as a start-point and then see what happens, with some patience (5-10 minutes per change:apply)

Thanks again!!

Re: Recently switched and happy but speed intermittent (A:B w/ other clients common)

Posted: Mon Oct 26, 2015 3:52 pm
by Switeck
[quote="augmentus"]I will keep playing and update this thread, but keeping the GLOBAL MAX lowish for Wifi (300ish) and max per torrent low (20-50-ish, I'm at 30) seems to be the way to go for me, with my TWC 300mbps service with the R7000.[/quote]How close to 300 connections are you ever reaching? And is that with 20+ active torrents at once?

Re: Recently switched and happy but speed intermittent (A:B w/ other clients common)

Posted: Tue Oct 27, 2015 4:07 am
by augmentus
[quote="Switeck"]
[quote="augmentus"]I will keep playing and update this thread, but keeping the GLOBAL MAX lowish for Wifi (300ish) and max per torrent low (20-50-ish, I'm at 30) seems to be the way to go for me, with my TWC 300mbps service with the R7000.[/quote]How close to 300 connections are you ever reaching? And is that with 20+ active torrents at once?
[/quote]

Pardon my ignorance, but how might I determine this? I know that when I play around with max active and max connections, the seeds always jump to the new value quickly. For instance, I just played with 4 active downloads with 400 max connections and 100 max per torrent, and the seeds all shot up to 100 each quickly. Not great perf though.

It's seems keeping at 2-3 downloads at once is best for me. limiting to 1 is when I get the fastest speeds.

Thanks again!

Re: Recently switched and happy but speed intermittent (A:B w/ other clients common)

Posted: Tue Oct 27, 2015 2:18 pm
by ciaobaby
but how might I determine this?
View -> Statistics

Re: Recently switched and happy but speed intermittent (A:B w/ other clients common)

Posted: Fri Nov 06, 2015 6:24 am
by augmentus
Thanks,

Yes, I can get 300, 500, 600 connections wirelessly with the R7000 (dd-wrt kong) and OSX Yosemite :)

Re: Recently switched and happy but speed intermittent (A:B w/ other clients common)

Posted: Sat Nov 07, 2015 11:57 am
by Switeck
Good, your router can handle that many connections at once.

Allowing 2-5 downloading torrents at once can reduce the odds of 1 downloading really slow and delaying the rest.
That's also why I recommend 20 seeding (uploading) torrents at once -- many will only have 1 peer (likely be overloaded by other seeds).

The goal with the settings I suggest is minimal user actions to keep torrents going smoothly.