Update default configuration settings for WiredTiger when used as a backend to better match their benchmark settings.

This commit is contained in:
Gregory Burd 2012-12-04 14:27:47 -05:00
parent 6a47c89acd
commit f002df1844

View file

@ -99,11 +99,28 @@ start(Partition, Config) ->
case AppStart of case AppStart of
ok -> ok ->
ok = filelib:ensure_dir(filename:join(DataRoot, "x")), ok = filelib:ensure_dir(filename:join(DataRoot, "x")),
case wterl_conn:open(DataRoot, Config) of ConnectionOpts = [Config,
{loging, true},
{transactional, true},
{direct_io, ["data", "log"]},
{session_max, 128},
{cache_size, "2GB"},
{sync, false},
{verbose, ["block", "shared_cache", "ckpt", "evict",
"evictserver", "fileops", "hazard", "lsm",
"mutex", "read", "readserver", "reconcile",
"salvage", "verify", "write"]}],
case wterl_conn:open(DataRoot, ConnectionOpts) of
{ok, ConnRef} -> {ok, ConnRef} ->
Table = "table:wt" ++ integer_to_list(Partition), Table = "table:wt" ++ integer_to_list(Partition),
{ok, SRef} = wterl:session_open(ConnRef), SessionOpenOpts = [{isolation, "snapshot"}],
ok = wterl:session_create(SRef, Table), {ok, SRef} = wterl:session_open(ConnRef, wterl:config_to_bin(SessionOpenOpts)),
SessionOpts = [%TODO: {block_compressor, "snappy"}
{internal_page_max, "128K"},
{leaf_page_max, "128K"},
{lsm_chunk_size, "128MB"},
{lsm_bloom_config, [{leaf_page_max, "8MB"}]} ],
ok = wterl:session_create(SRef, Table, wterl:config_to_bin(SessionOpts)),
{ok, #state{conn=ConnRef, {ok, #state{conn=ConnRef,
table=Table, table=Table,
session=SRef, session=SRef,