#1466 closed patch (Fixed)
Performance warning: Send Buffer Watermark
Reported by: | cinderblock | Owned by: | Cas |
---|---|---|---|
Priority: | major | Milestone: | 2.0.0 |
Component: | Core | Version: | 1.3.1 |
Keywords: | watermark, send buffer | Cc: | cameron@…, non7top@…, ancient@… |
Description
I just took a look at my log file with debug turned on (trying to make some small improvements of my own) I'm getting a ton of alerts from libtorrent, like 60 every second, all from the same torrent.
[DEBUG ] 16:26:38 alertmanager:123 performance_alert: <TORRENT_NAME>: performance warning: send buffer watermark too low (upload rate will suffer)
Google only found one other reference to this "bug" here on the forums.
This error is coming directly from libtorrent as there is no alert handler defined for it.
The libtorrent documentation shows the correct solution (increasing read buffer) but I can't figure out where I might add that setting setter to the deluge source. (Just started looking at python/deluge)
libtorrent also claims to have many presets for different types of servers (min memory, high performance seed, ...) which have appropriate default settings. Maybe this is the best place to start and implement a preset picker in the preferences.
So really, this "feature-request" is for more control over the libtorrent session settings to optimize performance, not to clean up debug outputs...
Attachments (2)
Change History (16)
comment:1 Changed 13 years ago by cinderblock
- Cc cameron@… added
comment:2 Changed 13 years ago by Cas
- Component changed from libtorrent to core
- Milestone changed from Future to 1.4.0
comment:3 Changed 12 years ago by joshbeck
Changed 12 years ago by joshbeck
comment:4 Changed 12 years ago by Cas
- Type changed from feature-request to patch
comment:5 Changed 11 years ago by non7top
This patch still applies cleanly to git master. Please commit.
comment:6 Changed 11 years ago by non7top
- Cc non7top@… added
comment:7 Changed 11 years ago by andar
I think this patch should look for the specific alert string "send buffer watermark too low" and only then increase the watermark. The reasoning is that there could be other performance alerts that aren't related to the send buffer watermark.
comment:8 Changed 11 years ago by ancient
- Cc ancient@… added
Changed 11 years ago by tyeken8
comment:9 Changed 11 years ago by tyeken8
This patch is based on joshbeck ones.
Fix typos of that one.
Double the buffer only if the performance warning is about that.
Change cap to 50MB, since it seems the send buffer watermark should be roughly your max upload per second. So 5MB is insufficient for a Gigabit Ethernet.
comment:10 Changed 10 years ago by amain
Patch applies also nicely (some offsets) to 1.3.3. Flooding is stopped and send buffer change is logged:
[DEBUG ] 11:47:51 torrentmanager:1099 performance_alert: ...: performance warning: send buffer watermark too low (upload rate will suffer) [DEBUG ] 11:47:51 torrentmanager:1107 send_buffer_watermark set to 204800.. [DEBUG ] 11:47:51 torrentmanager:1099 performance_alert: ...: performance warning: send buffer watermark too low (upload rate will suffer) [DEBUG ] 11:47:51 torrentmanager:1107 send_buffer_watermark set to 409600..
Thanks!
comment:11 Changed 10 years ago by Cas
- Owner set to Cas
- Status changed from new to assigned
I have pushed a fix to develop: [ce6abe024758] (It is limited to 3MiB but if a larger size is required the libtorrent plugin in the forum can be used to alter send_buffer_watermark)
I have been unable to test it with an actual performance alert from libtorrent so needs someone to verify it works correctly.
comment:12 Changed 10 years ago by Cas
- Resolution set to Fixed
- Status changed from assigned to closed
Finally got an alert to test this and looks to be good.
comment:13 Changed 8 years ago by Cas
- Milestone changed from 2.0.x to 2.0
I've made a patch off of the latest git master that solves this problem automatically. Whenever there's a performance_alert, it doubles the size of the send buffer. It works well for me. I was able to get up to 900KB/s with it, and the performance_alerts stopped after the buffer grew to 1.6MB.