Bug 227948

Summary: Dynamic way to set max download speed
Product: [Applications] ktorrent Reporter: Jedd <bko>
Component: generalAssignee: Joris Guisson <joris.guisson>
Status: RESOLVED INTENTIONAL    
Severity: wishlist    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Jedd 2010-02-21 16:33:16 UTC
Version:            (using KDE 4.3.4)
OS:                Linux
Installed from:    Debian testing/unstable Packages

Hi Joris,

I'm not sure how useful this would be for others, but my rationale is because I share an alleged-unmetered ADSL network that varies savagely through the day on what it will provide - from 50KB at peak up to 500KB in the early morning - and I always want to have decent performance on interactive applications, while giving as much bandwidth as possible to ktorrent. 

I was thinking of how we could have a setting to use some percentage of the available bandwidth.  Similar to the right-click on the sys-tray icon now, where you can set specific maximum upload and download values.

Being able to select a percentage - or even a 'always leave me x KB of bandwidth' - would mean I could just leave ktorrent running all the time, without impacting on mail & web surfing etc.

I guess that what it would need to do is periodically - every half hour, say - ramp itself up to 'unlimited download' - only for 20 seconds or so - and then it can determine what the maximum bandwidth is at the time.  Then it would throttle itself back to x% of that, or (max-bandwidth minus xKB).  Same on upload, I guess, though that doesn't seem to fluctuate so much on most ADSL connections, and/or people seem less concerned about that side of the pipe.  I guess you'd need settings for a) bandwidth you wanted ktorrent to leave alone, b) periodicity of bandwidth calculation, and c) a trigger in the sys-tray context menu to re-calculate.

I feel that it should probably be done further down the stack - but my experiences with doing QoS on various ADSL routers has never been a happy one, particularly when you try to throttle things like torrent data that are spread across many ports.  I'm sure it's a non-trivial amount of coding, and I notice that no one else has suggested anything like this, so I'm happy if you reckon this is a seriously horrible idea.  :)
Comment 1 Joris Guisson 2010-08-08 20:00:55 UTC
One of the design principles of µTP (bittorrent over UDP), is that it will throttle back if delay increases, so in effect it will yield to other traffic. 

This is a much better approach to this problem, then trying to determine the maximum bandwidth every X minutes. It adjusts continuously, decreasing and increasing the send rate as it is needed.

Seeing that KT supports µTP, I'm closing this bug as a WONTFIX.