Determining db size that quota takes affect?

Does anybody know how to calculate the exact size that the client quota mechanisim uses to determine if a db is over quota?

I’ve tested and found that if a quota is set at a certain size, sometimes it doesn’t take effect until the db is slightly over the quota size. I’m calculating size as db.size * db.percentused.

For example:

db size is < 15 mb

quota is 15 mb

paste some docs

db size is now 18.5 mb @ 82% = 15.2 mb

paste some more docs

db size is now 18.5 @ 84% = 15.5 mb

paste some more docs

db size is now 18.5 @ 85% = 15.7 mb

attempt to paste more docs but get dialog “unable to write to database because database would exceed it’s disk quota”.

Is it possible to determine the exact size at which the quota will take effect (i.e., 15.7 mb)? Also, shouldn’t the quota really take affect at 15 mb?

Thanks in advance for any insight.

Subject: Determining db size that quota takes affect?

I don’t think the size * percent used is the reason the quota isn’t kicking in immediately. Unless there’s some documentation about that I haven’t seen - which is possible. My guess would be more along the lines of the old “how do you measure file size” argument. Here’s documentation I wrote up for my users, which I think will explain:

Scenario:

I have received a warning that my database is 180.9 megs.

If I check the database properties, it says my database is 172 meg.

What gives? Why are these numbers different?

Answer:

To simplify that answer, we can say that one of the programs is “rounding” the numbers…

…not to the nearest 10, but to the nearest 1000 instead of 1024. Here’s how that works:

Kilobyte(KB) - A unit of approximately 1000 bytes (1024 to be exact).

Megabyte (MB) - A unit of approximately one million bytes (1,024 KB to be exact).

Let’s say your file is actually 180355072 bytes.

If one program"A" uses the 1000 division, rather than the 1024 division, it would see it like this:

180355072 bytes = 172MB *1024 (for kb)*1024 (for bytes)

Whereas program"B" using hte complete 1024 (not rounding) will see it like this:

180355072 bytes = 180.355072 *1000 (for kb)*1000 (for bytes)

It may seem like the program which uses the 1000 figure is being inaccurate, and basically you’re right.

But sometimes it is just easier to calculate that way, and the figure is usually close enough for the purpose intended.