OptCon: An Adaptable SLA-Aware Consistency Tuning Framework for Quorum-Based Stores

Subhajit Sidhanta, Wojciech M. Golab, Supratik Mukhopadhyay, Saikat Basu

TL;DR

This paper introduces OptCon, a novel machine learning framework that automatically tunes client-centric consistency levels in quorum-based distributed datastores. OptCon predicts the optimal consistency setting on a per-operation basis to meet user-defined Service Level Agreements (SLAs) for latency and staleness, adapting dynamically to changing workloads and network conditions.

What Problem Does This Paper Address?

Distributed datastores like Cassandra, Riak, and Voldemort offer various client-centric consistency levels for read and write operations. Choosing the right consistency level is crucial because it directly impacts the trade-off between operation latency and data staleness. However, this choice is complex for developers due to several factors:

  • The Latency-Staleness Trade-off: Weaker consistency generally leads to lower latency but higher staleness (older data), while stronger consistency offers fresher data at the cost of increased latency.
  • Dynamic System Conditions: Latency and staleness are not static; they depend heavily on real-time factors like the current workload (read/write mix, number of concurrent users) and network conditions (packet count).
  • Diverse SLAs: Different applications have varying requirements. A real-time application might tolerate higher staleness for lower latency, while a financial system might prioritize strong consistency even if it means higher latency.
  • Manual Configuration Burden: Developers currently have to manually select a fixed consistency level at development time. This static choice often fails to adapt to the dynamic nature of real-world systems and diverse application needs, leading to SLA violations.

The paper aims to bridge this gap by automating the intelligent selection of consistency levels to satisfy specific SLA requirements.

Methods

OptCon employs a machine learning-based predictive framework to automate consistency tuning. The core idea is to learn a model that maps system parameters and SLA thresholds to an optimal consistency level.

  • Machine Learning Model: OptCon uses a decision tree learning algorithm to build a predictive model. This model learns the relationship between input parameters and observed latency/staleness.
  • Input Parameters (Independent Variables): The model considers:
  • Consistency Level (C): The categorical setting being evaluated.
  • Read Proportion (RW): The ratio of read operations in the workload.
  • Thread Count (Tc): The number of concurrent user threads.
  • Packet Count (P): The number of network packets transmitted.
  • Output Parameters (Observed):
    • Latency (L): The time taken for an operation.
  • Staleness (S): Measured using the client-centric Γ metric, which quantifies how old the observed data is.
  • SLA Definition: Users define SLAs as a set of "subSLAs," each specifying a maximum acceptable latency and a maximum acceptable staleness.
  • "Matching" Consistency Level: OptCon aims to find a consistency level that is weak enough to meet the latency threshold but strong enough to meet the staleness threshold. If multiple such levels exist, it prioritizes the one that maximizes throughput.
  • Per-Operation Tuning: Unlike static manual configurations, OptCon tunes consistency settings dynamically for each operation based on the current runtime values of the input parameters.
  • Framework Architecture: OptCon consists of three main modules:
  • Logger: Collects independent and observed parameters from experiments to build a training dataset.
  • Learner: Trains the machine learning model (e.g., decision tree) on the collected data.
  • Client: Interacts with the datastore, using the Learner to predict the consistency level for each operation.

The paper also explores other learning techniques like Logistic Regression, Random Forest, and Bayesian Learning, evaluating their performance based on cross-validation error, AICC, BIC, and prediction overhead.

Datasets

The paper does not introduce a new benchmark dataset. Instead, it uses:

  • YCSB (Yahoo! Cloud Serving Benchmark): Used to generate workloads and collect performance metrics (latency, staleness, throughput) from the datastore. The YCSB framework is extended to log the necessary parameters.
  • Cassandra: The chosen distributed datastore for implementation and experimentation.

The training dataset is generated by running various YCSB workloads on Cassandra, collecting data points for different combinations of parameters and consistency levels.

Key Insights and Ideas

  • ML for Dynamic Consistency: The core insight is that machine learning can effectively model the complex, non-linear relationships between system parameters, SLA requirements, and optimal consistency levels, enabling dynamic adaptation.
  • Beyond Static Configuration: The paper highlights the limitations of manually setting a single consistency level, demonstrating that such static choices are often suboptimal and fail to adapt to varying workloads.
  • Importance of Input Features: The study confirms that read proportion, thread count, and packet count are significant factors influencing latency and staleness, underscoring the need to include them in any predictive model.
  • Decision Trees as a Practical Choice: While exploring various ML algorithms, the paper finds that decision trees offer a good balance of accuracy, speed, and interpretability for this specific problem, making them a practical choice for OptCon.
  • Adaptability is Key: OptCon's ability to adapt to varying workloads and different SLA configurations is a major advantage over static approaches, leading to consistent SLA satisfaction.

Key Results

  • High Accuracy: OptCon, using a decision tree learner, achieves a cross-validation error of 0.14 in predicting matching consistency settings.
  • 100% SLA Satisfaction: In experiments adapting to varying workloads (read proportion), OptCon consistently satisfied the subSLA in 100% of cases, whereas manually chosen consistency levels achieved a maximum of 75%.
  • Adaptability to Diverse SLAS: For different subSLAs (varying latency and staleness thresholds), OptCon demonstrated superior adaptability compared to manually chosen fixed consistency levels. In several cases, OptCon achieved a higher "M-statistic" (percentage of non-violated subSLAs) than the best manually chosen setting.
  • Low Prediction Overhead: The decision tree implementation of OptCon has an average prediction overhead of 1 ms, which is negligible for most operations.
  • Effectiveness of Input Parameters: Dimensionality reduction techniques confirmed that consistency level (C), read proportion (RW), and packet count (P) are significant parameters for the model.

Limitations and Future Work

  • Model Retraining: While the model doesn't need frequent regeneration, it will require retraining if the underlying system behavior changes significantly (e.g., due to software upgrades).
  • Application Logic for Failures: The paper notes that handling subSLA violations (when OptCon's prediction still leads to an SLA breach) depends on the application logic and is outside the scope of this work.
  • Throughput as Secondary Optimization: While OptCon prioritizes throughput when multiple consistency levels satisfy the SLA, it's a secondary goal. Further work could explore more sophisticated multi-objective optimization.
  • Exploration of Other ML Techniques: Although decision trees performed well, the paper suggests that developers can choose other learning techniques based on their specific needs and trade-offs between accuracy, speed, and interpretability.
  • Integration with Other Datastores: OptCon is implemented as a wrapper and tested on Cassandra. Future work could explore its integration with other Dynamo-style distributed stores.

Summary updated

BibTeX
@inproceedings{sidhanta2016optcon,
  author = {Subhajit Sidhanta and Wojciech M. Golab and Supratik Mukhopadhyay and Saikat Basu},
  title = {{OptCon: An Adaptable SLA-Aware Consistency Tuning Framework for Quorum-Based Stores}},
  booktitle = {CCGrid},
  year = {2016},
  url = {https://openreview.net/forum?id=XtEPiqeVYK},
}
Figure