Memory requirements

Understanding RethinkDB memory requirements

In this guide we look at what RethinkDB uses memory for, how we can estimate the amount needed, and how to configure the size of RethinkDB’s page cache.

There are three major sources of memory use in RethinkDB:

  1. Running queries and background processes, such as backfilling between nodes in a cluster.
  2. The page cache.
  3. Internal metadata proportional to the size of the database.

In the case of the first source, every database process uses memory to store intermediate results and to maintain internal state. The memory used varies significantly depending on the type of queries run and the size of documents stored in the database. As a rough estimate, expect each query and background process to use 1–20 MB of memory.

We’ll go over the other two sources in more detail.

Cache size

RethinkDB’s page cache keeps