9.6. Mounting the SSSD cache in tmpfs
The System Security Services Daemon (SSSD) constantly writes LDAP objects to its cache. These internal SSSD transactions write data to disk, which is much slower than reading and writing from Random-Access Memory (RAM).
To improve this performance, mount the SSSD cache in RAM.
Before you begin, consider the following:
- Cached information does not persist after a reboot if the SSSD cache is in RAM.
- It is safe to perform this change on IdM servers, as the SSSD instance on an IdM server cannot lose connectivity with the Directory Server on the same host.
- If you perform this adjustment on an IdM client and it loses connectivity to IdM servers, users will not be able to authenticate after a reboot until you reestablish connectivity.
Prerequisites
-
You need
rootpermissions to edit the/etc/fstabconfiguration file.
Procedure
Create a
tmpfstemporary filesystem:Confirm that the SSSD user owns the
config.ldbfile:# ls -al /var/lib/sss/db/config.ldb -rw-------. 1 *sssd sssd* 1286144 Jun 8 16:41 /var/lib/sss/db/config.ldbAdd the following entry to the
/etc/fstabfile as a single line:tmpfs /var/lib/sss/db/ tmpfs size=300M,mode=0700,uid=sssd,gid=sssd,rootcontext=system_u:object_r:sssd_var_lib_t:s0 0 0
This example creates a 300MB cache. Tune the
sizeparameter according to your IdM and AD directory size, estimating 100 MBs per 10,000 LDAP entries.Mount the new SSSD cache directory.
[root@host ~]# mount /var/lib/sss/db/Restart SSSD to reflect this configuration change.
[root@host ~]# systemctl restart sssd