From ec60831827cf3dfefae12be21673b8b41a0965f2 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Sat, 12 Oct 2013 16:25:33 -0700 Subject: [PATCH] ITS#7725 add nordahead envflag --- doc/man/man5/slapd-mdb.5 | 10 +++++++++- servers/slapd/back-mdb/config.c | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/doc/man/man5/slapd-mdb.5 b/doc/man/man5/slapd-mdb.5 index aba30cabfd..180dd521af 100644 --- a/doc/man/man5/slapd-mdb.5 +++ b/doc/man/man5/slapd-mdb.5 @@ -54,7 +54,7 @@ A separate directory must be specified for each database. The default is .BR LOCALSTATEDIR/openldap\-data . .TP -\fBenvflags \fR{\fBnosync\fR,\fBnometasync\fR,\fBwritemap\fR,\fBmapasync\fR} +\fBenvflags \fR{\fBnosync\fR,\fBnometasync\fR,\fBwritemap\fR,\fBmapasync\fR,\fBnordahead\fR} Specify flags for finer-grained control of the LMDB library's operation. .RS .TP @@ -94,6 +94,14 @@ has not been set. It also has no effect if .I nosync is set. .RE +.RS +.TP +.B nordahead +Turn off file readahead. Usually the OS performs readahead on every read +request. This usually boosts read performance but can be harmful to +random access read performance if the system's memory is full and the DB +is larger than RAM. This option is not implemented on Windows. +.RE .TP \fBindex \fR{\fI\fR|\fBdefault\fR} [\fBpres\fR,\fBeq\fR,\fBapprox\fR,\fBsub\fR,\fI\fR] diff --git a/servers/slapd/back-mdb/config.c b/servers/slapd/back-mdb/config.c index 81f37cf660..84224df29d 100644 --- a/servers/slapd/back-mdb/config.c +++ b/servers/slapd/back-mdb/config.c @@ -104,6 +104,7 @@ static slap_verbmasks mdb_envflags[] = { { BER_BVC("nometasync"), MDB_NOMETASYNC }, { BER_BVC("writemap"), MDB_WRITEMAP }, { BER_BVC("mapasync"), MDB_MAPASYNC }, + { BER_BVC("nordahead"), MDB_NORDAHEAD }, { BER_BVNULL, 0 } }; -- 2.39.2