[Freeipa-users] nsslapd-dbcachesize and database size
Andrew E. Bruno
aebruno2 at buffalo.edu
Wed Oct 14 14:35:37 UTC 2015
On Wed, Oct 14, 2015 at 07:59:23AM -0600, Rich Megginson wrote:
> On 10/14/2015 07:09 AM, Andrew E. Bruno wrote:
> >The load average on our freeipa replicas started to spike over the
> >last few days and we narrowed it down to a dbcache issue. Following the
> >guidelines here: https://github.com/richm/scripts/wiki/dbmon.sh
> >
> >We saw that the dbcachefree was 2.0% which indicates a lot of page
> >churn. Sure enough our nsslapd-dbcachesize was set to 2G and the size of
> >our database and index files was 3.1G:
> >
> >$ du -sh /var/lib/dirsrv/slapd-[domain]/db/
> >3.1G
> >
> >Once we increased nsslapd-dbcachesize to 6G load average went back to
> >normal and query response times improved. Interestingly, when we
> >restarted the dirsrv process the database size went down to 1.7G
> >
> >$ du -sh /var/lib/dirsrv/slapd-[domain]/db/
> >1.7G
> >
> >When we initially deployed freeipa, the size of our database and indexes
> >was about 400M which is why we set nsslapd-dbcachesize to 2G.
>
> What about your cachememsize?
We have nsslapd-cachememsize set at 2G for the cn=userRoot. According to
dbmon.sh it looked OK and we didn't think it needed to be increased:
dbcachefree 6123847680 free% 95.055 roevicts 0 hit% 99 pagein 34260 pageout 308661
dbname count free free% size
changelog:ent 84 158342 30.9 4210.2
changelog:dn 29716 58 0.0 74.0
userroot:ent 8446 2091021433 97.4 6685.1
userroot:dn 8446 523272268 99.8 120.3
ipaca:ent 100 673516 47.9 7338.6
ipaca:dn 100 1399359 99.4 80.1
The changelog:dn seems to vary so much not sure how to tune that one. Any
suggestions? It's almost always 0% free.
>
> >
> >A few questions:
> >
> >1. What causes the increase in size of
> >/var/lib/dirsrv/slapd-[domain]/db/* and should we periodically clean up?
>
> Replication metadata accounts for some of this. Fragmentation accounts for
> some of this. You can periodically clean up, but you shouldn't have to.
> The growth should eventually hit a plateau.
>
> >
> >2. How do you tune nsslapd-dbcachesize to account for this growth? The
> >dbmon.sh wiki suggests a 12% overhead but our db files and indexes seem
> >to grow much larger?
>
> 12% is sort of a starting point. There isn't a good way to tell how to
> account for replication metadata, fragmentation, etc. Just monitor
> periodically and adjust as needed.
Great, Thanks Rich!
More information about the Freeipa-users
mailing list