Like others i find my ISP limits my speed to specific sites/ports or packets.
What i have noticed is it takes my ISP two Minutes to decide to slow the connection down. If i pause sabnzdb for a fraction of time and then start it again my speed increases greatly for 2 minutes then gets limited after this time.
My question is, is it possible to automate pausing and starting with a script or are scripts only called when a download is completed? or can this be implemented any other way?
If your ISP is traffic shaping your connections, give this a try and see if your seeing a similar outcome. It would be interesting to see if others can confirm this.
Thanks
Traffic shaping. Automated Start Pause, Start Pause.
Forum rules
Help us help you:
Help us help you:
- Are you using the latest stable version of SABnzbd? Downloads page.
- Tell us what system you run SABnzbd on.
- Adhere to the forum rules.
- Do you experience problems during downloading?
Check your connection in Status and Interface settings window.
Use Test Server in Config > Servers.
We will probably ask you to do a test using only basic settings. - Do you experience problems during repair or unpacking?
Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Re: Traffic shaping. Automated Start Pause, Start Pause.
That has been discussed in the past.
You can set the download speed via the SABnzbd API, see http://wiki.sabnzbd.org/api#toc46 . Such an external script has been posted by me somewhere in the forum. From my memory: somewhere around 2010 or so. On Linux you can call it from cron / crontab.
So, yes it is possible to the set the speed, but you need an external script/program, and you can't do it from within SABnzbd itself.
You can set the download speed via the SABnzbd API, see http://wiki.sabnzbd.org/api#toc46 . Such an external script has been posted by me somewhere in the forum. From my memory: somewhere around 2010 or so. On Linux you can call it from cron / crontab.
So, yes it is possible to the set the speed, but you need an external script/program, and you can't do it from within SABnzbd itself.
Re: Traffic shaping. Automated Start Pause, Start Pause.
Yes, that's it. Good find.Nipper wrote:Thanks i found it http://forums.sabnzbd.org/viewtopic.php ... ipt#p43305
But I don't see my python script in that post.
Anyway ... do you want to go that path? On what OS is your SABnzbd running?
Re: Traffic shaping. Automated Start Pause, Start Pause.
Sabnzdb is running on Ubuntu, so i believe your route is a good option. Yes the script is missing , i assume you don't have it any where else?
Re: Traffic shaping. Automated Start Pause, Start Pause.
OK, first learn & check the basics via lynx:
First set speed to 2222, and get feedback via JSON format:
Then set speed to 333, and get feedback via XML:
Finally, set speed to 1111, with plain text output (I didn't know that was possible):
Result:
Are you able to do this, using your own API key?
PS: I you use the wrong API key, you will get this:
First set speed to 2222, and get feedback via JSON format:
Code: Select all
$ lynx --dump 'http://localhost:8080/api?mode=config&name=speedlimit&value=2222&output=json&apikey=6ad7183480d5cf6c9e7f71be9cfbda6f'
{"status":true}
Code: Select all
$ lynx --dump 'http://localhost:8080/api?mode=config&name=speedlimit&value=333&output=xml&apikey=6ad7183480d5cf6c9e7f71be9cfbda6f'
<?xml version="1.0" encoding="UTF-8" ?>
<result><status>True</status>
</result>
Code: Select all
$ lynx --dump 'http://localhost:8080/api?mode=config&name=speedlimit&value=1111&apikey=6ad7183480d5cf6c9e7f71be9cfbda6f'
ok
Result:
Code: Select all
$ grep -i bandwidth ~/.sabnzbd/logs/sabnzbd.log
2014-04-14 23:23:18,579::INFO::[downloader:255] Bandwidth limit set to 2222
2014-04-14 23:23:45,665::INFO::[downloader:255] Bandwidth limit set to 333
2014-04-14 23:28:40,169::INFO::[downloader:255] Bandwidth limit set to 1111
PS: I you use the wrong API key, you will get this:
Code: Select all
$ lynx --dump 'http://localhost:8080/api?mode=config&name=speedlimit&value=1111&apikey=wronggggggggg'
error: API Key Incorrect
Re: Traffic shaping. Automated Start Pause, Start Pause.
Tryed all the commands you posted and all worked ok, also the log history confirmed it working.
Re: Traffic shaping. Automated Start Pause, Start Pause.
OK. Are you now able to get it to work the way you want it?Nipper wrote:Tryed all the commands you posted and all worked ok, also the log history confirmed it working.
Tip:
pause-sabnznd.sh: set to 0
unpause-sabnzbd: set to 99999
Then run from crontab
Re: Traffic shaping. Automated Start Pause, Start Pause.
After a quick google of crontab I believe you have provided me enough info to be able to do what I set out to do thanks you have been very helpful.
Re: Traffic shaping. Automated Start Pause, Start Pause.
If you start developing and run into problems, let it know; I'm happy to help.
Re: Traffic shaping. Automated Start Pause, Start Pause.
i have added :
*/2 * * * * lynx --dump 'http://localhost:8080/api?mode=pause&ap ... be9cfbda6f' && lynx --dump 'http://localhost:8080/api?mode=resume&a ... be9cfbda6f'
to my crontab file and all seems to be working very well, thanks for the help.
*/2 * * * * lynx --dump 'http://localhost:8080/api?mode=pause&ap ... be9cfbda6f' && lynx --dump 'http://localhost:8080/api?mode=resume&a ... be9cfbda6f'
to my crontab file and all seems to be working very well, thanks for the help.
Re: Traffic shaping. Automated Start Pause, Start Pause.
So each two minutes you throttle SAB and immediately resume SAB, and that works? Interesting.Nipper wrote: and all seems to be working very well, thanks for the help.
Re: Traffic shaping. Automated Start Pause, Start Pause.
Yes, this has increased my download rate from 1.4MB to 4.4MB on ISP plusnet.
Re: Traffic shaping. Automated Start Pause, Start Pause.
Hahaha, cool!Nipper wrote:Yes, this has increased my download rate from 1.4MB to 4.4MB on ISP plusnet.