[Dovecot] dict quota problem

Sven Hartge sven at svenhartge.de
Wed Apr 20 14:47:31 EEST 2011


Papp Tamas <tompos at martos.bme.hu> wrote:

> In table I see this:

> | papp.tamas at center.hu | 118671994 |    20437 |


> du -sm says, the size of the maildir is 154M.

> I use xfs.
> I can't figure out, why is there a difference.

> Can you help me out?

"du" also accounts for the metadata of the filesystem. With Maildir++
you have many files per directory which causes the directory inode to
increase in size. After mails are deleted, the now empty space inside
the directory is not reclaimed (at least not in ext2/3/4, I guess, XFS
behaves the same) and you see a difference in size, since dovecot only
counts the raw size of the mails.

You can test this for yourself: create a directory, place a 100M big
file inside and check with "du". Then delete that file, create 10,000
files with 10KB size inside, check with "du", delete the files and check
again.

Grüße,
Sven.

-- 
Sigmentation fault. Core dumped.



More information about the dovecot mailing list