[CentOS] rsync and swapping

Wed Jan 30 13:52:37 UTC 2008
Les Mikesell <lesmikesell at gmail.com>

Jerry Geis wrote:
> hi all,
> 
> I use rsync to copy/backup ALL my stuff to another disk.
> 
> When I run this seems like my machine (4 GIG ram centos 5.1)
> now begins to swap out more programs. Is there a way to reduce
> that swapping? I am running with echo 1 > /proc/sys/vm/swappiness
> 
> I simply mount /dev/sdc1 /mnt/backup; mkdir /mnt/backup/month.day.year
> then rsync -a /home /mnt/backup/mon.day.year
> 
> This is approximately 102G of data.

It's the number of files in the run that matters more than the amount of 
date.  Rsync loads the entire directory listing into RAM before starting 
to copy so there is a certain amount of per-file overhead.  It should 
help if you could break the run up, perhaps doing a few directories 
separately, then make another pass that excludes those directories.

-- 
   Les Mikesell
    lesmikesell at gmail.com