I noticed this when sync'ing a folder with hundreds of thousands of sub folders from my local 32-bit Ubuntu (10.04, ext3) to my remote 64-bit (10.04 ext3) VPS.

The size of the local directory is hundreds of M's larger than that of the remote server.

It turns out that the difference is caused by the different sizes of the folders --

$ uname -a
Linux <><> #1 SMP Tue Jun 21 10:04:20 EDT 2011 x86_64 GNU/Linux
$ ls -ld electronics/
drwxr-xr-x 12 jerry jerry 4096 2012-01-22 06:13 electronics/

$ uname -a
Linux <> 2.6.32-37-generic #81-Ubuntu SMP Fri Dec 2 20:35:14 UTC 2011 i686 GNU/Linux
$ ls -ld electronics/
drwxr-xr-x 12 jerry jerry 12288 2012-01-22 14:13 electronics/

The question is: Why are the folder sizes different? And when I install a new Ubuntu, how to make them as small as possible?

closed as off-topic by WinEunuuchs2Unix, user117103, David Foerster, Eric Carvalho, user364819 Jul 18 '17 at 15:41

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This describes a problem that can't be reproduced that seemingly went away on its own or was only relevant to a very specific period of time. It's off-topic as it's unlikely to help future readers." – WinEunuuchs2Unix, guntbert, David Foerster, Eric Carvalho, Community
If this question can be reworded to fit the rules in the help center, please edit the question.

  • My initial suspicion was that your block sizes were different ; directories seem to occupy 1 block by default (4096 bytes). But apparently, 4096 bytes is the maximum block size on ext3. To verify this : serverfault.com/questions/29887/… My second thought is therefore that the directories on your client have grown to accommodate extra file entries, but that they do not shrink afterwards. What happens if you delete one of these folders and recreate it with the same content? – Adrian Jan 23 '12 at 13:18
  • I just copied the folder locally and the resulting folder is the same size (i.e., hundreds of M's larger than the remote folder). Any other hypothesis? – Jerry Jan 24 '12 at 6:40

Browse other questions tagged or ask your own question.