[mythtv-users] Can you "nice" an I/O process

Chris Pinkham cpinkham at bc2va.org
Sat Apr 8 21:23:17 UTC 2006


* On Sat Apr 08, 2006 at 04:40:44PM -0400, Tony Lill wrote:
> Brian Wood <beww at beww.org> writes:
> > I know how you can "nice" a process to control its use of CPU  
> > resources. What I am wondering is if there is a similar function with  
> > I/O, specifically disk reads/writes ?

> I wrote my own version of the cp and cmp commands that included a
> nanosleep between reads/writes. By playing with buffer size and sleep
> duration, I can turn down the throughput enough not to hose up mythtv.

Use rsync with the --bwlimit option, which lets you control the bandwidth
used to slow down the copy.  This works locally as well, so you could
copy files at 1 Megabyte per second by using "--bwlimit 1024".

rsync --bwlimit 1024 srcfile destfile

--
Chris


More information about the mythtv-users mailing list