Coder Social home page Coder Social logo

hansonzhao007 / wipdb Goto Github PK

View Code? Open in Web Editor NEW
4.0 3.0 6.0 57.25 MB

WipDB: A Write-in-place Key-value Store

Jupyter Notebook 4.04% Shell 1.25% CMake 0.49% C++ 80.15% C 1.55% HTML 0.59% Makefile 0.50% M4 0.13% CSS 0.01% Ruby 0.02% Python 1.44% PHP 0.11% Perl 1.34% PowerShell 0.08% Java 7.98% Dockerfile 0.01% JavaScript 0.02% Assembly 0.08% SCSS 0.22%
kv-store lsm paper

wipdb's Introduction

Introduction

Key-value (KV) stores have become a major storage infrastructure on which databases, file systems, and other data management systems are built. To support efficient indexing and range search, the key-value items must be sorted. However, the operation can be excessively expensive. In the KV systems adopting the popular Log-Structured Merge Tree (LSM) structure or its variants, the write volume can be amplified by tens of times due to its repeated internal merge-sorting operations.

In this paper we propose a KV store design that leverages relatively stable key distributions to bound the write amplification by a number as low as 4.15 in practice. The key idea is, instead of incrementally sorting KV items in the LSM's hierarchical structure, it writes KV items right in place in an approximately sorted list, much like a bucket sort algorithm does. The design also makes it possible to keep most internal data reorganization operations off the critical paths of read service. The so-called Write-in-place (Wip) scheme has been implemented with its source code publically available. Experimental results show that WipDB improves write throughput by 3X to 8X (to around 1 Mops/s) over state-of-the-art KV stores.

For more details about WipDB, please refer to IEEE ICDE 2021 paper - "WipDB: A Write-in-place Key-value Store that Mimics Bucket Sort"

Environment Configuration

  1. cmake version 3.10.2
  2. install googletest, gflags, snappy

Compile

  1. edit the config.sh file, mount the target disks
  2. run build.sh to compile all the four key-value stores

Debug

...can not be used when making a shared object; recompile with -fPIC cmake with option cmake -DBUILD_SHARED_LIBS=ON ..

Run test bench

modify the test bench file in folder test_bench and run.

Other

Folder "kv" contains the source code of WipDB.

wipdb's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

wipdb's Issues

Concurrency Issues

I used YCSB to generate trace file firstly, then load the workload in memory and split for 4 threads. The 4 threads execute YCSB-A (mixed read/write) concurrently and Segmentation fault occurs. If I changed the hashtable-based memtable to skiplist-based memtable, WipDB can run successfully. If set skiplistrep = false, there exists some concurrency issues.

I used gdb to trace the stack and found that the errors are mainly from assert in method (VersionSet::SetLastSequence and compare method invoked by NULL object).

std::vector<ArrayNode> pool_ in Memtable seems like not thread-safe.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.