Daniel Quinlan quinlan@transmeta.com writes:
Brian Tao taob@nbc.netcom.ca writes:
How many lines can I have in /etc/quotas? Is it limited by memory or CPU? Is there a performance hit the more quotas I apply? I may have need for 2000+ user quota entries on an F210 with 256MB read cache.
It must take some memory, but if the data structures are compact, it shouldn't be too much. Using default quotas (see below) makes maintaining /etc/quotas easier, but I doubt it does much to reduce memory usage.
# Quota Target type disk files # ------------- ----- ---- ----- /home tree 80G * user@home 10G
I'm doing some experimenting on this right now - on a loaded 630 i've got a line like this in /etc/quotas :
* user@mail 100M 50
(this is a copy of our mailspool - I will _not_ experiment on a production machine) - a 'quota report' returns approx. 56000 lines - does anybody know what (if any) the limits are ?
From Brian Tao taob@nbc.netcom.ca writes:
How many lines can I have in /etc/quotas? Is it limited by memory or CPU? Is there a performance hit the more quotas I apply? I may have need for 2000+ user quota entries on an F210 with 256MB read cache.
Two thousand quotas isn't many at all.
Each quota uses roughly 100 bytes, which are locked into memory, so 2000 quotas will wire down about 200K of memory. Ketil's 56,000 quotas will wire down about 5.6 MB.
Of this, 32 bytes per quota will be written to disk with each consistency point (every 10 seconds, or whenever NV-RAM fills up). So at 2000 quotas you'll have an extra 64KB per consistency point (barely noticable), and Kitel will have an extra 2 MB. The 2 MB is noticable, but not a big deal on a high-end system. It's only about half of what 2 MB writes over the wire would cost, since there's no protocol processing, only write-side processing.
The CPU overhead of updating the quotas during operation processing is minimal. Haven't seen any difference at all in benchmarking.
If people need super-high numbers of quotas we could optimize further to reduce the amount of locked in memory and the per consistency point I/O, but to date the highest numbers I've heard about have been in the 50-100 thousand range. My GUESS is that quotas would work up to several hundreds of thousands of entries, but that the performance issues would increase as more memory is consumed and more writes occur with each consistency point.
Oh -- and Dan's point was correct. If you use defaults, it isn't the number of lines in /etc/quotas that matters, but the number of quotas actually created.
Dave