Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "connection_speed" libtorrent option to advanced options. #6973

Closed
mhertz opened this issue Jun 18, 2017 · 11 comments · Fixed by #14976
Closed

Add "connection_speed" libtorrent option to advanced options. #6973

mhertz opened this issue Jun 18, 2017 · 11 comments · Fixed by #14976

Comments

@mhertz
Copy link

mhertz commented Jun 18, 2017

As the title says, most other torrent clients supports this i.e. setting connections per second, but qbt just hardcodes "20" in the source.

@Seeker2
Copy link

Seeker2 commented Jun 18, 2017

That controls outgoing connection attempts, but does not count incoming connection rate which isn't controllable beyond blocking qBitTorrent's listening port.

The default value of 20 is too high for the average internet connection (ADSL2 around 5-15 mbit/sec DL and 0.5-1 mbit/sec UL).

From what I can tell, qBitTorrent doesn't even use the max allowed connection_speed and is very slow to restart torrents when launching the app or manually starting/adding torrents.

@mhertz
Copy link
Author

mhertz commented Jun 18, 2017

I know what the option is for :) Deluge and other clients supports changing this, and so I requested same functionality from qbt, since connections/performance differ. The default in qbt and deluge is 20. In libtorrent it's 10, and when using the libtorrent high-performance-seed preset in deluge from the ltconfig plugin, then the setting is raised to 500. I personally want it raised over 20 and have a home-cable 150 Mbit. In europe where i'm from, 50Mbit or higher is the norm I believe. On healthy torrents, raising this, in addition to allowed connections, makes my connection max-out faster than without.

@Seeker2
Copy link

Seeker2 commented Jun 18, 2017

People reading this may not know the implications of changing this value.

You have 150 megabits/second upload?! (I only have ~10 mbit/sec UL)
Yeah, I can see why connection_speed set to 20 isn't enough.

After less than 5 minutes, any value above about 5 just means retrying peers/seeds that are dead, firewalled, or already at connection max. The benefits for this on for big and very busy torrents are generally negative. :(

Deluge's plugin for high-performance-seed preset is nuts -- really Denial-of-Service attack level. NOT to be emulated:
http://forum.deluge-torrent.org/viewtopic.php?f=7&t=54560&start=20#p226658
"In my tests, the options of high-performance-seed didn't help the downloading-time for me, and all those extra libtorrent connections takes bandwith away from you too" (poster's name looks familiar somehow...)

reply to that said: "When Deluge is downloading it takes away all my bandwidth so i'm unable to browse properly."

I'm in favor of adding the option in qBitTorrent, but strongly recommend against the levels the high-performance-seed preset uses.

@mhertz
Copy link
Author

mhertz commented Jun 18, 2017

Sorry, I have 30Mbit up. I wasen't implying I needed this setting for my setup, but just meant that it was higher than your quoted norms. It seems you know more about this than me and I thank you for your replies. Yes, that was me in the deluge forum too :) As you know, it's very hard to compare something on the torrent network, because not one run is the same. I initially just looked at the download rate, but stupidly thought to myself that how could a maxed-out connection possibly improve, and so I believe that the speed in which the maxed-out speed is obtained, is better with using options from the high-performance preset, though I fully agree that it's crazy values, lol. Anyway, I just simply wanted the option to play with and have the option to change at will, and didn't like deluge having an advantage here(with this option) over qbt which I just changed back too today.

@Seeker2
Copy link

Seeker2 commented Jun 19, 2017

It's not an advantage for Deluge to overload someone's connection.

I've done extensive testing of bt.connect_speed and net.max_halfopen settings in uTorrent. High numbers on each are extremely overrated so long as you can accept incoming connections.
bt.connect_speed could be set to 1 and still be limited sometimes with net.max_halfopen set to 8, especially on public torrents with many firewalled and disconnected peers.
uTP (being UDP based) isn't technically limited by half open issues (that TCP connections have) unless a BT client is programmed to limit uTP connection rates to match regular (TCP-using non-uTP) peer/seed connections.

qBT's default limit of 20 for connect speed could reach 70+k in 1 hour...were there no other limitations.

qBT doesn't operate anywhere near that hard-coded speed limit. I can stop and restart a torrent and it won't even retry ips or do tracker updates for minutes at a time. Makes peer-seed connection testing difficult and slow...and that's when I know the connections WORK!
On a busy large torrent I am seeding on multiple computers and 2 internet connections, uTorrent connects to 20+ peers...qBT struggles to connect to 5. There's probably not enough peers+seeds for the other peers to max out their connections. (maybe 2-20 seeds and 25-50 peers) I can swap computers and/or internet connections and qBT still takes longer and connects to fewer peers. uTorrent has bt.connect_speed set to 1 and net.max_halfopen set to 8...and it's running 50+ other torrents as well.

@mhertz
Copy link
Author

mhertz commented Jun 19, 2017

Thanks for your insights again Seeker2, I appreciate it. Anyway, for me, the bottom-line is that as deluge and uttorrent supports it, then I would like qbt to support it too. Having it adjustable means also to be able to set it lower ;)

Personally, i can't accept incoming connections because using a socks5 proxy, though can of course still upload through outgoing connections. I am just interested in maxing my speed out fastest, so faster downloading-time in total. It's not for anything practical as my downloads usually takes under 5 - 10 mins, but just like having every software as optimized for the job as possible.

Tracker update time can be changed too from libtorrent, but no matter if setting that lower than the default 10 or 30 min's(can't remember), then the tracker itself enforces a minimum re-announce time. There's also a libtorrent option I would too like added: "tracker_backoff", which defines how frequent to retry failing trackers, as in multi-tracker torrents. The default is 5'ish minutes but I like setting it lower as some trackers are overloaded and only works second or third announce. That's what I love about deluge; the ltconfig plugin exposes every libtorrent setting, instead of just relying on a "dumbed-down" GUI.

Btw, i've read alot of libtorrent mailing-list comments from the author arvid, and when someone states a request, then he always am hesitant if it can be used for ddos'ing or overloading trackers and such. If a client makes many connections, then they are just dropped at the other end if not available I believe and others just risk getting there slots taken faster by the more aggresive clients. Though again, i'm no expert and trust you know more about this than me.

@DreadWingKnight
Copy link

"The default is 5'ish minutes but I like setting it lower as some trackers are overloaded and only works second or third announce."

So your solution to an overloaded tracker is to make things worse?

@mhertz
Copy link
Author

mhertz commented Jul 14, 2017

Yes, egotistically to help me connect to the tracker and not to help the tracker in questions connection issues.

There's other options I like too, e.g. raising:

// torrent_connect_boost is the number of peers to try to connect
// to immediately when the first tracker response is received for a
// torrent. This is a boost to given to new torrents to accelerate
// them starting up. The normal connect scheduler is run once every
// second, this allows peers to be connected immediately instead of
// waiting for the session tick to trigger connections.
torrent_connect_boost,

Anyway, i'm back on deluge for now, as I can control all I want libtorrent-related(through plugin) + the command-line client supports actually controlling the client from the command-line(instead of webui/api)

@DreadWingKnight
Copy link

Helping YOU connect prevents others from connecting not only to the tracker but to you, so in effect, you're slowing your own connection down by trying to be so self-centered.

@mhertz
Copy link
Author

mhertz commented Jul 14, 2017

Firstly, i'm sorry to come off as a complete jerk, and honestly, in real life, i'm the exact opposite :) I'll take your comments into consideration.

(I just saw it, as e.g. if visiting a website, and it's overloaded so times-out, how many drops going to said site because it's overloaded, and not just reloads a couple of times - Also, knowing arvid's mindset, i'm pretty sure the option in question has some logic upon how much/often it can/is being used - and if not, the reasoning likely is that the tracker would just ban your IP anyway. The option in question was added after requests of where racing failed in libtorrent-clients where there where an initial tracker error, because the tracker weren't updated fast enough, and e.g. very conservative non-aggressive clients like rtorrent didn't have this problem since tried to reconnect every 5 secs, but just for some times of course)

@FranciscoPombal FranciscoPombal changed the title [Wishlist] Add "connection_speed" libtorrent option to advanced options. Add "connection_speed" libtorrent option to advanced options. Feb 21, 2020
@harrv
Copy link

harrv commented Jan 4, 2021

Related to this issue, I'd like to be able to set any of the libtorrent options, not just the small handful of libtorrent options exposed in the qBittorrent advanced options UI. I'm not saying they all should be exposed in the UI, but if there were a config file a power user could manually edit to set any of the libtorrent options listed here but not already exposed, that would be great.

I believe uTorrent has had a mechanism to allow this very thing for quite a while already, and it seems qBittorrent has done an admirable job of maintaining feature parity with uTorrent, in case that argument for doing it carries any weight.

Edit: Re-reading the earlier replies on this issue, it would seem some qBittorrent devs may have a problem with this level of customization because some libtorrent settings could possibly be used in ways that would make qBittorrent appear to not be a team player. I would suggest that there are many reasons to change hidden libtorrent settings, and would not assume that a user wants to do it to game the system. But one idea to at least help maintain the good reputation of qBittorent would be to change the user-agent string (which, ironically, is something that can be set with the "user_agent" libtorrent setting) if qBittorrent knows that extra libtorrent settings have been set. Perhaps appending "user-customized" to the user-agent value in that case, or forcing the user to set a unique value for user_agent that does not contain "qb" would help with any perceived reputation problem in allowing any libtorrent setting to be changed. Just a thought.

Chocobo1 added a commit to Chocobo1/qBittorrent that referenced this issue May 21, 2021
Now we follow libtorrent current default value 30.
Closes qbittorrent#6973.

Also bump WebAPI version.
@qbittorrent qbittorrent locked as resolved and limited conversation to collaborators May 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants