I'm working on a big shared Ubuntu server and am annoying my colleagues. One of my processes is making a lot of inserts into a MySQL database and it's bogging the whole server down.

MySQL is not using much of the CPU resources nor much of the RAM. If that were the case I could use the tools 'nice' and 'ulimit' to throttle the process (in fact I am using nice on MySQL and it's not helping). Instead, MySQL seems to be making lots of random disk read and write operations and so whenever anyone else wants to read or write a file from disk, they have to wait a second or two, which is not acceptable for interactive use.

Any thoughts on what I can do to limit MySQL's disk I/O? (I'm looking for an OS or kernel level solution rather than a suggestion to change the hardware setup of my system).

What I need is well described in a message board here.

link|improve this question
feedback

1 Answer

up vote 1 down vote accepted

ionice (part of util-linux) can adjust the I/O priority of a process, allowing to select between idle, 8 "best effort" and 8 realtime priority levels:

ionice -c 3 -p $(pgrep -x mysqld)
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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