I am in the process of implementing a backup of a WD My Book Live Duo. This device is configured with software RAID0. The backup source directory is the root of the device, and the destination is a directory inside the same filesystem (taking appropriate care to avoid recursive copy of the backup files themselves). There is a layer of encryption for backup files (source files are clear text), what requires more computation power than that the NAS is able to deliver. Because of this, CPU-consuming opperations are carried out in a server that is in the same network.
The NAS is exporting two directories through NFS. One is read-only and contains the whole filesystem (it is the backup source), and the other is read-write (it is the backup root). Configuration details are stated at the end of the post.
The backup server uses
encfs as encryption layer and
rsnapshot to carry out the backup itself.
The problem is: The first step of the backup, which consists in a
cp -al of the last backup directory into a new directory, is taking about two hours to complete.
I have performed the following tests in the NFS server side so far:
- The same
cp -aloperation takes five minutes if executed directly in the NAS
dd /dev/zero ~/test.tmpshows a throughput very close to 100 MiB/s
topshows low CPU consumption. However, load average is high (~4)
iperftransfer rate is 1.000 Mpbs, so the network link is performing at the expected full capacity
vmstat 1shows very high wa (waiting for IO) values (~80-90%)
- Setting MTU to 9000 (tested with
ping -M do mybackup) didn't seem to have any effect
- Exporting with
asyncdidn't seem to have any effect
The following tests have been carried out in the NFS client side:
dd /dev/zero /e/test.tmp(encrypted) shows the same throughput as
dd /dev/zero /b(unencrypted). So the encryption layer doesn't seem to be the problem. The transfer rate is ~30 MiB/s, which is quite low, tough. Using SMB to perform this test yields simmilar results
topshows low CPU consumption. load average is below 2 (the server has 2 cores)
vmstat 1shows that the system is almost idle
tcp,hard,intr,nfsvers=3,rsize=32768,wsize=32768mount options didn't seem to have any effect
# /etc/exports # 'mybackup' is the name of the backup server / mybackup(ro,sync,no_subtree_check,no_root_squash,crossmnt) # This export has to be explicitly declared to enable clients to access /DataVolume/b /DataVolume mybackup(ro,async,no_subtree_check,no_root_squash) # This is the backup root. /DataVolume/b mybackup(rw,async,no_subtree_check,no_root_squash)
# /etc/fstab # 'ewnas' is the name of the NAS ewnas:/ /r nfs auto,noatime,tcp,hard,intr,nfsvers=3,rsize=32768,wsize=32768 0 0 ewnas:/DataVolume/b /b nfs auto,noatime,tcp,hard,intr,nfsvers=3,rsize=32768,wsize=32768 0 0
I've been stuck with this for several days now. Any contribution will be very appreciated.
Thanks in advance,