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

Low/unstable speeds #8430

Closed
1265578519 opened this issue Feb 16, 2018 · 17 comments
Closed

Low/unstable speeds #8430

1265578519 opened this issue Feb 16, 2018 · 17 comments

Comments

@1265578519
Copy link

1265578519 commented Feb 16, 2018

它只能在内网中获取很好的速度,在外网中,宽带为1Gbps,传输速率只有160KB/S,跨越了国家的BT资源做种上传访问,如何提高send Socket到32768K以便提高外网跨国跨网的上传速度
设置中没找到此设置
3
如果使用的是ftp,他的速度是大大提高,所以我判定是Socket问题
4

@1265578519
Copy link
Author

说不定可能也是downsocket限制?

@FranciscoPombal
Copy link
Member

@1265578519
English please.

@1265578519
Copy link
Author

@FranciscoPombal
What is the size of the Socket cache, how to modify it to improve the cross-network speed of the Internet, he is very slow.
It can only get very good speed in the intranet. In the extranet, the broadband is 1Gbps, the transmission rate is only 160KB / S, which crosses the national BT resources to do the kind of upload and access. How to improve send Socket to 32768K in order to improve the extranet transnationality Across the network upload speed
Settings can not find this setting
Maybe it is downsocket restrictions?

@FranciscoPombal
Copy link
Member

@1265578519 Is your speed issue with upload, download, or both?

@1265578519
Copy link
Author

@FranciscoPombal Different servers use torrent to copy each other.
One side server to upload and server to download

@1265578519
Copy link
Author

@FranciscoPombal Server cluster no more than 10, so do not consider the P2P connection load.
Only need to improve broadband utilization.

@FranciscoPombal
Copy link
Member

@1265578519
Try changing the options marked with 🔴 to the values provided in the picture.
If this does not help, try increasing both the Send buffer watermark and Send buffer low watermark to higher values until you get satisfactory performance.

If both these suggestions do not work, report back.

screenshot_2018-02-19_22-34-48

@FranciscoPombal
Copy link
Member

@1265578519
Relevant forum threads:

Relevant libtorrent documentation sections:

@1265578519
Copy link
Author

1265578519 commented Dec 1, 2018

Thank you, I used a few months of 30000K and 2000K 400%, his effect is very good
4

@1265578519
Copy link
Author

1265578519 commented Dec 2, 2018

Is there any setting for qbit down buffer watermark? Only Send mode is visible in the setting.
There is no problem uploading to other BitComet clients.
2
1

@FranciscoPombal
Copy link
Member

@1265578519
I am not sure. From my experience, all of these buffer watermark settings don't have clear guidelines for what values they should be set to, depending on your system characteristics.
That being said, this might be worth a read: https://libtorrent.org/single-page-ref.html#send_buffer_low_watermark

However, there is another issue, that potentially affects a lot of users and may be the cause of many of the "slow/unstable speed" issue:
I suspect the default values that qBittorrent uses for these kinds of settings are only well suited for low spec connections/systems, and inadequate for people with fast disks or fast connections or both.

@sledgehammer999
@glassez
@Chocobo1
@arvidn
thoughts?

@Seeker2
Copy link

Seeker2 commented Dec 3, 2018

I've seen where uTorrent uploading to qBitTorrent using uTP has to have retransmits (which implies packet loss causing that) even when uploading only around 100 KB/sec. Since uTP is used to regulate speed, the retransmits/packet loss cause huge speed decreases.

Studies have been done on how badly libtorrent is affected by latency and packet loss:
"Understanding the impact of latency on Libtorrent thoughput" Tribler/tribler#2620

TCP is supposed to not be affected by slow uTP performance when "uTP-TCP mixed mode algorthm" is set to "Prefer TCP" (the default value now), but may be anyway due to bug/s...

@FranciscoPombal
Copy link
Member

@Seeker2 that setting may have an impact, but in my previous post I was specifically talking about the following:
image

The values in the screenshot are the default ones I believe. I have no idea whether they are appropriate or not, even for my use case.

@Seeker2
Copy link

Seeker2 commented Dec 3, 2018

It's not a minor impact -- constant packet loss will destroy speeds regardless of uTP/TCP type.
Extremely high pingtimes or jitter will also destroy speeds.

So with that said, someone in China/Japan/random other Far East countries trying to download a torrent mostly shared by people in Western Europe is going to see pretty high pingtimes and high jitter at best. Too many chances the data passes through throttling ISPs and stingy/overloaded transit authorities (such as companies controlling underwater cables). This is part of the reason why downloading and uploading with many seeds+peers at once helps -- when 1 is slow, many others can take up the slack.

And this is where Buffer watermarks come in... to reduce the effects of high pingtimes and jitter by buffering up some data to be sent as fast conditions allow instead of trickle-feeding the networking at a reduced but fixed rate.

The Buffer watermark is probably on a PER connection basis, so this can use lots of ram pretty quick trying to do 1000+ connections at once with 500 KB each. (500+ MB, although at 50% factor may only average about 250+ MB)

Try raising the Send buffer low watermark to 50-100 KB, since absolute minimum chunk size for torrents is 16 KB. (10 KB is smaller than that and might cause low-to-high speed oscillations as the buffer empties too far)
Also try raising Send buffer watermark to 1000-5000 KB -- but only use the highest number if there's less than 100 total seeds+peers involved, because this might otherwise cause qBitTorrent to try to use >2 GB ram and crash horribly.
Send buffer watermark factor can be left at 50%, as that will still leave plenty of room before low watermark is reached.

@arvidn
Copy link
Contributor

arvidn commented Dec 6, 2018

I just want to note that both TCP and uTP consider all packet loss to be caused by congestion. If you have non-congestive packet loss, this (incorrect) assumption can cause sever under-performance. As far as I know, that's mostly a problem with faulty wiring.

uTP wouldn't technically have to make this assumption to the same degree that TCP does (since uTP's main congestion detection is one-way delays), but in order to co-exist with TCP, without ever being more aggressive, it also has to throttle back to the same degree as TCP does.

@Seeker2
Copy link

Seeker2 commented Dec 10, 2018

uTorrent uTP uploading to qBitTorrent seems to cause a lot of non-congestive packet loss, as shown by the 5-25% retransmit rate.

From what I can tell/guess, the uTP packet size differences that uTorrent uses when seeding vs what qBT uses when seeding may be a contributing factor.

@FranciscoPombal FranciscoPombal changed the title Socket缓存大小是多少,如何修改它来提高外网的跨网速度,他是非常极其慢的。 Low/unstable speeds Feb 19, 2020
@ghost
Copy link

ghost commented Jul 18, 2022

Closing this as this was reported on a very old version. If you can still reproduce it with latest version please comment to re-open the thread or create a new thread.

@ghost ghost closed this as not planned Won't fix, can't repro, duplicate, stale Jul 18, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants