mdbx: alter defaults for MDBX_opt_rp_augment_limit and MDBX_opt_txn_dp_limit runtime options.

Change-Id: I08cdbfb18089a3fed4b32d931ca4423027a9939f
This commit is contained in:
Leonid Yuriev 2021-01-22 23:15:08 +03:00
parent b1a2892038
commit dc34041600
2 changed files with 4 additions and 6 deletions

6
mdbx.h
View File

@ -1849,8 +1849,7 @@ enum MDBX_option_t {
* growth, or/and to the inability of put long values.
*
* The `MDBX_opt_rp_augment_limit` controls described limit for the current
* process. Default is 1048576, i.e. 2**20. This is sure enough for databases
* up to 4Gb with 4K page size. */
* process. Default is 262144, it is usually enough for most cases. */
MDBX_opt_rp_augment_limit,
/** \brief Controls the in-process limit to grow a list of
@ -1878,8 +1877,7 @@ enum MDBX_option_t {
* spill to disk instead.
*
* The `MDBX_opt_txn_dp_limit` controls described threshold for the current
* process. Default is 1048576, i.e. 2**20. This is sure enough for databases
* up to 4Gb with 4K page size. */
* process. Default is 65536, it is usually enough for most cases. */
MDBX_opt_txn_dp_limit,
/** \brief Controls the in-process initial allocation size for dirty pages

View File

@ -9922,8 +9922,8 @@ __cold int mdbx_env_create(MDBX_env **penv) {
env->me_stuck_meta = -1;
env->me_options.dp_reserve_limit = 1024;
env->me_options.rp_augment_limit = 1024 * 1024;
env->me_options.dp_limit = 1024 * 1024;
env->me_options.rp_augment_limit = 256 * 1024;
env->me_options.dp_limit = 64 * 1024;
if (env->me_options.dp_limit > MAX_PAGENO - NUM_METAS)
env->me_options.dp_limit = MAX_PAGENO - NUM_METAS;
env->me_options.dp_initial = MDBX_PNL_INITIAL;