qbittorrent / qBittorrent

qBittorrent BitTorrent client
https://www.qbittorrent.org
Other
26.16k stars 3.84k forks source link

Expose arbitrary libtorrent settings like Deluge does, to tune for high-performance connections. #7585

Open Rudolpher opened 6 years ago

Rudolpher commented 6 years ago

qBittorrent v3.4.0beta2 Since getting a gbit home connection I've been playing around with the settings qBittorrent offers, trying to optimize so it is able to use all available bandwidth with the hardware I currently have. This has proven to be impossible, and I thought this was a limitation of Libtorrent itself or the local network until I tested out Deluge with ItConfig. ItConfig exposes most Libtorrent settings allowing the user to fine-tune based on available resources in the local network and hardware. Fine-tuning this I've been able to finally use all available bandwidth, while IO and other thread usage has remained at an acceptable level when using an SSD, and I've yet to be able to find the breaking point of it. That breaking point on qBittorrent is around 50MiB/s with my current hardware, while mirroring all settings possible(As in currently exposed in qBittorrent) compared to my settings in Deluge. Deluge on the other hand manages about 150MiB/s throughput. I believe the difference is in the settings below(except for aio_threads, I stumbled across it while going through settings_pack documentation) that I'd love to see exposed in qBittorrent, as I've grown very fond of the UI.

Now I understand some or most of these settings are settings that normal users should never touch, as they probably won't help and in some cases might even cause severely reduced performance. I therefor suggest that they are added into another sub-category under advanced, which requires the user to put a check-mark in "This might cause severe problems to your local network or hardware performance. Use at your own risk"-or something to that extent.

Wishlist -

If I understand libtorrent documentation correctly this is the max amount of pieces to send when piece_state is set to fast. allowed_fast_set_size

Upper limit on amount of open files. Especially useful if usage is combined with an anti-virus program on high-connection servers: file_pool_size

Increases amount of allowed outstanding incoming connections when the socket is not waiting for a connection to be accepted. This setting is solely for high-performance connections: listen_queue_size

Reduce CPU/HDD load at the expense of more memory: cache_buffer_chunk_size You already expose cache_size and cache_expiry. Would love to see cache_size with a higher limit tho.

Reduces the CPU/thread load significantly on high throughput: recv_socket_buffer_size send_socket_buffer_size

Quicker pruning of bad peers: peer_timeout inactivity_timeout request_timeout

Might help with thread IO hitting CPU limit with encryption, unable to test as Deluge does not expose it either. In other words, based solely on looking at libtorrent settings_pack documentation: aio_threads

Thank you for this great client, and its continued free availability with full transparency.

Seeker2 commented 6 years ago

Others have looked to add advanced features here: https://github.com/qbittorrent/qBittorrent/issues/6421 https://github.com/qbittorrent/qBittorrent/pull/3235

lhw365 commented 6 years ago

according to this https://github.com/xlgjjff/libtorrent/issues/552 max_queued_disk_bytes_low_watermark max_queued_disk_bytes also matters,qbittorrent is real slow and take lots of needless resources on my 1Gbit server,there's really too few tunable options to perform well on 1Gbit and 10Gbit connections!