On 2013-12-19 16:46, Michael Ströder wrote:
So when monitoring OpenLDAP with back-mdb it would be interesting to see how much space of configured olcDbMaxSize is already occupied.
Does it make sense to compare the real file size shown by du -h /path/to/data.mdb to configured olcDbMaxSize?
That would depend on the filesystem supporting holes in files, which sounds OS- and filesystem-dependent.
The fill ratio is (MDB_envinfo.me_last_pgno + 1.0) * MDB_stat.ms_psize / MDB_envinfo.me_mapsize from mdb_env_info() and mdb_env_stat(). Inconvenient formula though. Oh well.