Quanah Gibson-Mount wrote: > > > --On Thursday, September 10, 2020 10:40 AM +0200 Frédéric Goudal > <[email protected]> wrote: > >> Hello, >> >> As I understand mdb database should be in memory.
No. The database lives on disk. >> Is there a way to calculate the correct amount of memory that should be >> allocated to a server so the database fit with no swap ? LMDB databases never cause swapping, never use swap space. >> I guess the >> maxsize attribute should be set to a correct value too.. > The MDB maxsize value should be something you never anticipate hitting. I > usually default to 80GB, but you want the value to something under the size > of the > partition (i.e., you don't want the DB to grow larger than could be stored). > The DB size can be obtained from a du -c -h data.mdb, Yes. > so you want to have more > than enough memory to hold that amount. No. The amount of RAM is really irrelevant, only the disk space matters. We routinely test with databases over 50x larger than RAM... -- -- Howard Chu CTO, Symas Corp. http://www.symas.com Director, Highland Sun http://highlandsun.com/hyc/ Chief Architect, OpenLDAP http://www.openldap.org/project/
