General Configuration Tips
Configuring Default Cluster Storage
When cluster is created, the default distribution zone is used for storage configuration. While we recommend creating distribution zones for your clusters, you can still use the default zone and configure it to suit your needs.
To get default storage configuration, use the cluster config show ignite.zone
command. Below is an example of the default configuration in the JSON format.
{
"ignite" : {
"zone" : {
"defaultDataStorage" : "aipersist",
"defaultDistributionZone" : {
"dataNodesAutoAdjust" : 2147483647,
"dataNodesAutoAdjustScaleDown" : 2147483647,
"dataNodesAutoAdjustScaleUp" : 0,
"dataStorage" : {
"dataRegion" : "default",
"name" : "aipersist"
},
"filter" : "$..*",
"partitions" : 25,
"replicas" : 1,
"zoneId" : 0
},
"distributionZones" : [ ],
"globalIdCounter" : 0
}
}
}
To change type of storage used for new distribution zones, change the zone.defaultDataStorage
value to aimem
or rocksDb
. You can also change the default data region used for new distribution zones by setting the zone.defaultDistrubutionZone.dataStorage.dataRegion
parameter. You will need to restart the cluster after changing the data region parameters.
You can also change these properties for distribution zones you have created for yourself.
You can get information about the data region by using the cluster config show ignite.aipersist
CLI command. Here is how the default data region may look like:
{
"ignite" : {
"checkpoint" : {
"checkpointDelayMillis" : 200,
"checkpointThreads" : 4,
"compactionThreads" : 4,
"frequency" : 180000,
"frequencyDeviation" : 40,
"logReadLockThresholdTimeout" : 0,
"readLockTimeout" : 10000,
"useAsyncFileIoFactory" : true
},
"defaultRegion" : {
"memoryAllocator" : {
"type" : "unsafe"
},
"replacementMode" : "CLOCK",
"size" : 268435456
},
"pageSize" : 16384,
"regions" : [ ]
}
}
To change the size of the default region, use the cluster config update
command:
cluster config update --url http://localhost:10300 ignite.aipersist.defaultRegion.size:9999999
Configuring Local Paths
By default, all files generated by GridGain are stored in the installation folder. However, depending on your environment, you may need to change the path to your files. You can use the {GRIDGAIN_HOME}\etc\vars.env
file to change the storage paths of your files. You can change paths to the following:
-
Work directory, where data is stored.
-
Log folder, where logs are placed.
-
The folder from which libraries are loaded.
-
The configuration file that is used to set up the default node.
Additionally, in the node configuration you can set:
-
The location CMG information is stored to by setting the
ignite.system.cmgPath
property. -
The location metastorage information is stored to by setting the
ignite.system.metastoragePath
property. -
The location data partitions are stored in by setting the
ignite.system.partitionsBasePath
property. -
The location RAFT logs are stored in by setting the
ignite.system.partitionsLogPath
property. These logs are separate from node logs.
Configuring Heap Usage
GridGain stores data in off-heap memory, reserved individually for each storage engine as required. However, Java Heap memory is still used to handle intermediary objects generated by workloads. For example:
-
Cluster and node metadata. This includes information about what nodes are part of the cluster, internal logs, table version chain, what keys are locked for transactions and all other information required for GridGain to operate normally.
-
Intermediary query results. This may lead to needing more heap memory when executing queries on especially large data sets.
-
Compute operations are likely to use heap memory to store data. Specific requirements for compute jobs vary depending on what job is being performed.
By default, GridGain allocates 16GB to heap storage. Depending on your environment and workload, you may want to change this value. Smaller heap would mean faster garbage collection, and less resources allocated to GridGain. Larger heap allows to handle more objects, but garbage collection may take longer.
To configure allocated heap, you can use the JVM_MAX_MEM
and JVM_MIN_MEM
variables stored in the {GRIDGAIN_HOME}\etc\vars.env
file. These variables are the equivalent of setting the Xmx
and Xms
variables in JVM.
Configuring Client Logging
By default, GridGain 9 uses the java.util.logging
(JUL) logging framework. GridGain uses the etc/ignite.java.util.logging.properties
configuration, and outputs logs to the folder configured in the LOG_DIR
variable that can be configured in the etc/vars.env
file. By default, logs are stored in the {GRIDGAIN_HOME}/log
folder. You can provide a custom configuration file by using the java.util.logging.config.file
property.
Some GridGain modules use libraries that rely on SLF4J logging. To gather logs from these libraries, add org.slf4j:slf4j-jdk14:2.0.x
class to the classpath.
For more information on configuring JUL logging, see the Java Logging Overview in Oracle documentation.
GridGain also supports other logging frameworks if you need to customize the logger.
LOG4J 2
To use log4j logging, include the required classes to the classpath:
-
org.apache.logging.log4j:log4j-slf4j2-impl:2.x.x
-
org.apache.logging.log4j:log4j-api:2.x.x
-
org.apache.logging.log4j:log4j-core:2.x.x
-
org.apache.logging.log4j:log4j-jpl:2.x.x
You can use custom configuration by using the Log4j configuration file. For more information on configuring Log4j logging, see the Log4j Configuration in Apache Log4j documentation.
==
© 2024 GridGain Systems, Inc. All Rights Reserved. Privacy Policy | Legal Notices. GridGain® is a registered trademark of GridGain Systems, Inc.
Apache, Apache Ignite, the Apache feather and the Apache Ignite logo are either registered trademarks or trademarks of The Apache Software Foundation.