GridGain Developers Hub

Persistent Storage

Overview

GridGain Persistence is designed to provide a quick and responsive persistent storage. When using the persistent storage, GridGain stores all the data on disk, and loads as much data as it can into RAM for processing.

When persistence is enabled, GridGain stores each partition in a separate file on disk. In addition to data partitions, GridGain stores indexes and metadata.

Profile Configuration

Each GridGain storage engine can have several storage profiles.

Checkpointing

Checkpointing is the process of copying dirty pages from RAM to partition files on disk. A dirty page is a page that was updated in RAM but was not written to the respective partition file.

After a checkpoint is created, all changes are persisted to disk and will be available if the node crashes and is restarted.

Checkpointing is designed to ensure durability of data and recovery in case of a node failure.

This process helps you utilize disk space frugally by keeping pages in the most up-to-date state on disk.

Storage Configuration

In GridGain 9, you can create and maintain configuration in either HOCON or JSON. The configuration file has a single root "node," called ignite. All configuration sections are children, grandchildren, etc., of that node. The example below shows sample GridGain cluster configuration with persistence and checkpoints:

{
  "ignite" : {
    "storage" : {
      "engines" : {
        "aipersist" : {
          "checkpoint" : {
            "checkpointDelayMillis" : 100
          }
        }
      },
      "profiles:" : [
        {
          "name" : "clock_aipersist",
          "engine": "aipersist",
          "replacementMode" : "CLOCK"
        }
      ]
    }
  }
}

You can then use the profile (in this case, clock_aipersist) in your distribution zone configuration.