Better/new FS Quota system

Hi Jamie & CO

We have found that on reboot on machine with a lot (more than 50) users with many files the machine boot takes like forever. So we check what is it doing so much time and that was

==================
Enabling local filesystem quotas:
==================

After some research we found that webmin uses very old quota system which check every file to calculate the quota. When the number of files arise the boot time arises and for us it is more than 10 minutes. As I said a lot of users and files.

Also we found that there is new quota system which work on jurnaling file systems like ext3 and ext4 which all modern Linux distributions use. It use the jurnal rather than the files to calculate the quotas. The commands for management and quota checks are the same but it take seconds for:

==================
Enabling local filesystem quotas:
==================

when booting. And probably the whole file system will be faster with it.

So to use the new quota system the only thing you need to change is the way it is enabled in the fstab.

instead of add: grpquota,usrquota

you need to add: usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0

For a new installation there is noting more to change.

If someone need to migrate from the old system to the new after changing this in fstab will need a reboot and

===============
# quotaoff -a
# quotacheck -avugm
# quotaon -avug
===============

So the change will be very easy but the benefits are much faster reboots (less downtime) and faster file system.

here are some links on the topic

https://wiki.archlinux.org/index.php/disk_quota#Journaled_quota
http://muse.oneshot.in/?p=86

Sadly redhat/centos did not update their documents for years and there is the old method only. But we have tested it and it is working as the old mode but faster.

Status: 
Closed (fixed)

Comments

Howdy -- thanks for your well written suggestion!

I'll make sure Jamie sees this.

Just two quick questions though, what is the output of these two commands on your server now that you've made those updates:

uname -a
mount

Interesting, I didn't know about this new journalling quota system! I will look into what it takes to add support for it in Webmin / Virtualmin.

uname -a: 2.6.32-642.1.1.el6.x86_64 #1 SMP Tue May 31 21:57:07 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

mount: /dev/mapper/vg_s3-vg_s3_root on / type ext4 (rw,noatime) proc on /proc type proc (rw) sysfs on /sys type sysfs (rw) devpts on /dev/pts type devpts (rw,gid=5,mode=620) tmpfs on /dev/shm type tmpfs (rw) /dev/sda1 on /boot type ext4 (rw) /dev/mapper/vg_s3-vg_s3_home on /home type ext4 (rw,noatime,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0) none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw) sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)

The next release of Webmin will support journalling quotas.

Status: Active ยป Fixed