davfs와 함께 설치된 클라우드 스토리지의 대역폭을 제한하는 방법은 무엇입니까?

davfs와 함께 설치된 클라우드 스토리지의 대역폭을 제한하는 방법은 무엇입니까?

davfs가 설치된 클라우드 저장소에 약 400개의 파일(각각 약 25MB)을 복사해야 합니다. CPU 로드 및 IO 로드를 제한하기 위해 다음 명령을 시도했습니다.

nice -n 15 ionice -c 3 rsync -avhW --no-compress --progress /src/ /dst/

내 대상 폴더는 dstdavfs에 의해 마운트된 클라우드 저장소입니다. 파일을 전송할 때마다 rsync에는 몇 초밖에 걸리지 않습니다. 적어도 그 정도는 빠른 것 같습니다.

sending incremental file list
xxx
26.70M 100%   15.75MB/s    0:00:01 (xfer#1, to-check=0/1)
sent 26.70M bytes  received 31 bytes  7.63M bytes/sec
total size is 26.70M  speedup is 1.00

rsync나 좋은 프로세스가 실행되는 것을 볼 수 없지만 데이터 전송이 여전히 백그라운드에서 실행 중이기 때문에 시스템이 매우 느립니다. 마운트된 클라우드 스토리지에는 davfs 프로세스가 하나만 있습니다. 몇 분 후 시스템이 다시 응답하고 파일 전송이 완료되었습니다.

netstat클라우드 스토리지에 대한 활성 연결을 표시합니다.

시스템 속도 저하를 방지하기 위해 davfs가 설치된 클라우드 스토리지의 대역폭을 제한하는 방법은 무엇입니까?

답변1

Rsync(현재)에는 bwlimit 옵션이 있습니다.

   --bwlimit=RATE
          This option allows you to specify the maximum transfer rate for the data  sent  over  the
          socket,  specified  in units per second.  The RATE value can be suffixed with a string to
          indicate a size multiplier, and may be a fractional value (e.g.   "--bwlimit=1.5m").   If
          no suffix is specified, the value will be assumed to be in units of 1024 bytes (as if "K"
          or "KiB" had been appended).  See the --max-size option for  a  description  of  all  the
          available suffixes. A value of zero specifies no limit.

          For  backward-compatibility  reasons,  the  rate limit will be rounded to the nearest KiB
          unit, so no rate smaller than 1024 bytes per second is possible.

          Rsync writes data over the socket in blocks, and this option both limits the size of  the
          blocks  that  rsync  writes, and tries to keep the average transfer rate at the requested
          limit.  Some "burstiness" may be seen where rsync writes out a block  of  data  and  then
          sleeps to bring the average rate into compliance.

          Due  to  the  internal  buffering  of  data, the --progress option may not be an accurate
          reflection on how fast the data is being sent.  This is because some files can show up as
          being  rapidly  sent  when  the data is quickly buffered, while other can show up as very
          slow when the flushing of the output buffer occurs.  This may be fixed in a  future  ver‐
          sion.

관련 정보