Kangaroo: A new flash cache optimized for tiny objects

What the research is:  Kangaroo is a new flash cache that enables more efficient caching of tiny objects (objects that are ~100 bytes or less) and overcomes the challenges presented by existing fla…

Sathya Gunasekar
6 min readintermediate
--
View Original

Overview

Kangaroo is a new flash cache designed to efficiently cache tiny objects, specifically those around 100 bytes or less. It minimizes DRAM usage and write overhead while introducing a novel cache eviction policy that significantly reduces cache misses compared to existing flash cache designs.

What You'll Learn

1

How to implement Kangaroo through CacheLib's API for customized caching services

2

Why Kangaroo reduces cache misses by 29 percent compared to previous designs

3

When to use Kangaroo for caching tiny objects in large-scale systems

Prerequisites & Requirements

  • Understanding of caching concepts and flash memory
  • Familiarity with CacheLib(optional)

Key Questions Answered

What are the advantages of using Kangaroo for caching tiny objects?
Kangaroo provides significant advantages by reducing DRAM usage and write overhead, which allows for efficient caching of tiny objects. It achieves a 29 percent reduction in cache misses compared to traditional flash cache designs, making it ideal for large-scale applications that handle numerous small data items.
How does Kangaroo improve upon existing flash cache designs?
Kangaroo improves upon existing designs by combining log-structured and set-associative cache strategies to minimize both DRAM and flash-write overheads. This innovative approach allows it to handle tiny objects more effectively, reducing write amplification and enhancing overall cache performance.
What is the impact of Kangaroo on production workloads?
Kangaroo was evaluated using traces from production social graph caching workloads at Facebook and Twitter, demonstrating a 29 percent reduction in cache misses under realistic system constraints. This indicates its effectiveness in real-world applications and its potential to alleviate load on back-end storage systems.
What is the new cache eviction policy introduced by Kangaroo?
Kangaroo introduces a new cache eviction policy that proactively evicts objects from KLog to KSet to minimize write amplification. This policy ensures that multiple objects can be written together, significantly reducing the overall write overhead per object, which is crucial for caching tiny objects efficiently.

Key Statistics & Figures

Reduction in cache misses
29 percent
This statistic is based on evaluations using production workloads at Facebook and Twitter.
Write amplification in set-associative caches
~40x
Set-associative caches write significantly more bytes than necessary when handling tiny objects.
KLog capacity
~5 percent of flash
This small capacity allows Kangaroo to efficiently index its entire capacity with minimal DRAM.

Technologies & Tools

Backend
Cachelib
Kangaroo is implemented within CacheLib, allowing developers to build customized cache services.

Key Actionable Insights

1
Implement Kangaroo in your caching strategy to optimize performance for tiny objects.
By leveraging Kangaroo's unique design, you can reduce cache misses and improve data retrieval times, especially in applications dealing with numerous small data items.
2
Evaluate the impact of Kangaroo on your existing caching systems using production workload traces.
Conducting such evaluations can provide insights into performance improvements and help justify the transition to Kangaroo for better efficiency.
3
Consider the DRAM and write overheads when designing caching solutions for tiny objects.
Understanding these factors will help you choose the right caching strategy and avoid common pitfalls associated with traditional flash cache designs.

Common Pitfalls

1
Over-reliance on traditional flash cache designs for tiny objects can lead to inefficiencies.
Many existing designs either require excessive DRAM or result in high write amplification, which can degrade performance and shorten the lifespan of flash devices.

Related Concepts

Caching Strategies For Tiny Objects
Flash Memory Performance Optimization
Log-structured Vs. Set-associative Caches