I could see some stats from mdb-stat tool as mentioned below,
mdb_stat.exe -rne "C:\openldap\mdb\data.mdb"
Environment Info
Map address: 0000000000000000
Map size: 268435456 (we have set the value as 104,857,600,000,000 in mdb.c and back_mdb.h files, but it has taken only 256 MB, not sure why?)
Page size: 4096
Max pages: 65536
Number of pages used: 65527
Last transaction ID: 9555
Max readers: 126
Number of readers used: 0
Reader Table Status
(no active readers)
when i try to increase to set the dbMaxSize it fails,
addDbMaxSize.ldif has content as mentioned below,
dn: olcDatabase={1}mdb,cn=config
changetype: modify
add: olcDbMaxSize
olcDbMaxSize: 1073741824
olcDbMaxSize: 1073741824 - stops the service in windows
openldap
\bin>ldapmodify -H ldaps://localhost:6565 -D cn=admin,cn=config -w d -f addDbMaxSize.ldif
modifying entry "olcDatabase={1}mdb,cn=config"
ldap_modify: Other (e.g., implementation specific) error (80)
additional info: failed to reopen database, rc=87
olcDbMaxSize: 536870912 - failed as below
openldap
\bin>ldapmodify -H ldaps://localhost:6565 -D cn=admin,cn=config -w d -f addDbMaxSize.ldif
modifying entry "olcDatabase={1}mdb,cn=config"
ldap_modify: Invalid syntax (21)
additional info: olcDbMaxSize: value #0 invalid per syntax
back-mdb.h - we added as below
#define DEFAULT_MAPSIZE (10 * 10 * 10 * 10 * 10 * 10 * 10 * 10 * 1048576)
mdb.c - we added as below
#define DEFAULT_MAPSIZE (10 * 10 * 10 * 10 * 10 * 10 * 10 * 10 * 1048576)
if ((i = mdb_env_read_header(env, &meta)) != 0) {
if (i != ENOENT)
return i;
DPUTS("new mdbenv");
newenv = 1;
env->me_psize = env->me_os_psize;
if (env->me_psize > MAX_PAGESIZE)
env->me_psize = MAX_PAGESIZE;
memset(&meta, 0, sizeof(meta));
mdb_env_init_meta0(env, &meta);
meta.mm_mapsize = DEFAULT_MAPSIZE;
} else {
env->me_psize = meta.mm_psize;
}
1. i am not getting why the size of the map (as per the stats info given above) - 256 MB (268435456) only ? please provide me a clue once to understand this.
2. Kindly let me know how to get debug logs ? i use DPRINTF, DPUT in mdb.c but dint get see as logs printed.!
We observed this in Windows 2012 R2 and Window10 OS x64 Arch machines.
Regards,
Vijay Kumar