GridGain Developers Hub

Volatile Storage

Overview

GridGain Volatile storage is designed to provide a quick and responsive storage without guarantees of data persistence.

When it is enabled for the data region, GridGain stores all data in the data region in RAM. Data will be lost on cluster shutdown, so make sure to have a separate data region for persistent storage.

Profile Configuration

Each GridGain storage engine can have several storage profiles. Each profile has the following properties:

Property Default Description

engine

The name of the storage engine.

name

The name of the data region.

initSize

256 * 1024 * 1024

Sets the initial space allocated to the data region.

maxSize

256 * 1024 * 1024

Sets the maximum space that can be allocated to the data region.

evictionMode

DISABLED

Sets the eviction algorithm to use. Possible values: DISABLED, RANDOM_LRU, RANDOM_2_LRU.

evictionThreshold

0.9

Configures when the eviction process starts.

emptyPagesPoolSize

100

The maximum number of empty pages GridGain will try to keep.

pageSize

16384

The size of pages in the storage, in bytes.

memoryAllocator.type

unsafe

Memory allocator configuration. Uses sun.misc.Unsafe to improve performance. Currently, no other options are available.

Configuration Example

The example below shows how to configure one data region that uses volatile storage:

storages:
  profiles:
    aimemory:
      engine: aimem
      replacementMode: CLOCK

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