[go: up one dir, main page]

DBDB.io The Encyclopedia of Database Systems · Est. 2017
Database of Databases

Database Entry

Pebble: Version Comparison


Logo v1 logo v2 logo
Description
Pebble is a key-value store written in Go and developed by Cockroach Labs. It is based on an unfinished [Go port of LevelDB](https://github.com/golang/leveldb). Furthermore, additional features and optimizations are inspired by parts of [RocksDB](/db/rocksdb). Pebble is specifically created to suit the needs of [CockroachDB](/db/cockroachdb) - some features from RocksDB are modified, while others are completely left out. A few examples of modified features include using offsets instead of pointers in the skiplist, and changing the rate of flushes to match user writes.
  1. https://github.com/cockroachdb/pebble
Pebble is a key-value store written in Go and developed by Cockroach Labs. It is based on an unfinished [Go port of LevelDB](https://github.com/golang/leveldb). Furthermore, additional features and optimizations are inspired by parts of [RocksDB](/db/rocksdb). Pebble is specifically created to suit the needs of [CockroachDB](/db/cockroachdb) - some features from RocksDB are modified, while others are completely left out. A few examples of modified features include using offsets instead of pointers in the skiplist, and changing the rate of flushes to match user writes.
  1. https://github.com/cockroachdb/pebble
History
The project started in 2018 as a replacement for [RocksDB](/db/rocksdb) running inside of [CockroachDB](/db/cockroachdb).
  1. https://github.com/cockroachdb/pebble
The project started in 2018 as a replacement for [RocksDB](/db/rocksdb) running inside of [CockroachDB](/db/cockroachdb).
  1. https://github.com/cockroachdb/pebble
Start Year 2018
  1. https://github.com/petermattis/pebble/commit/562651f570228de4eae2fc4f22d5c52ebd5ad7d4
2018
  1. https://github.com/petermattis/pebble/commit/562651f570228de4eae2fc4f22d5c52ebd5ad7d4
End Year
Twitter URL
Countries United States of America United States of America
Former Names
Website URL https://github.com/petermattis/pebble https://github.com/petermattis/pebble
Docs URL https://github.com/petermattis/pebble/tree/master/docs https://github.com/petermattis/pebble/tree/master/docs
Source Repo URL https://github.com/petermattis/pebble https://github.com/petermattis/pebble
Blog URL
Wikipedia URL
Tags
Licenses
BSD License
BSD License
Operating Systems
Governance
Project Types
Open Source
Open Source
Supported Languages
Go
Go
Written In
Go
Go
Coding Agents
Developer Orgs
Cockroach Labs
Cockroach Labs
Derived From
Embedded Systems
Inspired By
LevelDB RocksDB
LevelDBRocksDB
Compatible With
LevelDB RocksDB
LevelDBRocksDB
Hosted Services
Acquisitions
Checkpoints
Compression
Concurrency Control
Deterministic Concurrency Control
  1. https://github.com/cockroachdb/pebble/blob/master/docs/rocksdb.md#commit-pipeline
Deterministic Concurrency Control
Pebble achieves concurrency during its commit pipeline, by using a 'commit queue'. In order to commit a batch, Pebble must first write the batch to its WAL and then add it to a memtable. The commit queue allows Pebble to synchronize writes to the WAL first. Then batches can be concurrently added to their memtables.
  1. https://github.com/cockroachdb/pebble/blob/master/docs/rocksdb.md#commit-pipeline
Data Model
Key-Value
Pebble uses two types of keys - user keys suited for the user API and 'Internal Keys' which are composed of the user key, a sequence number, and a value signifying the key type. The Internal Key type is used, since the LSM tree requires versioning with keys.
  1. https://github.com/cockroachdb/pebble/blob/master/docs/rocksdb.md#internal-keys
Key-Value
Pebble uses two types of keys - user keys suited for the user API and 'Internal Keys' which are composed of the user key, a sequence number, and a value signifying the key type. The Internal Key type is used, since the LSM tree requires versioning with keys.
  1. https://github.com/cockroachdb/pebble/blob/master/docs/rocksdb.md#internal-keys
Foreign Keys
Not Supported
Not Supported
Hardware Acceleration
Indexes
Log-Structured Merge Tree
Pebble uses a LSM tree to store writes. All records are stored in batches, which in turn are stored in in-memory memtables and sstables. To support indexing, there is a separate skiplist implementation based on RocksDB. It stores offsets to the records within their batch in order to perform reads. Furthermore, batches themselves are transformed into levels of the LSM tree (with temp sequence numbers set to be the most recent sequence).
  1. https://github.com/cockroachdb/pebble/blob/master/docs/rocksdb.md#indexed-batches
Log-Structured Merge Tree
Pebble uses a LSM tree to store writes. All records are stored in batches, which in turn are stored in in-memory memtables and sstables. To support indexing, there is a separate skiplist implementation based on RocksDB. It stores offsets to the records within their batch in order to perform reads. Furthermore, batches themselves are transformed into levels of the LSM tree (with temp sequence numbers set to be the most recent sequence).
  1. https://github.com/cockroachdb/pebble/blob/master/docs/rocksdb.md#indexed-batches
Isolation Levels
Joins
Not Supported
Not Supported
Logging
Physiological Logging
Pebble uses a write-ahead logging (WAL) infrastructure. Batches are first written to the WAL, and then inserted into a memtable. Pebble purposefully maps each WAL file to a memtable.
  1. https://github.com/cockroachdb/pebble/blob/master/docs/rocksdb.md#commit-pipeline
Physiological Logging
Pebble uses a write-ahead logging (WAL) infrastructure. Batches are first written to the WAL, and then inserted into a memtable. Pebble purposefully maps each WAL file to a memtable.
  1. https://github.com/cockroachdb/pebble/blob/master/docs/rocksdb.md#commit-pipeline
Parallel Execution
Query Compilation
Query Execution
Tuple-at-a-Time Model
Tuple-at-a-Time Model
Query Interface
Custom API
Pebble emulates the custom RocksDB API for querying keys/values.
  1. https://github.com/cockroachdb/pebble/blob/master/docs/rocksdb.md#internal-keys
Custom API
Pebble emulates the custom RocksDB API for querying keys/values.
  1. https://github.com/cockroachdb/pebble/blob/master/docs/rocksdb.md#internal-keys
Storage Architecture
Disk-oriented
Pebble primarily uses sstables on disk which store various things such as internal keys/values and range tombstone deletions. It also has memtables, which temporarily store committed records before they are written to a sstable.
  1. https://github.com/cockroachdb/pebble/blob/master/docs/rocksdb.md#indexed-batches
Disk-oriented
Pebble primarily uses sstables on disk which store various things such as internal keys/values and range tombstone deletions. It also has memtables, which temporarily store committed records before they are written to a sstable.
  1. https://github.com/cockroachdb/pebble/blob/master/docs/rocksdb.md#indexed-batches
Storage Model
N-ary Storage Model (Row/Record)
N-ary Storage Model (Row/Record)
Storage Organization
Log-structured
Log-structured
Stored Procedures
System Architecture
Embedded
Embedded
Views