schedule (postprocessing) scripts for energy savings on NAS

Want something added? Ask for it here.
Post Reply
JayJay
Newbie
Newbie
Posts: 3
Joined: September 16th, 2010, 3:12 am

schedule (postprocessing) scripts for energy savings on NAS

Post by JayJay »

sorry if there a ticket fot it already..it could be this one but im not sure..http://trac2.assembla.com/SABnzbd/ticket/101

This originally started in the sickbeard forums as one of my thought but after thinking about it should be better if implemented in sab i think
..http://sickbeard.com/forums/viewtopic.p ... p=422#p422

i will copy/past from there..
by JayJay » Wed Sep 15, 2010 9:55 pm
My english is not that well so i will explain by discribing the situation..

I'm building a NAS with a raid array/non raid combination and a seperate 2,5" hdd/ssd for the OS, sab+SB and it will be the primary download disk.

what im looking for is a way to move my downloads delayed in bulk on user-set times or other criteria to its final destination..This is mostly for energy-saving reasons as the drives wil spinn-up every time sabtosickbeard will do its job.
besides time there could be other criterias like:
-once a x-hour/day .
-if reached x-Gb of downloaded shows.
-if x shows are downloaded (could override above settings)
-delay move if file is beeing watched
-an override: when free space on disc is less then x gb.
-keep trying if final location isn't available for now (for in situations where the final location is on another machine/usb-disk and in off-status)


Dont know if there is a solution for this (or please tell me) but as far i know it isnt possible..

so if implemented in SB it would be something like:

*settings in SB for the actual function. on/off+timesettings.
*after dowloading the sabtosickbeard script will process it as normal exept it parcs the files (in its own folder?) in a temp-folder rather then placing it directly in its final location.
*somewhere in sb the show should be stated as "waiting for move" or something similar.also a xbmc/growl notification would be nice.("file x placed in move-queue/to final location").
SB should actually update the xbmc -library imo so you can watch it right away, also after replacing it the library should be notified?)
*after the given times/criterias the script should move all the downloaded and processed shows to its final location.(change state to dowloaded/finished whatever)

what do you guys think..and would it even be possible?
by rascalli » Thu Sep 16, 2010 6:28 am
Of course it is possible , but I think it would only be implemented if more people like/need this.

Also I am curious why the drives will go crazy, do you have any idea ?
Is this all new hardware ?

If you use linux , have a look at NICE & IONICE settings , this can help disk & CPU usage

----

I know you can set the post-processing manual on a folder.
If you can find out what command is used to get the postproces running , then you can set up a cron-job / scheduled task , to start this every 1-2 hours
hats why i ask riscalli..are there more who would like it..

The drives wont go crazy..its normal behaviour..the drives if not read/write will be asleep, only the 2,5" will work because of the os/sab/downloading but when the script is moving an episode the whole array will spin-up..
a Drive uses most power when spinning up, up to 30W for every drive.
Sure, if theres 2 or 3 drives and a few shows to download its doable..But for what i noticed is that the available hardware and solutions are increasing rapidly and getting cheaper, more and more people are getting used to the concept of a central media/home server/NAS. And the big selling point now a days is the whole "be green ,save the earth etc" thing.
For now the out-of-the-box nasses mostly have 2-4 drives but its increasing quite fast and i know for a fact pc-builders are selling more and more pre-build homeservers.
So yes i really think that some energy saving features will be a big plus for sickbeard so why not start implement it right a way to get a head start?

For instance my server will start with a main 2,5 inch+ 4 disc array+ 2 standalone discs. and for now about 70 shows to download. its easily expandable up to a total of 10 drives and then there is also SAS..("put cable in"-> add 10 more drives)..

edit: now im thinking about it..wouldnt it be better if this is done at the dl client end..? cause besides sickbeard there are other similar programs like the couchpatato thing and theres something for music also(?). So maby its better to let sabnzb handle the delay by delaying the execution of scripts..
so what do you think..
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: schedule (postprocessing) scripts for energy savings on NAS

Post by shypike »

Eh, can you summarize in a few lines what you want exactly to be implemented in SABnzbd?
JayJay
Newbie
Newbie
Posts: 3
Joined: September 16th, 2010, 3:12 am

Re: schedule (postprocessing) scripts for energy savings on NAS

Post by JayJay »

the option to delay certain scripts bij user given time.

the script sabtosickbeard places a processed file in its final location given in sickbeard, the thing is that if the script is doing that the whole raid array starts to spin which uses the most power. 
i can imagine that other postprocessing scripts work similar and i would like to have a way to move processed files in bulk at a given critera like time/number of downloads/amount of downloades Gb etc to its final location (im gonna use a little disc for downloads/os etc and additional discs/arrays for final storage.)
it could be done at scriptlevel, but think its better sab handles it so all the scripts are covered.

better?
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: schedule (postprocessing) scripts for energy savings on NAS

Post by shypike »

You can have SABnzbd run a script run when the queue becomes empty.
The SAB scheduler isn't meant as a general purpose scheduler.
Adding even more stuff to it like counting downloads or download sizes would make it rather unwieldy.
You can have crontab run any other script.
There will be more scheduled events in the future, but they will be closely related to SABnzbd functionality.
JayJay
Newbie
Newbie
Posts: 3
Joined: September 16th, 2010, 3:12 am

Re: schedule (postprocessing) scripts for energy savings on NAS

Post by JayJay »

mmz that will not do the job, if nzb's send from sickbeard/couchpatoto/other auto-downloaders  just pooring in if the dl-queue is empty then the effect still exitst.

It could be a possibility to let sickbeard build up a queue and sends its founded nzb's in bulk but still think it would be a job for sab because:
a) a main feature or function if you will of sab is the execution of scripts, so to me its only logical that also sab controls the moment to execute.
b) if sab controls it it would be much easier to have a reliable way to reduce the systemload, like it does already now with pausing downloads when unrarring
c) all scripts can be effected from a main control point (sab), so the function isn't needed in every little script..so even scripts that havent those functions can be controlled this way.

i think a simple dropbox in de catagory tab next to the script dropbox would do the job..just start with a simple "timesetting" dropdown box or something..

well we will see what the future brings us..
thanks for replying!
\ grz  jay
Post Reply