Greg Freemyer wrote:
Linda Walsh wrote:
In my scenario, I setup xfs dump & restore with large buffers and put "mbuffer" in between them.
mbuffer!
Very cool. I love that app, but rarely find good use cases for it. For those who don't know it, mbuffer is often used between apps like tar or cpio and high-speed tape drives. Tape drives in sequential access mode are often far faster than a disk with data scattered all around the place so a large buffer highly optimizes the overall process.
---- Collecting "files" from wherever on an "old disk" and then copying them to a new, pristine disk, has similar performance characteristics. To *try* to make sure the writes empty faster than the reads so I don't get any slowdown from "mbuffer" being "full", I adjust priorities to make writers have higher priority than the reader. Script I use to dump a xfs-drive to a target included as a sample:
cat xfscopy #!/bin/bash -ue # $1=source # $2=target
# xfsdump ops: # -b = blocksize # -l = level (0=all) # -J = inhibit inventory update # -p = progress report every # seconds # next to last arg is '-' for stdout/in & out # last arg is for source or destination mount points if (($UID)) ; then echo "Must be run as root"; exit 1; fi mbuffer_size=1024M xfs_bs=128k xfs_report_interval=300 # setting restore proc's cpu+disk io "higher" than "dump"s helps # prevent filling memory and thrashing # prios c:1=real(don't use), 2=best-effort(timeshare); 3=idle # in Best effort, -n=0-7 where 0=highest, 7=lowest, but not strict! dump_cprio=-19 restore_cprio=-5 dump_dprio="-c3" restore_dprio="-c 2 -n3" alias nice=$(type -P /usr/bin/nice) alias ionice=$(type -P /usr/bin/ionice) nice $dump_cprio ionice $dump_dprio \ xfsdump -b $xfs_bs -l 0 -p $xfs_report_interval -J - "$1" | \ sudo nice -1 mbuffer -m $mbuffer_size -L | \ nice $restore_cprio ionice $restore_dprio \ xfsrestore -b $xfs_bs -B -F -J - "$2" -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org