Using CFQ to Copy Files on Linux at a Low Load

Asked 2 years ago, Updated 2 years ago, 46 views

For example, is there a way to copy files at a low load when copying files that are several gigabytes in size on a server that is in operation and under a certain load?

The I/O scheduler should be anything other than CFQ.

linux

2022-09-30 20:29

2 Answers

@heliac2001 is also in the link, but how about setting a bandwidth limit for rsync?The IO scheduler was also able to see the effect in noop.

For example, to copy at 500 kbps

rsync--bwlimit=500 fromfile tofile

and so on.

It may take longer, but if you look at iostat-x1

  • %system
  • %iowait
  • %util

and so on.


2022-09-30 20:29

Another way to do this is to limit the bandwidth of scp and pv.

scp-l 500 fromfile tofile
pv-L 500k fromfile > tofile

Also, as a more general method, the copy process can be controlled by SIGSTOP and SIGCONT for low-load copying.

cp hoge foo&
PID = $!
while kill-0$PID;do
  kill-s19$PID
  sleep5
  kill-s18$PID
  sleep10
done


2022-09-30 20:29

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.