mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-02-13 15:54:04 -05:00
Turn off readahead on main mmap
It's harmful when the DB is larger than RAM.
This commit is contained in:
parent
d74330128a
commit
b1da555c4c
1 changed files with 2 additions and 0 deletions
|
|
@ -2870,6 +2870,8 @@ mdb_env_open2(MDB_env *env)
|
|||
env->me_map = NULL;
|
||||
return ErrCode();
|
||||
}
|
||||
/* Turn off readahead. It's harmful when the DB is larger than RAM. */
|
||||
posix_madvise(env->me_map, env->me_mapsize, POSIX_MADV_RANDOM);
|
||||
#endif
|
||||
|
||||
if (newenv) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue