LevelDBRiakSome key-value stores usinglog-structureZhichao LiangRethinkDB
Some key-value stores using log-structure Zhichao Liang LevelDB Riak
RiakLevelDBOutlineWhy log structure?Riak: log-structure hash tableRethinkdb: log-structure b-treeLeveldb: log-structure merge treeConclusionRethinkDB
Outline • Why log structure? • Riak: log-structure hash table • Rethinkdb: log-structure b-tree • Leveldb: log-structure merge tree • Conclusion
RiakLevelDBOutline Why log structure?Riak: log-structure hash tableRethinkdb: log-structure b-treeLeveldb: log-structure merge tree ConclusionRethinkDB
Outline • Why log structure? • Riak: log-structure hash table • Rethinkdb: log-structure b-tree • Leveldb: log-structure merge tree • Conclusion
RiakLevelDBLog Structure. A log-structured file system is a file system design firstproposed in 1988 by John K. Ousterhout and Fred Douglis.Design for high write throughput, all updates to data andmetadataare written sequentiallytoa continuousstreamcalled a log.log-structuredfilesystemConventional file systemstendHard Diskto lay out files with great care forspatial locality and make in-placechanges to their data structuresconventionalfilesystemsRethinkDB
Log Structure • A log-structured file system is a file system design first proposed in 1988 by John K. Ousterhout and Fred Douglis. • Design for high write throughput, all updates to data and metadata are written sequentially to a continuous stream, called a log. • Conventional file systems tend to lay out files with great care for spatial locality and make in-place changes to their data structures
RiakLevelDBLog Structure for SSDRandomwritedegradesthesystemperformanceandshrinksthe lifetime of ssd.Log structureis ssd-friendlynatively!SSDMagneticDiskkblock*blockRAMnew data 1new data1data2data2data 2newdata3data3data3freedata 4freefreefreefreefreeRethinkDB
Log Structure for SSD • Random write degrades the system performance and shrinks the lifetime of ssd. • Log structure is ssd-friendly natively! Magnetic Disk SSD free free free free free free free free free free free free new data 1 data 1 data 2 data 3 data 4 new data 3 block block data 3 data 2 data 1 RAM free free free data 2 erased erased erased new data 1 data 2 data 3 data 3