Quota usage value shows 140% of actual disk usage

Umut Erol Kaçar umutkacar at gmail.com
Tue Feb 28 13:33:50 UTC 2017


You're right, it's the zlib compression. It works as described here:
http://wiki2.dovecot.org/Plugins/Zlib It appends the before-compression
size to the file name like S=<size> and uses them for quota usage
calculation.

So, when I run the following command on a Maildir, the result matches the
value on the database. (size value on the quota table)

find . -type f | grep S= | awk -F, '{ gsub("S=","",$2); SUM+=$2 } END {
print SUM }'

And the compression ratios relate to the difference between actual disk
space usage and calculated quota usage values when I check like this, on a
Maildir:

find . -type f -ls | grep S= | awk -F, '{ gsub("S=","",$2); print $2, $1 }'
| awk '{ print "file: "$12,"\t orig: ",$1," comp.: ",$8," ratio: ",$1 / $8}'

Thanks a lot!

25 Şub 2017 Cmt, 00:07 tarihinde, Karsten Heiken <
heiken at luis.uni-hannover.de> şunu yazdı:

> Am 24.02.2017 um 16:00 schrieb Steffen Kaiser:
> >
> > Quota does not count physical useage, but the amount of bytes allocated
> by the messages. Maildir may hardlink messages, hence, they count multiple
> times for the quota, but once for du.
>
> And in your case dovecot even compressed the mails:
> According to your doveconf, you are using mail_plugins = [...] zlib.
>
> Dovecot's quota is calculated using the uncompressed size, whereas du
> shows you the space actually allocated.
>
>


More information about the dovecot mailing list