I have just found rtprio(1), and it does what I want wonderfully well: To make specific system services execute and return data to a front-end blazing fast even on an (intentionally) heavily loaded machine in terms of CPU usage by running something like
In my case, the services would be MySQL, nginx and php-fpm. I just set them to real-time priority 0 and wow, the results are amazing, so much more responsive while the machine is under massive load. And while some warning signal at the back of my head tells me that what I'm doing might be dangerous, it shouldn't matter: I'm the only user on said machine. If I mess up, I know who's responsible, and I'm gonna be the only one who's going to suffer.
My question is: What would be the best practice to configure specific services to run at a real-time priority of my choice? I'm thinking that modifying RC scripts or service-specific startup scripts is probably not the right way?
How would I do that properly?
Thank you!
# rtprio 0 -n
on them, with n being the numeric PID.In my case, the services would be MySQL, nginx and php-fpm. I just set them to real-time priority 0 and wow, the results are amazing, so much more responsive while the machine is under massive load. And while some warning signal at the back of my head tells me that what I'm doing might be dangerous, it shouldn't matter: I'm the only user on said machine. If I mess up, I know who's responsible, and I'm gonna be the only one who's going to suffer.

My question is: What would be the best practice to configure specific services to run at a real-time priority of my choice? I'm thinking that modifying RC scripts or service-specific startup scripts is probably not the right way?
How would I do that properly?
Thank you!