From f002df18443926b679bdae5193dc3344213639f4 Mon Sep 17 00:00:00 2001 From: Gregory Burd Date: Tue, 4 Dec 2012 14:27:47 -0500 Subject: [PATCH] Update default configuration settings for WiredTiger when used as a backend to better match their benchmark settings. --- src/riak_kv_wterl_backend.erl | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/src/riak_kv_wterl_backend.erl b/src/riak_kv_wterl_backend.erl index b85e242..58ece8b 100644 --- a/src/riak_kv_wterl_backend.erl +++ b/src/riak_kv_wterl_backend.erl @@ -99,11 +99,28 @@ start(Partition, Config) -> case AppStart of ok -> 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} -> Table = "table:wt" ++ integer_to_list(Partition), - {ok, SRef} = wterl:session_open(ConnRef), - ok = wterl:session_create(SRef, Table), + SessionOpenOpts = [{isolation, "snapshot"}], + {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, table=Table, session=SRef,