I am looking for a command similar to ionice and trickle and pv -L and tc - but which puts limits on IO to files.
ionice looks at block devices on the local machine. I want this to work for file I/O in general. If it does not work for encfs mounted on NFS it is useless to me.
trickle shapes the network I/O - not the file system I/O. So if my program accesses a file on encfs, it will have no clue whether this is mounted on top of NFS or a local dir.
tc is similar to trickle: It shapes network I/O - not file system I/O.
pv -L only works on pipes. I need it to work on all files that the program opens. Think Firefox: It opens files for read and write in multiple threads.
I want this:
thecommand --read 5M --write 1M firefox to limit firefox to read files at 5 MB/s and write at 1 MB/s.
firefox is just an example: I want it to work for any program that opens different files for both reading and writing.
I want the limitation to work no matter if firefox is accessing a local file or a file on NFS/tmpfs/encfs/SSHFS/RandomFS.
It is OK if it only works on dynamically linked programs (i.e. it is OK if it does some LD_PRELOAD magic).
Does such a beast exist?
rsyncinstead ofcp? It has an overall rate-limit option, IDK if that works when running locally.cpis just a simple example. My use would do stuff to the file (including opening other files) - not just copying it.pvwith a--rate-limitoption, but that's basically this answer: unix.stackexchange.com/questions/225455/…