I have large file I need to mv and even with nice -n19 it seems to affect the server performance.
I think an option would be to run the process in "chunks" whereby I run the command for a few seconds, then sleep for a few, then resume the process.
Is there a way to do this from the command line or a better alternative ? Currently I do a Ctrl Z and fg manually.
Best Answer
Your performance impact is likely caused by a I/O bottleneck because
mv
does not normally require a lot of CPU cycles (unless encryption/decryption is involved).nice
changes the scheduling priority of the task in the task list, which get to run on the CPU.Therefore, instead of
nice
, try (for kernel > 2.6.25)From
ionice -h
From
man ionice