Realtime system quotas

Version 1.561

Feature
Finished

The nightly tally will add things up, just as it did before, but also store a lower total usage count that excludes the system quotas (but still includes databases, and other non-system-quota items) This then allows DA to count system quotas on the fly (which returns the count very quickly), which can be added to this lower number, for a more accurate usage count for each load of a page in DA. This only applies to the usage shown to the User, while they're logged in. It does not update the Show All Users, or List User pages, nor does it write to their user.usage with the update value. for now, disabled by default to confirm functionality, internal directadmin.conf default: realtime_quota=0 To enable kernel-level quotactl function calls, set it to 2: realtime_quota=2 For more slower binary "quota -v username" calls, use: realtime_quota=1 but for most cases where possible use 2 as it's far quicker without external calls. Note, DA needs the device names to pass to the quotactl call. This is done with the "mount" program, but for efficiency purposes, this is only done once at startup in the master process. This means, if you make any changes to your partitions/quotas, be sure to restart DA to get an updated mount list. Inode counts are also updated in realtime with this turned on. ============== SPECIFIC OS CASES Use realtime_quota=2 when possible FreeBSD often does not have quotas compiled into the kernel, if that's the case, you cannot use 2. However, if that's the case, then you might as well stick with 0, as it's probably a nighly quotacheck cron anyway, so you'd gain nothing from realtime quotas. Tested back to FreeBSD 9, for my cases, 1 was the best that worked. CentOS 5 "quota -v user" does not support "no-wrap" -w, so you must use 2. CentOS 6 is fine for both 1 and 2, but the quota command does not support --show-mntpoint, so DA uses the block device lookup, which should already be cached anyway for the 2 mode. But use 2 for CentOS 6 when possible. Debian 7+ works for both cases. ============== T15016

Interested to try DirectAdmin? Get a 30-day Free Trial!