测试工具使用basho_bench
github地址: https://github.com/basho/basho_bench

测试集群共四台X86PC
CPU:Intel(R) Core(TM)2 Duo CPU     E7500
Mem:4G
SATA:500G
system:Ubuntu Server X64
Riak Version:1.0

一Bitcask
Bitcask config:
{dead_bytes_merge_trigger, 134217728},
{dead_bytes_threshold, 67108864},
{small_file_threshold, 20971520}

bench配置与结果
测试1
benchmark.config:
{duration, 30}.
{concurrent, 100}.
{operations, [{put, 1}, {get, 1}]}.
ThroughPut Result: Max Op/Sec 10000
----------------------------------------------------------------------------------------------------------------------------------------------
测试2
benchmark.config:
{duration, 30}.
{concurrent, 100}.
{operations, [{get, 1}]}.

ThroughPut Result: Max Op/Sec 24000
------------------------------------------------------------------------------------------------------------------------------------------------
测试3
benchmark.config:
{duration, 30}.
{concurrent, 100}.
{operations, [{put, 1}]}.

ThroughPut Result: Max Op/Sec 8000
------------------------------------------------------------------------------------------------------------------------------------------

二LevelDB

leveldb
LevelDB config:
    {write_buffer_size, 33554432},
    {max_open_files, 100},
    {block_size, 32768},
    {cache_size, 33554432}

bench配置与结果:
测试1:
Benchmark.config:
{duration, 10}.
{concurrent, 100}.
{operations, [{get, 1}, {put, 1}]}.

ThroughPut Result:Max Op/Sec 11000
-----------------------------------------------------------------------------------------------------------------------------------------
测试2:
{duration, 10}.
{concurrent, 100}.
{operations, [{put, 1}]}.

ThroughPut Result:Max Op/Sec 9000
-----------------------------------------------------------------------------------------------------------------------------------------
测试3:
{duration, 10}.
{concurrent, 100}.
{operations, [{get, 1}]}.

ThroughPut Result:Max Op/Sec 16000
--------------------------------------------------------------------------------------------------------------------------------------

从上面的结果可以看出bitcask的get要比leveldb要快,leveldb的put要比bitcask要快,但是bitcask的不足是把所有的key都放到内存里面,数据的增长与内存的消耗成正比。

由于这4台PC使用的都是百兆网卡,所以测试还不够完善