Matt McCutchen
2007-Aug-02 15:20 UTC
How much file list kept during incremental recursion?
Wayne, Sven's note made me curious about how much incremental recursion actually reduces memory usage, so I'm asking: How much of the file list do the rsync processes hold in memory at any one time in incremental recursion mode? Just the active file-list chunk(s) and their ancestors? Or does rsync store directories or even all files permanently until the end of the run? I could probably slog through the source and figure out the answer, but you must know it off the top of your head. Matt
On Thu, Aug 02, 2007 at 11:20:09AM -0400, Matt McCutchen wrote:> How much of the file list do the rsync processes hold in memory at any > one time in incremental recursion mode?It currently stores all directores that are encountered during the run (though this might be optimized away in the future). It also pre-loads around 1000 files (if there are that many left) in order to try to give the generator plenty of items to scan during the time it might take a large file transfer to complete. It will also have the recent file info from any already scanned directories that have in-progress transfers. When a directory's contents are no longer needed, the associated file info is discarded by all 3 programs. Rsync does read whole directories at a time, so if there are directories with more than 1000 items in them, rsync's reading ahead of future files can be larger than normal. ..wayne..