Managing large application state easily, resiliently, and with high performance is one of the hardest problems in the cloud today. The FASTER project offers two artifacts to help tackle this problem.

  • FASTER Log is a high-performance concurrent persistent recoverable log, iterator, and random reader library in C#. It supports very frequent commit operations at low latency, and can quickly saturate disk bandwidth. It supports both sync and async interfaces, handles disk errors, and supports checksums. Learn more about using the FASTER Log in C# here.

  • FASTER KV is a concurrent key-value store + cache (available in C# and C++) that is designed for point lookups and heavy updates. FASTER supports data larger than memory, by leveraging fast external storage (local or cloud). It also supports consistent recovery using a new checkpointing technique that lets applications trade-off performance for commit latency. Learn more about the FASTER KV in C# here. For the FASTER C++ port, check here.

Key Features

  1. Latch-free cache-optimized index, in FASTER KV.
  2. A fast persistent recoverable append-only log based on fine-grained epoch protection for concurrency, in FASTER Log.
  3. Unique “hybrid record log” design in FASTER KV, that combines the above log with in-place updates, to shape the memory working set and retain performance.
  4. Architecture as a component that can be embedded in multi-threaded cloud apps.
  5. Asynchronous non-blocking recovery model based on group commit.
  6. A rich extensible storage device abstraction called IDevice, with implementations for local storage, cloud storage, tiered storage, and sharded storage.

For standard benchmarks where the working set fits in main memory, we found FASTER KV to achieve significantly higher throughput than current systems, and match or exceed the performance of pure in-memory data structures while offering more functionality. See our research papers for more details. We also have a detailed analysis of C# FASTER KV performance in a wiki page here. The performance of the C# and C++ versions of FASTER is very similar. FASTER Log is also extremely fast, capable of saturating modern NVMe SSDs using less than a core of CPU, and scaling well in a multi-threaded setting.

News and Updates

  • We now support variable-length keys and values in FasterKV C# via Memory<byte> and more generally Memory<T> where T : unmanaged as key/value/input types. We also added a new type called SpanByte to represent variable-length keys and values. See the sample here for details on these capabilities. This is in addition to the existing object-log support for class types.

  • We support C# async in FASTER KV (and FASTER Log). See the guides for FasterKV and FasterLog for more information. Also, check out the samples here.

Getting Started

Thanks to Minimal Mistakes for their amazing website theme.

Embedded key-value store sample

public static void Main()
{
  using var log = Devices.CreateLogDevice("hlog.log"); // backing storage device
  using var store = new FasterKV<long, long>(1L << 20, // hash table size (number of 64-byte buckets)
     new LogSettings { LogDevice = log } // log settings (devices, page size, memory size, etc.)
     );

  // Create a session per sequence of interactions with FASTER
  using var s = store.NewSession(new SimpleFunctions<long, long>());
  long key = 1, value = 1, input = 10, output = 0;
  
  // Upsert and Read
  s.Upsert(ref key, ref value);
  s.Read(ref key, ref output);
  Debug.Assert(output == value);
  
  // Read-Modify-Write (add input to value)
  s.RMW(ref key, ref input);
  s.RMW(ref key, ref input);
  s.Read(ref key, ref output);
  Debug.Assert(output == value + 20);
}