[b]leveldb介绍[/b]
[url]http://code.google.com/p/leveldb/[/url]
[url]http://en.wikipedia.org/wiki/LevelDB[/url]
[url]http://highscalability.com/blog/2011/8/10/leveldb-fast-and-lightweight-keyvalue-database-from-the-auth.html[/url]
[url]http://news.ycombinator.com/item?id=2526032[/url]
[url]http://basho.com/blog/technical/2011/07/01/Leveling-the-Field/[/url]
[url]http://blog.yufeng.info/archives/1327[/url]
[url]http://www.slideshare.net/sunzhidong/google-leveldb-study-discuss[/url]
[b]leveldb官方文档[/b]
[url]http://leveldb.googlecode.com/svn/trunk/doc/index.html[/url]
[url]http://leveldb.googlecode.com/svn/trunk/doc/benchmark.html[/url]
[url]http://leveldb.googlecode.com/svn/trunk/doc/impl.html[/url]
[url]http://leveldb.googlecode.com/svn/trunk/doc/table_format.txt[/url]
[url]http://leveldb.googlecode.com/svn/trunk/doc/log_format.txt[/url]
[b]leveldb内部实现和源码解析[/b]
[url]http://blog.xiaoheshang.info/?cat=26[/url]
[url]http://rdc.taobao.com/blog/cs/?p=1378[/url]
[url]http://www.cnblogs.com/haippy/archive/2011/12/04/2276064.html[/url]
[b]bigtable/mapreduce/gfs/lsm-tree/skiplist论文[/b]
[url]http://blademaster.ixiezi.com/2010/03/27/bigtable:一个分布式的结构化数据存储系统中文版/[/url]
[url]http://blademaster.ixiezi.com/2010/03/27/google-mapreduce中文版/[/url]
[url]http://blademaster.ixiezi.com/2010/03/27/the-google-file-system中文版/[/url]
[url]http://staff.ustc.edu.cn/~jpq/paper/flash/1996-The%20Log-Structured%20Merge-Tree%20%28LSM-Tree%29.pdf[/url]
[url]http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.15.9072&rep=rep1&type=pdf[/url]
[b]Tair ldb[/b]
[url]http://rdc.taobao.com/blog/cs/?p=1394[/url]
[url]http://code.taobao.org/p/tair/wiki/index/[/url]
[url]http://code.taobao.org/p/tair/src/branches/ldb/src/storage/ldb/[/url]
[b]相关资料[/b]
[url]http://www.quora.com/What-is-an-SSTable-in-Googles-internal-infrastructure[/url]
[url]http://www.ningoo.net/html/tag/dynamo[/url]
[url]http://wiki.apache.org/cassandra/MemtableSSTable[/url]
[url]http://wiki.apache.org/cassandra/ArchitectureSSTable[/url]
[url]http://en.wikipedia.org/wiki/Queuing_theory[/url]
[url]http://rdc.taobao.com/team/jm/archives/1344[/url]
[b]Notes[/b]
[b]leveldb的Write/Delete: [/b]
DB::Put/Delete(DB::Open时*dbptr = impl) => DBImpl::Write => (1) 写log: log_->AddRecord (2) 写memtable: WriteBatchInternal::InsertInto(updates, mem_)
[b]leveldb的Get: [/b]
DBImpl::Get => (1) 查memtable: mem->Get (2) 查immutable memtable: imm->Get (3) 查文件 versions_->current() => current->Get => Version::Get
[b]leveldb的Compaction: [/b]
leveldb在Open/Get/Write时都有可能做Compaction: DB::Open/DBImpl::Get/DBImpl::Write(DBImpl::MakeRoomForWrite) =>DBImpl::MaybeScheduleCompaction => env_->Schedule(&DBImpl::BGWork, this) => (1) 启后台线程 PosixEnv::Schedule (2) DBImpl::BGWork => DBImpl::BackgroundCall => DBImpl::BackgroundCompaction
[b]leveldb的多线程写: [/b]
DBImpl::Write的瓶颈在AcquireLoggingResponsibility,多线程写同一个db时互相竞争logger_,性能反而没有单写线程快. 所以为了scale,对leveldb做sharding,将key做hash后分到多个db,这样多线程读写不会相互竞争,经测试 num_threads : num_dbs为1:1时性能最好,充分利用多核
[b]leveldb的性能调优: [/b]
通过sharding/batch writes/increase block_size(size per data block, default 4KB)/increase block_cache(LRUCache, default 8MB)/increase write_buffer_size(memtable size, default 4MB)来提高性能,经过测试,单机24-core采用16 threads/16 shards/1000 batch_sizes/block_size 8K/write_buffer_size 32MB能达到70w+ ops/sec的写性能
[url]http://code.google.com/p/leveldb/[/url]
[url]http://en.wikipedia.org/wiki/LevelDB[/url]
[url]http://highscalability.com/blog/2011/8/10/leveldb-fast-and-lightweight-keyvalue-database-from-the-auth.html[/url]
[url]http://news.ycombinator.com/item?id=2526032[/url]
[url]http://basho.com/blog/technical/2011/07/01/Leveling-the-Field/[/url]
[url]http://blog.yufeng.info/archives/1327[/url]
[url]http://www.slideshare.net/sunzhidong/google-leveldb-study-discuss[/url]
[b]leveldb官方文档[/b]
[url]http://leveldb.googlecode.com/svn/trunk/doc/index.html[/url]
[url]http://leveldb.googlecode.com/svn/trunk/doc/benchmark.html[/url]
[url]http://leveldb.googlecode.com/svn/trunk/doc/impl.html[/url]
[url]http://leveldb.googlecode.com/svn/trunk/doc/table_format.txt[/url]
[url]http://leveldb.googlecode.com/svn/trunk/doc/log_format.txt[/url]
[b]leveldb内部实现和源码解析[/b]
[url]http://blog.xiaoheshang.info/?cat=26[/url]
[url]http://rdc.taobao.com/blog/cs/?p=1378[/url]
[url]http://www.cnblogs.com/haippy/archive/2011/12/04/2276064.html[/url]
[b]bigtable/mapreduce/gfs/lsm-tree/skiplist论文[/b]
[url]http://blademaster.ixiezi.com/2010/03/27/bigtable:一个分布式的结构化数据存储系统中文版/[/url]
[url]http://blademaster.ixiezi.com/2010/03/27/google-mapreduce中文版/[/url]
[url]http://blademaster.ixiezi.com/2010/03/27/the-google-file-system中文版/[/url]
[url]http://staff.ustc.edu.cn/~jpq/paper/flash/1996-The%20Log-Structured%20Merge-Tree%20%28LSM-Tree%29.pdf[/url]
[url]http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.15.9072&rep=rep1&type=pdf[/url]
[b]Tair ldb[/b]
[url]http://rdc.taobao.com/blog/cs/?p=1394[/url]
[url]http://code.taobao.org/p/tair/wiki/index/[/url]
[url]http://code.taobao.org/p/tair/src/branches/ldb/src/storage/ldb/[/url]
[b]相关资料[/b]
[url]http://www.quora.com/What-is-an-SSTable-in-Googles-internal-infrastructure[/url]
[url]http://www.ningoo.net/html/tag/dynamo[/url]
[url]http://wiki.apache.org/cassandra/MemtableSSTable[/url]
[url]http://wiki.apache.org/cassandra/ArchitectureSSTable[/url]
[url]http://en.wikipedia.org/wiki/Queuing_theory[/url]
[url]http://rdc.taobao.com/team/jm/archives/1344[/url]
[b]Notes[/b]
[b]leveldb的Write/Delete: [/b]
DB::Put/Delete(DB::Open时*dbptr = impl) => DBImpl::Write => (1) 写log: log_->AddRecord (2) 写memtable: WriteBatchInternal::InsertInto(updates, mem_)
[b]leveldb的Get: [/b]
DBImpl::Get => (1) 查memtable: mem->Get (2) 查immutable memtable: imm->Get (3) 查文件 versions_->current() => current->Get => Version::Get
[b]leveldb的Compaction: [/b]
leveldb在Open/Get/Write时都有可能做Compaction: DB::Open/DBImpl::Get/DBImpl::Write(DBImpl::MakeRoomForWrite) =>DBImpl::MaybeScheduleCompaction => env_->Schedule(&DBImpl::BGWork, this) => (1) 启后台线程 PosixEnv::Schedule (2) DBImpl::BGWork => DBImpl::BackgroundCall => DBImpl::BackgroundCompaction
[b]leveldb的多线程写: [/b]
DBImpl::Write的瓶颈在AcquireLoggingResponsibility,多线程写同一个db时互相竞争logger_,性能反而没有单写线程快. 所以为了scale,对leveldb做sharding,将key做hash后分到多个db,这样多线程读写不会相互竞争,经测试 num_threads : num_dbs为1:1时性能最好,充分利用多核
[b]leveldb的性能调优: [/b]
通过sharding/batch writes/increase block_size(size per data block, default 4KB)/increase block_cache(LRUCache, default 8MB)/increase write_buffer_size(memtable size, default 4MB)来提高性能,经过测试,单机24-core采用16 threads/16 shards/1000 batch_sizes/block_size 8K/write_buffer_size 32MB能达到70w+ ops/sec的写性能