Change the config to use a lsm tree rather than btree for tables.

Stop using direct_io as it forces operations to sync more often, slowing
things down, at the expense of double-buffering (this will use more RAM).
This commit is contained in:
Gregory Burd 2013-03-08 13:33:12 -05:00 committed by Steve Vinoski
parent c6eac27ea7
commit 789c44b133

View file

@ -103,25 +103,25 @@ start(Partition, Config) ->
{create, true},
{logging, 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"]}],
{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),
Table = "lsm:wt" ++ integer_to_list(Partition),
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, "200MB"},
{lsm_bloom_config, [{leaf_page_max, "10MB"}]} ],
{leaf_page_max, "256K"},
{lsm_chunk_size, "256MB"},
{lsm_bloom_config, [{leaf_page_max, "16MB"}]} ],
ok = wterl:session_create(SRef, Table, wterl:config_to_bin(SessionOpts)),
{ok, #state{conn=ConnRef,
table=Table,