Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Whats the best way to set nice and ionice priorities?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
lutel
Tux's lil' helper
Tux's lil' helper


Joined: 19 Oct 2003
Posts: 93
Location: Pomroczna

PostPosted: Sat Oct 28, 2017 10:02 am    Post subject: Whats the best way to set nice and ionice priorities? Reply with quote

Hi,

I'd like to set nice and ionice for every deamon I run, preferably include priority information in each config file in /etc/conf.d or somewhere else, so everytime I start/restart deaemon it renices to given priorities. Do you know how to achieve it in most sane way?
Back to top
View user's profile Send private message
mike155
Veteran
Veteran


Joined: 17 Sep 2010
Posts: 1294
Location: Frankfurt, Germany

PostPosted: Sat Oct 28, 2017 11:25 am    Post subject: Reply with quote

If you use systemd:

You can set the nice-level in the Service section of the service (unit) configuration file:
Code:
[Service]
Nice=10

As far as I can see there is no way to set the ionice level, but you can set IOSchedulingClass and IOSchedulingPriority.

See "man systemd.exec" and http://0pointer.de/blog/projects/resources.html
Back to top
View user's profile Send private message
lutel
Tux's lil' helper
Tux's lil' helper


Joined: 19 Oct 2003
Posts: 93
Location: Pomroczna

PostPosted: Sat Oct 28, 2017 12:12 pm    Post subject: Reply with quote

Thank you, thats a good reason to finally switch over to systemd. At the moment the best so far what I found is to run "renice.sh" script in cron and after startup.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum