quota warning problem - Is it a bug of cyrus imap?

John A. Tamplin jtampli at sph.emory.edu
Mon Jul 7 20:20:28 EDT 2003


Quoting Joe Rhett <jrhett at isite.net>:
  
> I doubt (I may be wrong) that the idea was to round everything -- just the
> actual quota.  So calculate each message normally and then round the total
> to k to compare against the quota.
> 
> Since the error of margin could be 1/2 k, with 1 million users you could 
> possibly end up using 500mb more space than you intended if they were all
> overquota and at the top of the margin of error.  I doubt this counts as a
> significant problem.

Currently there are two numbers stored -- the amount of the quota and the
current usage.  If you store the current usage rounded to kB, then your error is
as much as +-512 bytes per message.  Multiply by millions of messages processed,
and you have a serious problem, especially if it happens that most of your
messages are of similar size.  Also, the quota is incrementally updated, so when
a message is deleted the size is subtracted from the amount used.

If you don't round the current total, then you haven't accomplished anything
since the number doesn't fit in 32 bits.

The easiest solution is also the clearly correct one -- just use more bits to
store the quota and current usage per quota root.

-- 
John A. Tamplin
Unix System Administrator




More information about the Info-cyrus mailing list