2

I know this seems to be a recurrent question but it's been troubling for a while now, so if anyone has a brilliant idea please let me know.


My Setup


OS

  • Debian Wheezy

HDDs

  • 2 x 240GB SSD for system (sda & sdb in RAID1 - md0=/boot md1=/ md2=/tmp md3=swap)
  • 2 x 2TB SATA for storage (sdc & sdd in RAID1 - md4=/home)

Scheduler Settings

  • [cfq] for drives sda sdb sdc sdd (from my understanding ionice only works with cfq)
  • cat /sys/block/md*/queue/scheduler returns none as the only option for all arrays

Remote Storage

  • Simple remote storage space with no rsync server/deamon running on it (hence not using --rsync-path)

What I'm doing


  • I am providing a backup service to a few users using a simple script (triggered by cron).
  • The remote storage is automounted using automount & sshfs when the script runs.
  • The rsync cmd I use is
    nice -n 19 ionice -c2 -n7 rsync -rtvuczhq --delete --log-file=$LOG $SRC $DEST

The issue


While this works, there is a significant impact on the IO (cpu is fine) and simple music streams originating from the server are delayed/lagged along with any cmds requiring disk access.


The questions


Is there something obviously wrong in the rsync cmd I am using?
Is there anything I can do to reduce rsync's IO usage or prioritise other processes over it?

Merry Xmas, Happy New Year and Many thanks in advance..

JayC
  • 73
  • 1
  • 5
  • Have you tried to throttle rsync with `--bwlimit`? Also, I usually omit the -v (verbose) flag when running from crons. – Gmck Dec 21 '15 at 18:37
  • @Gmck - doesn't `--bwlimit` apply to network bandwidth? (which really isn't an issue). I will see if the -v has an impact (am using it for logs). – JayC Dec 21 '15 at 21:15
  • My question needs a little more explanation. Instead of sshfs, can you try with ssh and --bwlimit? – Gmck Dec 21 '15 at 21:28
  • @Gmck - I will try and report back (tomorrow) but my guts tell me that it got something to do with the `-c` (checksums) option. Would you know if there is a particular reason for rsync to be immune to the ionice params I'm passing? – JayC Dec 21 '15 at 21:47
  • Fore sure checksums will add to I/O, but I am not sure it would cause that great of a bottleneck. Try without and see. I just tried with checksum from one of my data centers to a remote backup with 100mb links. It's a little slower, but not agonizing. – Gmck Dec 22 '15 at 02:47
  • @Gmck - Well I knew there was a reason I was doing it via sshfs (the reason being that my provider for the remote storage does not provide a real shell hence no direct ssh connection). The only other mean of accessing is sftp which rsync doesn't support.. Any hints? – JayC Dec 22 '15 at 10:19
  • My guess is mounting via sshfs, which is fuse, is a contributor to the problem. There could be other factors on the provider's ends as well, but that's pretty hard to speculate. I have used lftp - which has a mirroring support and will transfer across sftp, bypassing fuse alltogether. `lftp -e "mirror -eRv /local/dir/ /remote/dir; quit;" sftp://user@server:port` – Gmck Dec 22 '15 at 13:43

0 Answers0