problem with large quotas

Ken Murchison ken at oceana.com
Thu Apr 7 10:18:23 EDT 2005


Sebastian Hagedorn wrote:
> Hi,
> 
> --On 5. April 2005 12:21:41 Uhr -0400 Ken Murchison <ken at oceana.com> wrote:
> 
>>>> Yes, both the quota limit and quota usage are limited to 32-bits.  
>>>> Cyrus
>>>> 2.3 uses 64-bits (long long int) on systems that support it.
>>>
>>>
>>>
>>> I wonder if this is still true for 2.2.10. I set my quota to 3 GBs and
>>> it seems to work OK:
>>>
>>> cyrus.rrz.uni-koeln.de> sq user/a0620 3000000
>>> quota:3000000
>>> cyrus.rrz.uni-koeln.de> lq user/a0620
>>> STORAGE 297144/3000000 (9.9048%)
>>> [cyrus at lvr13 imap]$ quota user/a0620
>>>   Quota  % Used    Used Root
>>> 3000000       9  297163 user/a0620
>>>
>>> Am I missing something?
>>
>>
>> The limit is measured in Kbytes where the usage is measured in bytes. So,
>> while you can theoretically set the limit to 2TB (2GB * 1KB), the usage
>> is still limited to 2GB (32 bits).  Did I explain this clearly? Reading
>> it myself, I'm not sure I did.  ;)
> 
> 
> I'm glad you wrote that, because I'm not sure I understand ;-) I get the 
> difference between limit and usage. What I don't get is when precisely 
> this becomes an issue. If I've got a limit > 2 GB all usages up to 2 GB 
> should be OK, because neither value overflows its variable, right?

That is also my understanding.


> If the usage goes over the 2 GB limit, I assume it would roll over? So the 
> worst case scenario would be that quotas > 2GB equal no quota!?

Yes, the usage would overflow.  I'm not sure how the overflow will be 
seen by the client/server.  I'd have to check the code.

> 
> But this analysis does not mesh with the following statement:
> 
>>>> I set a user to have a 10 gigabyte quota and the user was treated as
>>>> being  over-quota with just 10 megabytes.
> 
> 
> How does that happen? Is it that the difference between limit and usage 
> is measured in bytes and is also 32 bits? That might explain it ...

This doesn't make sense to me.  Perhaps the person that reported this 
didn't realize that the limit is set in Kbytes, not bytes, and somehow 
messed up their math.


-- 
Kenneth Murchison     Oceana Matrix Ltd.
Software Engineer     21 Princeton Place
716-662-8973 x26      Orchard Park, NY 14127
--PGP Public Key--    http://www.oceana.com/~ken/ksm.pgp
---
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html




More information about the Info-cyrus mailing list