I am trying to run apache2 at real time priority for this I want to use IONICE but have not been successful.

Debian 6 (2.6.32-5-amd64)

I use this command

ionice -c1 -n0 apache2

But I get this error

apache2: bad user name ${APACHE_RUN_USER}

Can anyone give me some suggestions to get this working?


You should not start apache directly, use an initscript or /usr/sbin/apache2ctl for this instead. You should modify /etc/init.d/apache2 initscript to alter I/O priority. By the way, why do you want to alter the I/O priority of apache processes? This can lead to major problems in case of high number of client requests, the whole system can get unresponsive.

| improve this answer | |
  • I started with this command ionice -c1 -n0 /etc/init.d/apache2 start but how should I edit the startup script. The web server is password protected and only used by a few users so there should not be a large amount of requests. – Stephen Nov 20 '11 at 11:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.