Initial Load Tests with results
Initial tests run comparing throughput when first populating and then loading data into levelled and eleveledb. The tests were run in series, populating first and then loading. The population tests were run again in-between to try and add a roughly even underlying volume into the stores. The initial tests were run on on a quad core iMac with 8GB of RAM and a fusion drive. Due to the limited footprint of the hardware, the number of concurrent database instances was reduced to 12, rather than the 32 in the off0the-shelf leveldb test.
This commit is contained in:
parent
0fc1a20f27
commit
67a9f5bae6
9 changed files with 177 additions and 0 deletions
21
test/volume/examples/eleveldb_load.config
Normal file
21
test/volume/examples/eleveldb_load.config
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
{mode, max}.
|
||||||
|
|
||||||
|
{duration, 30}.
|
||||||
|
|
||||||
|
{concurrent, 24}.
|
||||||
|
|
||||||
|
{driver, basho_bench_driver_eleveldb}.
|
||||||
|
|
||||||
|
{key_generator, {int_to_bin_bigendian,{uniform_int, 1000000}}}.
|
||||||
|
|
||||||
|
{value_generator, {fixed_bin, 8000}}.
|
||||||
|
|
||||||
|
{operations, [{get, 5}, {put, 1}]}.
|
||||||
|
|
||||||
|
%% the second element in the list below (e.g., "../../public/eleveldb") must
|
||||||
|
%% point to the relevant directory of a eleveldb installation
|
||||||
|
{code_paths, ["../eleveldb/ebin"]}.
|
||||||
|
|
||||||
|
{eleveldb_dir, "/tmp/eleveldb.bench"}.
|
||||||
|
{eleveldb_num_instances, 12}.
|
||||||
|
|
21
test/volume/examples/eleveldb_pop.config
Normal file
21
test/volume/examples/eleveldb_pop.config
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
{mode, max}.
|
||||||
|
|
||||||
|
{duration, 30}.
|
||||||
|
|
||||||
|
{concurrent, 24}.
|
||||||
|
|
||||||
|
{driver, basho_bench_driver_eleveldb}.
|
||||||
|
|
||||||
|
{key_generator, {int_to_bin_bigendian,{partitioned_sequential_int, 10000000}}}.
|
||||||
|
|
||||||
|
{value_generator, {fixed_bin, 8000}}.
|
||||||
|
|
||||||
|
{operations, [{put, 1}]}.
|
||||||
|
|
||||||
|
%% the second element in the list below (e.g., "../../public/eleveldb") must
|
||||||
|
%% point to the relevant directory of a eleveldb installation
|
||||||
|
{code_paths, ["../eleveldb/ebin"]}.
|
||||||
|
|
||||||
|
{eleveldb_dir, "/tmp/eleveldb.bench"}.
|
||||||
|
{eleveldb_num_instances, 12}.
|
||||||
|
|
21
test/volume/examples/eleveleddb_load.config
Normal file
21
test/volume/examples/eleveleddb_load.config
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
{mode, max}.
|
||||||
|
|
||||||
|
{duration, 30}.
|
||||||
|
|
||||||
|
{concurrent, 24}.
|
||||||
|
|
||||||
|
{driver, basho_bench_driver_eleveleddb}.
|
||||||
|
|
||||||
|
{key_generator, {int_to_bin_bigendian,{uniform_int, 1000000}}}.
|
||||||
|
|
||||||
|
{value_generator, {fixed_bin, 8000}}.
|
||||||
|
|
||||||
|
{operations, [{get, 5}, {put, 1}]}.
|
||||||
|
|
||||||
|
%% the second element in the list below (e.g., "../../public/eleveldb") must
|
||||||
|
%% point to the relevant directory of a eleveldb installation
|
||||||
|
{code_paths, ["../eleveleddb/_build/default/lib/eleveleddb/ebin"]}.
|
||||||
|
|
||||||
|
{eleveleddb_dir, "/tmp/eleveleddb.bench"}.
|
||||||
|
{eleveleddb_num_instances, 12}.
|
||||||
|
|
21
test/volume/examples/eleveleddb_pop.config
Normal file
21
test/volume/examples/eleveleddb_pop.config
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
{mode, max}.
|
||||||
|
|
||||||
|
{duration, 30}.
|
||||||
|
|
||||||
|
{concurrent, 24}.
|
||||||
|
|
||||||
|
{driver, basho_bench_driver_eleveleddb}.
|
||||||
|
|
||||||
|
{key_generator, {int_to_bin_bigendian,{partitioned_sequential_int, 10000000}}}.
|
||||||
|
|
||||||
|
{value_generator, {fixed_bin, 8000}}.
|
||||||
|
|
||||||
|
{operations, [{put, 1}]}.
|
||||||
|
|
||||||
|
%% the second element in the list below (e.g., "../../public/eleveldb") must
|
||||||
|
%% point to the relevant directory of a eleveleddb installation
|
||||||
|
{code_paths, ["../eleveleddb/_build/default/lib/eleveleddb/ebin"]}.
|
||||||
|
|
||||||
|
{eleveleddb_dir, "/tmp/eleveleddb.bench"}.
|
||||||
|
{eleveleddb_num_instances, 12}.
|
||||||
|
|
BIN
test/volume/output/leveldb_load.png
Normal file
BIN
test/volume/output/leveldb_load.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 316 KiB |
BIN
test/volume/output/leveldb_pop.png
Normal file
BIN
test/volume/output/leveldb_pop.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 315 KiB |
BIN
test/volume/output/leveled_load.png
Normal file
BIN
test/volume/output/leveled_load.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 333 KiB |
BIN
test/volume/output/leveled_pop.png
Normal file
BIN
test/volume/output/leveled_pop.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 274 KiB |
93
test/volume/src/basho_bench_driver_eleveleddb.erl
Normal file
93
test/volume/src/basho_bench_driver_eleveleddb.erl
Normal file
|
@ -0,0 +1,93 @@
|
||||||
|
%% -------------------------------------------------------------------
|
||||||
|
%%
|
||||||
|
%% Copyright (c) 2015 Basho Techonologies
|
||||||
|
%%
|
||||||
|
%% This file is provided to you under the Apache License,
|
||||||
|
%% Version 2.0 (the "License"); you may not use this file
|
||||||
|
%% except in compliance with the License. You may obtain
|
||||||
|
%% a copy of the License at
|
||||||
|
%%
|
||||||
|
%% http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
%%
|
||||||
|
%% Unless required by applicable law or agreed to in writing,
|
||||||
|
%% software distributed under the License is distributed on an
|
||||||
|
%% "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
%% KIND, either express or implied. See the License for the
|
||||||
|
%% specific language governing permissions and limitations
|
||||||
|
%% under the License.
|
||||||
|
%%
|
||||||
|
%% -------------------------------------------------------------------
|
||||||
|
|
||||||
|
%% Raw eleveldb driver. It opens a number of eleveldb instances and assigns
|
||||||
|
%% one to each created worker in round robin fashion. So, for example, creating
|
||||||
|
%% 32 instances and 64 concurrent workers would bind a pair of workers to
|
||||||
|
%% each instance for all operations.
|
||||||
|
-module(basho_bench_driver_eleveleddb).
|
||||||
|
|
||||||
|
-export([new/1,
|
||||||
|
run/4]).
|
||||||
|
|
||||||
|
-include("basho_bench.hrl").
|
||||||
|
|
||||||
|
-record(state, {
|
||||||
|
instance
|
||||||
|
}).
|
||||||
|
|
||||||
|
get_instances() ->
|
||||||
|
case basho_bench_config:get(eleveleddb_instances, undefined) of
|
||||||
|
undefined ->
|
||||||
|
Instances = start_instances(),
|
||||||
|
?INFO("Instances started ~w~n", [Instances]),
|
||||||
|
basho_bench_config:set(eleveleddb_instances, Instances),
|
||||||
|
Instances;
|
||||||
|
Instances ->
|
||||||
|
Instances
|
||||||
|
end.
|
||||||
|
|
||||||
|
|
||||||
|
start_instances() ->
|
||||||
|
BaseDir = basho_bench_config:get(eleveleddb_dir, "."),
|
||||||
|
Num = basho_bench_config:get(eleveleddb_num_instances, 1),
|
||||||
|
?INFO("Starting up ~p eleveleddb instances under ~s .\n",
|
||||||
|
[Num, BaseDir]),
|
||||||
|
Refs = [begin
|
||||||
|
Dir = filename:join(BaseDir, "instance." ++ integer_to_list(N)),
|
||||||
|
?INFO("Opening eleveleddb instance in ~s\n", [Dir]),
|
||||||
|
{ok, Ref} = leveled_bookie:book_start(Dir, 2000, 500000000),
|
||||||
|
Ref
|
||||||
|
end || N <- lists:seq(1, Num)],
|
||||||
|
list_to_tuple(Refs).
|
||||||
|
|
||||||
|
new(Id) ->
|
||||||
|
Instances = get_instances(),
|
||||||
|
Count = size(Instances),
|
||||||
|
Idx = ((Id - 1) rem Count) + 1,
|
||||||
|
?INFO("Worker ~p using instance ~p.\n", [Id, Idx]),
|
||||||
|
State = #state{instance = element(Idx, Instances)},
|
||||||
|
{ok, State}.
|
||||||
|
|
||||||
|
|
||||||
|
run(get, KeyGen, _ValueGen, State = #state{instance = Ref}) ->
|
||||||
|
Key = KeyGen(),
|
||||||
|
case leveled_bookie:book_get(Ref, "PerfBucket", Key, o) of
|
||||||
|
{ok, _Value} ->
|
||||||
|
{ok, State};
|
||||||
|
not_found ->
|
||||||
|
{ok, State};
|
||||||
|
{error, Reason} ->
|
||||||
|
{error, Reason}
|
||||||
|
end;
|
||||||
|
run(put, KeyGen, ValGen, State = #state{instance = Ref}) ->
|
||||||
|
Key = KeyGen(),
|
||||||
|
Value = ValGen(),
|
||||||
|
case leveled_bookie:book_put(Ref, "PerfBucket", Key, Value, []) of
|
||||||
|
ok ->
|
||||||
|
{ok, State};
|
||||||
|
pause ->
|
||||||
|
timer:sleep(1000),
|
||||||
|
{ok, State};
|
||||||
|
{error, Reason} ->
|
||||||
|
{error, Reason}
|
||||||
|
end.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue