Score:0

How to permanently change niceness of apache2 process on a Debian server?

us flag

I have Debian 11.2 with Apache2. I'd like to change niceness of all of my apache2 processes, or at least mod_wsgi processes, to +5. How can I do it?

Adding Nice=5 to /usr/lib/systemd/system/apache2.service didn't change anything, probably because that only calls apachectl. renice seems to work, but only as a temporary measure.

djdomi avatar
za flag
it would be a better solution for your to tell us your business related question or issue instead of editing `/etc/security/limits.conf` or any random file for your specific situation
us flag
I'm not sure if that answers your concerns, but my overall goal is for my Apache2 server running Django on mod_wsgi to not slow down other, more important applications on my server, such as ssh server or mail server, even when under a large load. Hence, I want the scheduler to de-prioritize Apache2. I don't understand how `/etc/security/limits.conf` would help with that.
djdomi avatar
za flag
you should consider o. not to create a single point of failure by hosting every thing in one server. In cases like where you are at such loads, i would suggest to split
us flag
This and introducing optimizations is a good long-term goal towards which I might go as the application develops, but the short-term solution I need is lowering the priority of apache2 process in scheduler that persists across restarts of apache2.
djdomi avatar
za flag
i already added the file name where you can adjust it, maybe it's a vit hidden for you ;)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.