Skip to main content
QUICK REVIEW

[Paper Review] The Case for Automatic Database Administration using Deep Reinforcement Learning

Ankur Sharma, Felix Schuhknecht|arXiv (Cornell University)|Jan 17, 2018
Optimization and Search ProblemsComputer Science5 references43 citations
TL;DR

The paper proposes NoDBA, a deep reinforcement learning system that automatically tunes a DBMS by learning index recommendations from workloads, achieving competitive performance with limited indexes and fast predictions after training.

ABSTRACT

Like any large software system, a full-fledged DBMS offers an overwhelming amount of configuration knobs. These range from static initialisation parameters like buffer sizes, degree of concurrency, or level of replication to complex runtime decisions like creating a secondary index on a particular column or reorganising the physical layout of the store. To simplify the configuration, industry grade DBMSs are usually shipped with various advisory tools, that provide recommendations for given workloads and machines. However, reality shows that the actual configuration, tuning, and maintenance is usually still done by a human administrator, relying on intuition and experience. Recent work on deep reinforcement learning has shown very promising results in solving problems, that require such a sense of intuition. For instance, it has been applied very successfully in learning how to play complicated games with enormous search spaces. Motivated by these achievements, in this work we explore how deep reinforcement learning can be used to administer a DBMS. First, we will describe how deep reinforcement learning can be used to automatically tune an arbitrary software system like a DBMS by defining a problem environment. Second, we showcase our concept of NoDBA at the concrete example of index selection and evaluate how well it recommends indexes for given workloads.

Motivation & Objective

  • Motivate the challenge of tuning large DBMSs with many configuration knobs and the limits of advisory tools.
  • Propose a framework to automate DBMS administration using deep reinforcement learning (DRL).
  • Demonstrate NoDBA by applying DRL to automatic index selection for given workloads.
  • Evaluate how NoDBA compares with no indexes and with indexing all columns across synthetic workloads.

Proposed method

  • Define a DRL environment for DBMS administration with input, actions, reward, and hyperparameters.
  • Encode workload and current index configuration as neural network inputs.
  • Limit actions to creating an index on a specific column (single-column indexes).
  • Define a reward based on the improvement of workload cost over the empty index configuration, using cost(L) to compute the reward r(L).
  • Train using episodic reinforcement learning with experience replay, and evaluate on synthetic workloads built from the TPC-H LINEITEM schema in PostgreSQL.

Experimental results

Research questions

  • RQ1Can deep reinforcement learning be used to automatically tune DBMS configurations for a given workload?
  • RQ2How effective is automatic index selection learned by DRL compared to no indexes and to having all possible indexes?
  • RQ3What are the performance implications (training time, prediction latency) of NoDBA in this setting?
  • RQ4How well does the NoDBA approach generalize across different workloads and schema configurations?

Key findings

  • NoDBA can match or beat the NoIndex baseline and approach IndexedAll on selective workloads (W1 and W2).
  • For the most demanding workload (W3), a small set of 3 indexes improved performance significantly over NoIndex.
  • Training the network took about 42 minutes; once trained, a prediction takes around 20 ms.
  • NoDBA was evaluated on TPC-H LINEITEM with PostgreSQL, using random training workloads to cover varied scenarios.
  • The study demonstrates that DRL can tune a DBMS without relying on potentially faulty cost-based estimates.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.