Search code examples
memoryconfigurationcpuigniteoff-heap

Apache Ignite Resource Configuration (CPUs, Memory Size, ...)


I'm using Apache Ignite to configure an In-Memory Data Grid (IMDG) cluster in localhost. For each ignite node(process) that makes up the IMDG cluster, I would like to configure 1) the capacity of off-heap memory, 2) the number of cores.

Off-Heap Memory Capacity : To configure this, I edited ‘defaultDataRegionConfiguration’ in the ignite default configuration XML file as guided in the link below. Is that correct?

<property name="dataStorageConfiguration">
    <bean class="org.apache.ignite.configuration.DataStorageConfiguration">
        <property name="defaultDataRegionConfiguration">
            <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
                <property name="name" value="Default_Region"/>
                <property name="initialSize" value="#{Size}"/>
                <property name="maxSize" value="#{Size}"/>
            </bean>
        </property>
    </bean>
</property>

The Number of Cores (vCPU) : I couldn't find any guide regarding this configuration. Please tell me how to configure it.

how to configure cpu(core) count & memory size in single ignite node.


Solution

    1. You're correct. You set the off-heap memory in the data region configuration
    2. You're generally best giving servers a complete machine (or at least container). Threadpool sizes are calculated based on the number of cores in a machine, for example. But if you really want to do it, Java does not provide a simple way but you can use tasksets