Many of us that run large ZFS filesystems have run into this issue. Everything runs great when you first configure the pool. Then, as you start to add data to the pool, into the TB+ range, things seem to get slower. And slower. And slower, everyday. You do a
The reason? /etc/periodic/security/100.chksetuid and /etc/periodic/security/110.chkneggrppem both run massive find processes over all mounted UFS and ZFS filesystems. And these two find processes can take aeons to run, and chew through a lot of RAM while doing it.
I was manually editing the two files above to make them work with my setup. But, then I thought, "Maybe there are others in the same boat." So I've generalised it a bit, and made it fit into the periodic(8) and periodic.conf(5) way of doing things.
The result is 4 new variables that can be added to /etc/periodic.conf to control *exactly* how these two scripts do their scans. Here are the default values, as set in /etc/defaults/periodic.conf:
The default behaviour has not changed. By default, all mounted UFS and ZFS filesystems will be scanned.
If you only want UFS filesystems to be scanned, then just copy the *_fs variables into /etc/periodic.conf and remove the ,zfs part:
Or, if you want to get fancier (maybe you have a root-on-ZFS setup), you can leave the *_fs variables alone, and just put a space-separated list of mountpoints to not scan:
Patch attached. To use it, save it somewhere, then:
If you run into any bugs, let me know. Or, if you have any comments, suggestions, of requests, drop me a line.
[Having technical difficulties with my browser, so will post code below, and upload patch later.]
$ ps ax
to see what's going on, only to find a slew of periodic and find processes running, all churning through your giant ZFS pool.The reason? /etc/periodic/security/100.chksetuid and /etc/periodic/security/110.chkneggrppem both run massive find processes over all mounted UFS and ZFS filesystems. And these two find processes can take aeons to run, and chew through a lot of RAM while doing it.
I was manually editing the two files above to make them work with my setup. But, then I thought, "Maybe there are others in the same boat." So I've generalised it a bit, and made it fit into the periodic(8) and periodic.conf(5) way of doing things.
The result is 4 new variables that can be added to /etc/periodic.conf to control *exactly* how these two scripts do their scans. Here are the default values, as set in /etc/defaults/periodic.conf:
Code:
daily_status_security_chksetuid_fs="ufs,zfs"
daily_status_security_chksetuid_fs_ignore=""
daily_status_security_neggrpperm_fs="ufs,zfs"
daily_status_security_neggrpperm_fs_ignore=""
The default behaviour has not changed. By default, all mounted UFS and ZFS filesystems will be scanned.
If you only want UFS filesystems to be scanned, then just copy the *_fs variables into /etc/periodic.conf and remove the ,zfs part:
Code:
daily_status_security_chksetuid_fs="ufs"
daily_status_security_neggrpperm_fs="ufs"
Or, if you want to get fancier (maybe you have a root-on-ZFS setup), you can leave the *_fs variables alone, and just put a space-separated list of mountpoints to not scan:
Code:
daily_status_security_chksetuid_fs_ignore="/backups /cameras /var/log /usr/ports"
daily_status_security_neggrpperm_fs_ignore="backups"
Patch attached. To use it, save it somewhere, then:
Code:
# cd /etc
# patch -p0 < /path/to/periodic-fs-type.patch
If you run into any bugs, let me know. Or, if you have any comments, suggestions, of requests, drop me a line.
[Having technical difficulties with my browser, so will post code below, and upload patch later.]