static struct db_param db_param = {
NULL, /* Volume dirpath */
1, /* bdb logfile autoremove */
- 256 * 1024, /* bdb cachesize (256 MB) */
- 5000, /* maxlocks */
- 5000, /* maxlockobjs */
+ 64 * 1024, /* bdb cachesize (64 MB) */
+ DEFAULT_MAXLOCKS, /* maxlocks */
+ DEFAULT_MAXLOCKOBJS, /* maxlockobjs */
-1, /* not used ... */
-1,
"",
const char *tmpdb_path = NULL;
/* Set cachesize for in-memory rebuild db */
- db_param.cachesize = 256 * 1024 * 1024; /* 128 MB */
+ db_param.cachesize = 128 * 1024; /* 128 MB */
+ db_param.maxlocks = DEFAULT_MAXLOCKS;
+ db_param.maxlockobjs = DEFAULT_MAXLOCKOBJS;
/* Make it accessible for all funcs */
dbd = dbd_ref;
#define DB_PARAM_FN "db_param"
#define MAXKEYLEN 64
-#define DEFAULT_LOGFILE_AUTOREMOVE 1
-#define DEFAULT_CACHESIZE (8 * 1024) /* KB, so 8 MB */
-#define DEFAULT_MAXLOCKS 5000
-#define DEFAULT_MAXLOCKOBJS 5000
-#define DEFAULT_FLUSH_FREQUENCY 1000
-#define DEFAULT_FLUSH_INTERVAL 1800
-#define DEFAULT_USOCK_FILE "usock"
-#define DEFAULT_FD_TABLE_SIZE 512
-#define DEFAULT_IDLE_TIMEOUT (10 * 60)
-
static struct db_param params;
static int parse_err;
#include <sys/param.h>
#include <sys/cdefs.h>
+#define DEFAULT_LOGFILE_AUTOREMOVE 1
+#define DEFAULT_CACHESIZE (8 * 1024) /* KB, so 8 MB */
+#define DEFAULT_MAXLOCKS 5000
+#define DEFAULT_MAXLOCKOBJS 5000
+#define DEFAULT_FLUSH_FREQUENCY 1000
+#define DEFAULT_FLUSH_INTERVAL 1800
+#define DEFAULT_USOCK_FILE "usock"
+#define DEFAULT_FD_TABLE_SIZE 512
+#define DEFAULT_IDLE_TIMEOUT (10 * 60)
+
struct db_param {
char *dir;
int logfile_autoremove;