Skip to content

A multi level hash based on linux shm, using shmhash, user can put any key-value data in shared memory.

Notifications You must be signed in to change notification settings

shaneyuee/shmhash

Repository files navigation

What is shmhash?

ShmHash is a C++ key-value store implemented with multi-level hash table based on linux shared memory. Using shmhash, one process can store kv data in shmhash so that multiple processes can read the data without locking.(But also note that shmhash is not write-write lock free, if multiple processes are writing to shmhash, one hash to enforece a lock mechanism by himself.)

Features

    1. Built-in cache replacement mechanism.
    1. Store most data at level 1 hashtable to achieve O(1) performance, while the other levels's size degrade very quickly.
    1. Use pre-recycle pool to avoid read-write colision, so that multiple reader processes can read at the same time while the writer process is writing the same key.

Memory structure

image

About

A multi level hash based on linux shm, using shmhash, user can put any key-value data in shared memory.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published