TL;DR
This paper investigates the optimal placement of data compression within Solid State Drives (SSDs) for Online Transaction Processing (OLTP) workloads. The authors demonstrate that embedding compression directly into the SSD's firmware significantly outperforms host-level compression in terms of performance, endurance, and storage efficiency, especially for highly compressible data.
What Problem Does This Paper Address?
As SSDs become ubiquitous, their inherent limitations, such as finite endurance (limited write cycles per cell) and the overhead of garbage collection, become critical concerns. Data compression offers a promising solution to mitigate these issues by reducing the amount of data written to the flash memory. However, the question of where to implement this compression – at the application level, the file system level, or within the SSD's firmware – is crucial. Host-level compression (application/file system) can leverage application-specific knowledge for better compression ratios, but it introduces inefficiencies due to the fixed-size interfaces between storage layers. Conversely, intra-SSD compression can directly manage the physical storage layout, potentially avoiding these inefficiencies but lacking application-level context. This paper aims to resolve this by evaluating different compression placement strategies and intra-SSD compression schemes for OLTP workloads, which are particularly sensitive to storage performance and endurance.
Methods
The authors propose and evaluate several intra-SSD compression schemes, comparing them against host-level compression (file system and database). Their intra-SSD schemes include:
- Chunk-Based Scheme: Compresses fixed-size groups of Logical Block Addresses (LBAs) into a single chunk.
- Binpacking: Accumulates compressed LBAs and attempts to pack them into a single flash page, with variations for ordering.
- Re-ordering Scheme: An enhancement to binpacking that aggressively reorders compressed LBAs to improve compression effectiveness and reduce padding.
- Compaction Scheme: Writes compressed LBAs sequentially to flash, allowing a compressed LBA to span two physical pages, minimizing unused space.
The evaluation environment is built upon the VSSIM SSD emulator, integrated with a QEMU virtual machine. They also leverage the TPC-C benchmark, modified to generate data with varying compressibility levels (HighComp, MedComp, LowComp) to simulate realistic database workloads. Performance is measured by flash read/write accesses per transaction and transactions per second.
Datasets
The primary dataset used is a modified version of the TPC-C benchmark, which generates data with controlled compressibility levels (HighComp: 82%, MedComp: 70%, LowComp: 63%). This is a synthetic dataset designed to mimic OLTP workloads. The authors also mention testing on a 10GB real-life database containing Computer Science university student data, which achieved a compression ratio of 76%.
Key Insights and Ideas
- Intra-SSD Compression Reigns Supreme: The most significant finding is that embedding compression directly within the SSD's firmware (Flash Translation Layer - FTL) yields superior results compared to host-level compression (file system or database). This is attributed to the SSD's direct control over physical storage, avoiding the inefficiencies introduced by fixed-size interfaces between host and device.
- The Trade-off of Context vs. Control: While higher layers (application/file system) have more context about data (e.g., grouping related data), they lack the fine-grained control over physical storage that the SSD possesses. Intra-SSD compression leverages this control to optimize data placement and minimize overheads.
- Re-ordering Scheme as a Sweet Spot: Among the intra-SSD schemes, the "re-ordering scheme" (re-bp) emerges as a strong contender, offering a good balance between compression effectiveness, wear leveling, and RAM usage. It outperforms simpler binpacking and chunk-based methods.
- Compaction for Minimal Waste: The "compaction scheme" excels at minimizing wasted space within flash pages, leading to better storage utilization, though it can incur slightly higher read amplification.
- OLTP Workloads are Highly Compressible: The paper confirms that database content, particularly for OLTP workloads, is generally highly compressible, making compression a very effective strategy for improving SSD performance and endurance.
Key Results
- Performance Improvement: Intra-SSD compression schemes, particularly re-ordering and compaction, significantly reduce flash read/write accesses per transaction compared to host-level compression. For example, file-system compression offered up to 6x more transactions per second than no compression, but intra-SSD compression further improved upon this.
- Endurance Benefits: By reducing writes, intra-SSD compression directly contributes to increased SSD endurance. The paper shows that some schemes can reduce flash writes by up to 64% for highly compressible data.
- Storage Footprint: The re-ordering scheme generally achieves the best compression gain (storage reduction), while the chunk-based scheme performs the worst due to padding.
- Host-Level Compression Drawbacks: MySQL's built-in compression showed a 30-50% decrease in transactions per second and worse write performance compared to host-level compression with ext4, highlighting the inefficiencies of host-level approaches for OLTP.
- Hardware Requirements: While intra-SSD compression requires dedicated hardware, the paper suggests that schemes like compaction and re-ordering allow for less powerful and cheaper compression hardware compared to chunk-based methods, which demand higher decompression throughput.
Limitations and Future Work
- Hardware Resource Constraints: The evaluation assumed unlimited compression and decompression resources. In real-world SSDs, these are limited by cost, power, and size. The paper acknowledges that while current OLTP workloads might be manageable with weaker hardware, higher transaction rates on advanced SSDs would necessitate more powerful compression hardware.
- Synthetic Workload: While the TPC-C benchmark was modified for compressibility, it remains a synthetic workload. Future work could explore a wider range of real-world OLTP datasets and workloads.
- Garbage Collection Impact: The paper notes that garbage collection writes are not fully accounted for in compression throughput figures, which could add further penalty, especially for schemes that re-compress data during GC.
- Future Directions: The authors suggest further exploration of intra-SSD compression schemes, potentially combining aspects of different approaches, and investigating their impact on other types of workloads beyond OLTP. They also highlight the need for efficient hardware implementations that balance performance and cost.
Summary updated