-
-
Notifications
You must be signed in to change notification settings - Fork 210
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
Simplify updating queue entries #248
base: master
Are you sure you want to change the base?
Conversation
The erase/insert pattern can be replaced by a single method that updates an existing entry's timer, or inserting if it doesn't exist. This primary goal was to reduce CPU usage when handling incoming connections on large instances, but since the optimization was pretty generic it's been applied to many places.
Great Job @kannibalox. This pull request is 100% stable and greatly increases the number of peers rTorrent can process! It will allow over 10 gigabits to be pushed through rTorrent, provided the solid state hardware and system memory specs exist. Is there any chance you could reduce CPU usage for downloading? I can't obtain any faster than 2 gigabits because it's CPU bound. I believe the problem is related to the way libtorrent rakshasa manages the pieces. |
I did find a couple other things that could be optimized, but without a profile of actual usage from |
@kannibalox Please send me an email. |
@kannibalox Thank you for your email. I have determined the download delegator which decides the pieces to queue is responsible for the high CPU usage. There are multiple |
From kannibalox: rakshasa/libtorrent#248 The erase/insert pattern can be replaced by a single method that updates an existing entry's timer, or inserting if it doesn't exist. This primary goal was to reduce CPU usage when handling incoming connections on large instances, but since the optimization was pretty generic it's been applied to many places. Notes from stickz: This patch leads to higher throughput when seeding torrents. It greatly reduces the CPU usage of the rTorrent software. It is 100% stable and there are no downsizes to using the patch. Tracker updates are also performed faster.
From kannibalox: rakshasa/libtorrent#248 The erase/insert pattern can be replaced by a single method that updates an existing entry's timer, or inserting if it doesn't exist. This primary goal was to reduce CPU usage when handling incoming connections on large instances, but since the optimization was pretty generic it's been applied to many places. Notes from stickz: This patch leads to higher throughput when seeding torrents. It greatly reduces the CPU usage of the rTorrent software. It is 100% stable and there are no downsides to using the patch. Tracker updates are also performed faster.
The erase/insert pattern can be replaced by a single method that updates an existing entry's timer, or inserting if it doesn't exist.
This primary goal was to reduce CPU usage when handling incoming connections on large instances, but since the optimization was pretty generic it's been applied to many places.