Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: rsync + malloc = Crazy Delicious



On Jun 7, 2007, at 4:20 PM, Douglas Back wrote:

So. Is this a VM limitation of the G5? Of the OS? A real memory limitation? Rsync bugginess that Apple needs to fix? If it is an OS limitation, is it one that can be removed by editing a config file?

AFAICT, this is a limitation in rsync. According to their FAQ:

    http://samba.anu.edu.au/rsync/FAQ.html#4

rsync creates a list of all the files to transfer before it starts. Each file entry takes 100 bytes, so if you have a lot of files, the file list can become so large that it overwhelms the amount of memory you have. Note that the amount of data is irrelevant; it's the number of discrete files that matters.

Now, I'm not sure if you're seeing the exact same thing, because you claim to only have 300,000 files. To chew up 1.5GB of RAM, you'd theoretically need 16 million files. However, Apple's rsync may store more info in the file list due to the ACLs, so perhaps the memory exhaustion happens faster.

Are you sure you only have 300,000 files? Also, can you confirm when the crash is happening (during the list building phase, or during the actual copy phase)? Try adding the --stats arg to rsync to see what your file list sizes are like.

When we encountered this problem (10 million+ files), we had to re- write our backup script to iterate over a list of directories and make a separate rsync call for each one. That broke up the file lists enough to keep the memory usage under control.

Jason

--
Jason Healy    |    email@hidden    |   http://www.logn.net/



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macos-x-server mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/macos-x-server/email@hidden

This email sent to email@hidden
References: 
 >rsync + malloc = Crazy Delicious (From: Douglas Back <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.