Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

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.

share|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 posting your answer, you agree to the privacy policy and terms of service.

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