[Dovecot] dict quota problem

Sven Hartge sven at svenhartge.de
Wed Apr 20 18:26:01 EEST 2011


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

> On 04/20/2011 01:47 PM, Sven Hartge wrote:
>> "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.

> Thank you for your prompt answer.

> Why does dovecot count only the raw size? Does this mean, dict quota is 
> not usable with maildirs? Is this true for sdbox also?

In addition to the answer from Timo:

Counting all meta-data is also very unintuitive for the user. Imagine a
user with an INBOX containing 200,000 mails. This will result in a
_huge_ directory inode for the INBOX folder (about 20MB for XFS). Now he
deletes all those mails and expects a quota usage of 0 bytes. But the
quota is still at 20MB, because the directory inode has not been reduced
by the filesystem.

I guarantee you, you will get numerous support calls.

At least I got them while using filesystem-based quotas.

Grüße,
S°

-- 
Sigmentation fault. Core dumped.



More information about the dovecot mailing list