From bb2d2877c47fc770113f6fe336b93d52ab515862 Mon Sep 17 00:00:00 2001 From: Leonid Yuriev Date: Sat, 9 Nov 2019 00:05:30 +0300 Subject: [PATCH] mdbx: add auto-readahead note/description. Change-Id: Ie425416fd1afe9092b73acae4a7e3cdb5c3d8168 --- mdbx.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mdbx.h b/mdbx.h index 41eeb6a9..ca388dfd 100644 --- a/mdbx.h +++ b/mdbx.h @@ -973,6 +973,12 @@ LIBMDBX_API const char *mdbx_dump_val(const MDBX_val *key, char *const buf, * may help random read performance when the DB is larger than RAM and system * RAM is full. * + * By default libmdbx dynamically enables/disables readahead depending on the + * actual database size and currently available memory. On the other hand, such + * automation has some limitation, i.e. could be performed only when DB size + * changing but can't tracks and reacts changing a free RAM availability, since + * it changes independently and asynchronously. + * * NOTE: The mdbx_is_readahead_reasonable() function allows to quickly find out * whether to use readahead or not based on the size of the data and the * amount of available memory.