Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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'm running MySQL 5.0.x on RHEL 5.3.
I read in the MySQL Manual (here) that 'it is essential to run the mysqld process with the highest possible priority on the 2.4 kernel to achieve maximum performance' and they recommend using renice -20.

There is no mention of the 2.6 kernel.
On my system MySQL is running with a priority of 0.

I do suffer from load problems where the IOwait gets high when disk activity like copying a big file takes place during normal daytime database traffic.

Is changing the priority a good idea or are there any potential problems with doing this?


share|improve this question
up vote 1 down vote accepted

Scheduler priority will not solve your problem, it's only used to pick which process gets to use the CPU first when there are multiple waiting.

IOwait is caused by processes stuck waiting for IO to complete, in your case, the disks. It has nothing to do with the process priority, so changing it won't have any effect. The solution is to either rate limit the big file transfers, move them to another time when the machine is idle or upgrade the disks so they can handle the load better. Use iostat -xm 5 to monitor the disk utilization %, if it goes over 80%, it's bad news.

share|improve this answer
good point on the iostat call – warren Sep 24 '09 at 12:12
Might be worth setting mysql's disk priority to 1 with ionice. – Cian Sep 24 '09 at 12:43
@Cian - I didn't knew you could do that. Yeah, that would make sure mysql runs smoothly no matter what happens on the background. The "load" number will still be high, but it doesn't matter that lots of processes are waiting, as long as db requests gets served first. Just don't put mysql in the realtime class or you'll have trouble sshing into the machine. Alternatively, put the bulk processes in the idle class. – Miles Sep 24 '09 at 13:51

In my experience, the default runtime priority (0) is fine if you're on a mixed-use machine - ie, running a db and apache and mail, etc.

If it's just a db machine, I'd pump the priority up as high as it could go without sacrificing manageability (vis-a-vis ssh remote console).

share|improve this answer
If there's nothing else on the machine why use priority at all? – Gleb Sep 24 '09 at 11:20
@Gleb - to ensure that it does get all the system priority you want it to have :) ..I do this on dedicated servers, not because it's necessarily "required", but it seems like a really Good Idea(tm) :) – warren Sep 24 '09 at 12:11

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.