[TriLUG] file copy flushing memory

Timothy A. Chagnon tachagnon at gmail.com
Fri Dec 2 11:59:00 EST 2005


You might be able to just renice the process to a lower priority. 
IIRC, time spent in IOWait will still be added to the decaying cpu
count.  By adding a higher "nice" value to that, the process will get
a lower priority.

Nice values for all processes are 10 by default and can be changed to
a value in the range 0 to 20.  Higher nice value means lower priority.
 See the renice(8) man page.

Your idea of changing the memory that the copy process uses might work
too.  If you use dd instead of cp, you could set the block size (bs)
to a smaller value.  Though setting it higher might work as well.  I
was just doing a dd last night and using a bs=1G created a process
with 1GB of memory, which was indeed not good.

If the default block size is too small though you may get improvement
from a higher value.  I think the default for dd is 512 bytes, but
most filesystems use blocks of 4KB, so bumping it up to there could
reduce the number of instructions to the disk device, maybe??  Of
course it also depends on the specifics of the disk drive.

Tim

On 12/2/05, Joseph Mack NA3T <jmack at wm7d.net> wrote:
> Occassionally I copy several 100G of files to another
> machine for backup. This doesn't put any particular load on
> either machine but other processes crawl, presumably because
> memory is being flushed. Is this the likely explanation? If
> so is there a way to restrict the amount of memory that the
> copy uses?
>
> Thanks Joe
>



More information about the TriLUG mailing list