Page 1 of 1

smart speed limiter

Posted: Sat Aug 23, 2008 5:28 pm
by ichernev
Hi everyone.

I've been using deluge approximately since it came out, and I often have to completely stop its activity in order to view normally a web page, because I'm seeding a lot of torrents (~60). The problem is that most of the time I forget to unpause deluge, so in the end it stays paused for several days and doesn't upload anything. I was wondering if there could be made a simple plugin that has several restriction policies and activates them with a simple script written by the user (of course there can be build in scripts in the future :)). For example when the screen saver is ON deluge should act without any restrictions. When I'm watching a film it should lower a bit the speeds to avoid choppy video/audio. And when I pause it it should try to unpause itself after a certain time (after a popup or something) to avoid forgetting it in pause mode.

What do you think?

Re: smart speed limiter

Posted: Thu Sep 04, 2008 5:56 pm
by TomTerrific
I've encountered two similar problems and was wondering what the best solution might be.

Two problems I have are:
  • I have to download something large on another PC in the house, so I manually turn down the download bandwidth limit until I am done - then I forget about turning it back up when I am done.
  • My house mate, who is not a Linux user, wants to download something on their laptop - so if I notice or he complains I go and manually turn down the download bandwidth limit.
My ideas on how it could be solved are:
  • A plug-in that temporarily turns down the download limit for an adjustable length of time. So I when I hit the button it would adjust the download bandwidth to 25% of normal for 30 minutes. If there was a simple interface then my house mate could just click on the big icon.
  • A likely unrealistic & ideal solution would have a deluge plug-in interface with the gateway router and monitor overall bandwidth usage. It could lower deluge's bandwidth to always keep the household at a set level. So when other applications were using the network deluge would decrease it's usage. Too bad UPnP doesn't seem to support any traffic shaping.
  • I could buy a new router that supports 802.1p QoS traffic prioritization and then tag all the deluge traffic as data and let the router handle the rest of the household traffic first.
Does anybody have any other suggestions?

This has got to be a common problem for anybody who doesn't live alone - how have other people solved it?

Re: smart speed limiter

Posted: Tue Sep 09, 2008 7:04 am
by ichernev
I think that my proposition with the external (user) script is most generous because:
  • You can make an external program show a big button, which when clicked activates a timer (and restricts deluge) and the corresponding script watches the timer and unpauses/unrestricts deluge to its full speed after the timer is off
  • The script can also be monitoring the traffic of the router every minute for example and change the restriction policy each time if necessary. For this tough I'm not sure how it's going to be done (the monitoring) - but it must be possible.
  • The script also can monitor playing movie/music, web browsing, screen saver and things like that for better experience for users that are alone.
  • It can also use a configuration file where, if needed, the user can set manually the restriction if this is absolutely needed (of course adding a timer sounds great).
To be more pluggable there maybe should be an interface for creating new restriction policies (i.e. the upper bounds for connection, max download speed etc) and another for adding scripts, and some kind of ranking of the scripts - for example the script that checks the screen saver will have a lower priority compared with the script monitoring the router.

Re: smart speed limiter

Posted: Tue Sep 09, 2008 7:25 am
by andar
You could easily make a plugin to do most of this stuff and perhaps just adding to the future scheduler plugin might be best. For example, you could have the scheduler plugin lower limits for N minutes or what not. That being said, I think the best solution to the problem is simply QoS in the router or at the OS level.

If CPU usage is an issue with a lot of seeds, then perhaps you will want to utilize the new queue system and it's seed cycling capabilities so that you do not have all the torrents active at the same time.