I would like to set IO scheduling class & IO priority at boot.
What I would like is : best effort & low priority
It now starts at :
IO scheduling class : default
IO priority : 0
I looked i the WIKI .. but in there only nice is not explained.
Only ionice for external programs
Set nice scheduling/priority at start ?
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.
Set nice scheduling/priority at start ?
Last edited by rascalli on September 13th, 2010, 1:18 pm, edited 1 time in total.
Re: Set nice scheduling/priority at start ?
Does this help (or do you mean something else?):
Code: Select all
sander@athlon64:~/SABnzbd-0.5.4$ ps -ef | grep -i sabnzbd
sander 22915 3972 7 22:29 pts/1 00:00:01 /usr/bin/python -OO ./SABnzbd.py
sander 22960 1 6 22:29 ? 00:00:01 /usr/lib/chromium-browser/chromium-browser http://localhost:8080/sabnzbd
sander 22961 22960 0 22:29 ? 00:00:00 /usr/lib/chromium-browser/chromium-browser http://localhost:8080/sabnzbd
sander 23009 22920 0 22:29 pts/4 00:00:00 grep -i sabnzbd
sander@athlon64:~/SABnzbd-0.5.4$ ionice -p 22915
none: prio 0
sander@athlon64:~/SABnzbd-0.5.4$ ionice -c 3 -p 22915
sander@athlon64:~/SABnzbd-0.5.4$ ionice -p 22915
idle
sander@athlon64:~/SABnzbd-0.5.4$
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
Re: Set nice scheduling/priority at start ?
I know you can do this for running processes. ( did that as work around)
But was hoping you could also set it @boot
So when sabnzbd+ is started , it would start with low priorities
But was hoping you could also set it @boot
So when sabnzbd+ is started , it would start with low priorities
Re: Set nice scheduling/priority at start ?
How about:
and then check:
Code: Select all
ionice -c 3 ./SABnzbd.py
Code: Select all
sander@quirinius:~$ ps -ef | grep -i sabn
sander 13956 2976 18 23:46 pts/1 00:00:03 /usr/bin/python -OO ./SABnzbd.py
sander 14005 3568 0 23:46 pts/2 00:00:00 grep --color=auto -i sabn
sander@quirinius:~$ ionice -p 13956
idle
sander@quirinius:~$
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
Re: Set nice scheduling/priority at start ?
That also does not make the level sticky after a restart of the server or service
I use the init.d script to start it
I already found out that when I type in the terminal : ionice -c2 -n6 /etc/init.d/sabnzbdplus start
Then it works ....
---
Also the nice lever is set at : 0 (default)
but I would like that to be between 10-15 (lower priority) << I now set taht with webmin
But ideal would be to have all set at boot of the server or start/restart of sabnzbd+
I use the init.d script to start it
I already found out that when I type in the terminal : ionice -c2 -n6 /etc/init.d/sabnzbdplus start
Then it works ....
---
Also the nice lever is set at : 0 (default)
but I would like that to be between 10-15 (lower priority) << I now set taht with webmin
But ideal would be to have all set at boot of the server or start/restart of sabnzbd+
Last edited by rascalli on September 14th, 2010, 12:34 am, edited 1 time in total.
Re: Set nice scheduling/priority at start ?
Tweak /etc/init.d/sabnzbdplus, in start_sab(), add --nicelevel to the start-stop-daemon command. Ionice is probably not needed, since sab can already do that for io-intensive subprocesses like unrar.
Re: Set nice scheduling/priority at start ?
yes I have ionice set for PAr2 & rar
But woudl like to set ionice aso for sabnzbd+ , what command whould I need then ?
But woudl like to set ionice aso for sabnzbd+ , what command whould I need then ?
Re: Set nice scheduling/priority at start ?
If ionice is inherited by subprocesses (not sure) you could just put the ionice stuff before the start-stop-daemon command?
Re: Set nice scheduling/priority at start ?
That did the trick , thank you for thisjcfp wrote: If ionice is inherited by subprocesses (not sure) you could just put the ionice stuff before the start-stop-daemon command?
Last edited by rascalli on October 4th, 2010, 10:10 pm, edited 1 time in total.
Re: Set nice scheduling/priority at start ?
If sabnzbd is installed using the ubuntu (debian too?) packages, you can make use of the built in option for start-stop-daemon to set io class and/or prio.
edit it as follows:
* Starting SABnzbd+ binary newsgrabber
...done.
# ps axl|grep sabnzbd
1 0 4381 1 39 19 308128 40392 stext SNl ? 0:00 /usr/bin/python -OO /usr/bin/sabnzbdplus --daemon --config-file ~/.sabnzbd/sabnzbd.ini --server 192.168.1.11:8082
# ionice -p 4381
idle
Lovely.
So in /etc/init.d/sabnzbdplus, in the line-I, --iosched class:priority
This alters the IO scheduler class and priority of the process before starting it. The priority can be option-
ally specified by appending a : followed by the value. The default priority is 4, unless class is idle, then
priority will always be 7. The currently supported values for class are idle, best-effort and real-time.
Code: Select all
start-stop-daemon --quiet --chuid $USER --start --exec $DAEMON -- $OPTIONS
Code: Select all
start-stop-daemon --quiet --chuid $USER --iosched idle --nicelevel 19 --start --exec $DAEMON -- $OPTIONS
...done.
# ps axl|grep sabnzbd
1 0 4381 1 39 19 308128 40392 stext SNl ? 0:00 /usr/bin/python -OO /usr/bin/sabnzbdplus --daemon --config-file ~/.sabnzbd/sabnzbd.ini --server 192.168.1.11:8082
# ionice -p 4381
idle
Lovely.
Last edited by guckpup on June 19th, 2011, 1:04 pm, edited 1 time in total.