0

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.

Xilexio
  • 111
  • 4
  • 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 – djdomi May 06 '22 at 17:31
  • 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. – Xilexio May 06 '22 at 17:52
  • 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 – djdomi May 06 '22 at 17:55
  • 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. – Xilexio May 06 '22 at 17:59
  • i already added the file name where you can adjust it, maybe it's a vit hidden for you ;) – djdomi May 06 '22 at 20:49

0 Answers0