Originally Posted by wastingtime
I need to run an archiving process that is cpu and disk io intensive.
It is easy to make sure it does not steal the cpu from more important processes: nice myprocess
However, even when running at a lower priority (thanks to nice) it manages to generate enough disk io to impact the performance of more important processes.
I would like to be able to limit the process disk io to e.g. 10Mbyte/sec; alternatively, to 10% of the available bandwidth.
ulimit does not seem to have such option.
Is there another command ?
Can I do that programmatically (i.e. write my own command ... but then someone must have wrote one already)?
What about following:
Create shared library slow_io.so with functions read and write.
Those funcion should usleep(your_timeout) and then call, original one
Run your application as
You may also need to intercept other io syscalls, such as pread/pwrite