GitXplorerGitXplorer
x

foundationdb-block-device

public
0 stars
1 forks
0 issues

Commits

List of commits on branch master.
Unverified
0e3f79cbf47267a09795370ef86226f557a98912

wording fix

mmeln1k committed 6 years ago
Unverified
59afc7d6abcc39f8ffda23e911ceb9f6859d4a03

got rid of race condition

mmeln1k committed 6 years ago
Unverified
4c9b52908a037e6359d0ec6270851cc0db101d91

bugfix and more benchmarks

mmeln1k committed 6 years ago
Unverified
b8c82b2d9178fd476a88c8433372ee6d021881ff

added parallel writes

mmeln1k committed 6 years ago
Unverified
d30a68738331e7e1a8a515780a67f798d7b48671

added delete command

mmeln1k committed 6 years ago
Unverified
5ffaeb26736c4e8b156735b064f02873d9779186

added block size config and list cli command

mmeln1k committed 6 years ago

README

The README file for this repository.

FoundationDB Block Device

Replicated Block Device backed by FoundationDB

What is this

This is an implementation of a block device in userspace which uses FoundationDB as a backend. It provides a replicated block device for non-replicated workloads so they can benefit from transparent block-level replication and enhanced fault tolerance.

Inspired by spullara/nbd

Is it fast?

I did a small benchmark using a FoundationDB cluster of 2 nodes (linux running on macbooks with SSDs, not tuned for FDB at all). FIO benchmark on 1GB file resulted in 10K random read/write IOPS in 4KB blocks and the latency was below 10ms (direct io was used). While doing sequential reads it was able to saturate 1Gbit network link.

Postrgres running in virtualbox showed 900 TPS on TPC-B pgbench workload with a database of size 1g.

Current status

It's a prototype. There are several important featues which are not implemented yet (such as fencing and volume size estimation) but it works and it's relatively fast!

How to use

Commands are documented in the CLI:

$ ./fdbbd --help
NAME:
   fdbbd - block device using FoundationDB as a backend. 
   Our motto: still more performant and reliable than EBS

USAGE:
   fdbbd [global options] command [command options] [arguments...]

VERSION:
   0.1.0

COMMANDS:
     create   Create a new volume
     list     List all volumes
     attach   Attach the volume
     delete   Delete the volume
     help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --help, -h     show help
   --version, -v  print the version

Getting started

  1. Set up a FoundationDB cluster.
  2. Build the driver:
sh build.sh
  1. Create a new volume:
$ ./fdbbd create --size 1GB myvolume
  1. If nbd kernel module is not loaded, load it:
$ sudo modprobe nbd
  1. Attach the volume to the system:
sudo ./fdbbd attach --bpt 4 myvolume /dev/nbd0
  1. Create a directory to mount the volume:
mkdir nbdmount
  1. Create a file system on your block device. XFS is a good option:
sudo mkfs.xfs /dev/nbd0
  1. Mount the attached volume:
sudo mount /dev/nbd0 nbdmount/
  1. Done! You have a replicated volume!

What's inside

This project uses Network Block Device kernel module underneath. A unix pipe is used to talk to a kernel, and then driver translates NBD protocol into FoundationDB calls.

Roadmap

There are a few features planned in future releases, ordered by importance:

  1. Fencing every FDB transaction to protect block devices from being shared
  2. IOPS isolation
  3. CSI implementation
  4. Snapshots
  5. Volume size estimation (using roaring bitmaps or similar)
  6. Client-side encryption
  7. Control panel