Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Configuring Data Regions

Configuring GridGain data regions to control RAM usage per cache, including the default region, custom regions, system regions, and cache warm-up strategy.

Overview

GridGain uses the concept of data regions to control the amount of RAM available to a cache or a group of caches. A data region is a logical extendable area in RAM in which cached data resides. You can control the initial size of the region and the maximum size it can occupy. In addition to the size, data regions control persistence settings for caches.

By default, there is one data region that can take up to 20% of RAM available to the node, and all caches you create are placed in that region; but you can add as many regions as you want. There are a couple of reasons why you may want to have multiple regions:

  • Regions allow you to configure the amount of RAM available to a cache or number of caches.

  • Persistence parameters are configured per region. If you want to have both in-memory only caches and the caches that store their content to disk, you need to configure two (or more) data regions with different persistence settings: one for in-memory caches and one for persistent caches.

  • Some memory parameters, such as eviction policies, are configured per data region.

See the following section to learn how to change the parameters of the default data region or configure multiple data regions.

Configuring Default Data Region

By default, a new cache is added to the default data region. If you want to change the properties of the default data region, you can do so in the data storage configuration.

<bean class="org.apache.ignite.configuration.IgniteConfiguration" id="ignite.cfg">
    <property name="dataStorageConfiguration">
        <bean class="org.apache.ignite.configuration.DataStorageConfiguration">
            <!--
            Default memory region that grows endlessly. Any cache will be bound to this memory region
            unless another region is set in the cache's configuration.
            -->
            <property name="defaultDataRegionConfiguration">
                <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
                    <property name="name" value="Default_Region"/>
                    <!-- 100 MB memory region with disabled eviction. -->
                    <property name="initialSize" value="#{100 * 1024 * 1024}"/>
                </bean>
            </property>
        </bean>
    </property>
    <!-- other properties -->
</bean>
DataStorageConfiguration storageCfg = new DataStorageConfiguration();

DataRegionConfiguration defaultRegion = new DataRegionConfiguration();
defaultRegion.setName("Default_Region");
defaultRegion.setInitialSize(100 * 1024 * 1024);

storageCfg.setDefaultDataRegionConfiguration(defaultRegion);

IgniteConfiguration cfg = new IgniteConfiguration();

cfg.setDataStorageConfiguration(storageCfg);

// Start the node.
Ignite ignite = Ignition.start(cfg);

unsupported

Adding Custom Data Regions

In addition to the default data region, you can add more data regions with custom settings. In the following example, we configure a data region that can take up to 40 MB and uses the Random-2-LRU eviction policy. Note that further below in the configuration, we create a cache that resides in the new data region.

For the full list of properties, refer to the DataStorageConfiguration javadoc.

unsupported

System Data Regions

GridGain comes preconfigured with 3 system data regions. These data regions are used by GridGain to store data required for cluster operations.

  • metastoreMemPlc - a persistent data region that is used to store cluster metainformation.

  • sysMemPlc - system data region that is used to store system caches. This region is persistent if at least one user-configured persistent data region exists.

  • volatileDsMemPlc - an in-memory data region that stores volatile data structures (lock, latch, and semaphore).

All three regions are sized by the system data region configuration. By default, each region starts at 40 MB and can grow to 100 MB.

The example below shows how you can configure the size of these data regions:

unsupported

Cache Warm-Up Strategy

The cache warm-up strategy provides an ability to load data from the disk to the node before it is joined to the cluster. This prevents performance loss when the node is restarted.

The cache warm-up strategy is applicable only to the data regions. It can be configured both for all regions (by default) or for each region separately.

The warm-up strategy implies loading data into the region until it runs out of free space. GridGain plans partition loading based on index-partition priority within each cache group, then loads the planned partitions concurrently using a configurable number of worker threads.

Java Configuration

To warm up all data regions, pass the configuration parameter LoadAllWarmUpStrategy to the DataStorageConfiguration#setDefaultWarmUpConfiguration as follows:

To warm up a specific data region, pass the configuration parameter LoadAllWarmUpStrategy to the DataStorageConfiguration#setWarmUpConfiguration as follows:

To control the number of threads used to load pages in parallel, use the LoadAllWarmUpConfiguration#setThreads method. The value must be positive. When not set, it defaults to max(8, Runtime.getRuntime().availableProcessors()).

To stop warming up all data regions, pass the configuration parameter NoOpWarmUpStrategy to the DataStorageConfiguration#setDefaultWarmUpConfiguration as follows:

To stop warming up a specific data region, pass the configuration parameter NoOpWarmUpStrategy to the DataStorageConfiguration#setWarmUpConfiguration as follows:

XML Configuration

You can use the XML configuration to set up your warm-up strategy:

Control Script Management

You can also stop the cache warming up process by using control.sh and JMX.

To stop the warming up using control.sh:

To stop the warming up using JMX, use the method below:

This page is: Copyright © 2026 MariaDB. All rights reserved.

Last updated

Was this helpful?