Commit a32b0d6d authored by Daniel Salzman's avatar Daniel Salzman

configure: add config DB and timer DB mapsize options

parent 57b592bc
......@@ -388,6 +388,19 @@ AS_IF([test "$have_lmdb" != "no"],[
])
AM_CONDITIONAL([HAVE_LMDB], test "$have_lmdb" != "no")
# LMDB mapping sizes
conf_mapsize=500
AC_ARG_WITH([conf_mapsize],
AC_HELP_STRING([--with-conf-mapsize=NUM], [Configuration DB mapsize in MiB [default=500]]),
[conf_mapsize=$withval])
AC_DEFINE_UNQUOTED([CONF_MAPSIZE], [$conf_mapsize], [Configuration DB mapsize.])
timer_mapsize=100
AC_ARG_WITH([timer_mapsize],
AC_HELP_STRING([--with-timer-mapsize=NUM], [Timer DB mapsize in MiB [default=100]]),
[timer_mapsize=$withval])
AC_DEFINE_UNQUOTED([TIMER_MAPSIZE], [$timer_mapsize], [Timer DB mapsize.])
AS_IF([test "$enable_daemon" = "yes"],[
dnl Check for rosedb module
......
......@@ -185,7 +185,7 @@ int conf_new(
// Set the DB api.
out->api = knot_db_lmdb_api();
struct knot_db_lmdb_opts lmdb_opts = KNOT_DB_LMDB_OPTS_INITIALIZER;
lmdb_opts.mapsize = 500 * 1024 * 1024;
lmdb_opts.mapsize = CONF_MAPSIZE * 1024 * 1024;
lmdb_opts.flags.env = KNOT_DB_LMDB_NOTLS;
// Open the database.
......
......@@ -152,6 +152,7 @@ int open_timers_db(const char *path, knot_db_t **timer_db)
}
struct knot_db_lmdb_opts opts = KNOT_DB_LMDB_OPTS_INITIALIZER;
opts.mapsize = TIMER_MAPSIZE * 1024 * 1024;
opts.path = path;
return db_api->init(timer_db, NULL, &opts);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment