<div dir="ltr"><meta http-equiv="content-type" content="text/html; charset=utf-8"><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; "><div>Hi all,</div><div><br>
</div><div>I am using rsync to sync a directory tree of ~2 million files. I am using rsyncrypto with filename encryption to encrypt the files before syncing.</div><div><br></div><div>When encrypting filenames, rsyncrypto assigned each file a filename which is made of hex digits. It also has the option to put the files in directories, where the location of the file is determined by the file&#39;s name and a parameter indicating the depth of the directory structure. i.e. if the filename is 2EB2FE7F11258E27AF21BF60D2F4B06B , and the depth is 3, the file will be in:</div>
<div>2/2E/2EB/2EB2FE7F11258E27AF21BF60D2F4B06B</div><div>for a depth of 1 the file will be in:</div><div>2/2EB2FE7F11258E27AF21BF60D2F4B06B</div><div>etc...</div><div><br></div><div>My question (finally): how to optimize rsync&#39;s speed? - how deep should the directory structure be? What would be faster to rsync - 1 directory with 2M files, or 16 directories with 125K files each, or 256 directories with 8K files each, ....</div>
<div><br></div><div>Shai</div><div><br></div></span></div>