As part of my research I tend to be working with relatively large files. One 150GB file I work with particularly often involves moving an updated version of it from one directory to another. On my Ubuntu desktop this causes everything to become unresponsive for the duration of the transfer.

One solution to this is ionice which lets you set the IO priority of processes. It's kind of like regular nice but for IO specifically. I found that the follow command, which sets the scheduling class to be 'Idle', let my desktop remain completely responsive while the transfer was taking place.

ionice -c 3 cp $src_file $dst_directory

This was posted on Tue 24 Jun 2014 (4 years, 10 months ago) by Ryan McConville
Comments