You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Bartłomiej Stefański (Jira)" <ji...@apache.org> on 2019/09/05 10:24:00 UTC

[jira] [Created] (IGNITE-12142) Ignite ignores that on-heap store is disabled when putting values through near cache

Bartłomiej Stefański created IGNITE-12142:
---------------------------------------------

             Summary: Ignite ignores that on-heap store is disabled when putting values through near cache
                 Key: IGNITE-12142
                 URL: https://issues.apache.org/jira/browse/IGNITE-12142
             Project: Ignite
          Issue Type: Bug
          Components: cache
    Affects Versions: 2.7.5, 2.7
            Reporter: Bartłomiej Stefański


I have an Ignite cluster that consists of two nodes:

* @n0 - server node
* @n1 - client node

Installed PARTITIONED cache {{myCache}} on both of them. Cache has near cache on client node and disabled on-heap caching on server.

Server configuration:

{code:xml}
<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
       http://www.springframework.org/schema/beans
       http://www.springframework.org/schema/beans/spring-beans.xsd">

    <bean class="org.apache.ignite.configuration.IgniteConfiguration">
        <property name="clientMode" value="false"/>

        <property name="cacheConfiguration">
            <list>
                <bean class="org.apache.ignite.configuration.CacheConfiguration">
                    <property name="name" value="myCache"/>
                    <property name="cacheMode" value="PARTITIONED"/>
                    <property name="onheapCacheEnabled" value="false"/>
                </bean>
            </list>
        </property>
    </bean>
</beans>
{code}

Client configuration:

{code:xml}
<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
       http://www.springframework.org/schema/beans
       http://www.springframework.org/schema/beans/spring-beans.xsd">

    <bean class="org.apache.ignite.configuration.IgniteConfiguration">
        <property name="clientMode" value="true"/>

        <property name="cacheConfiguration">
            <list>
                <bean class="org.apache.ignite.configuration.CacheConfiguration">
                    <property name="name" value="myCache"/>
                    <property name="cacheMode" value="PARTITIONED"/>
                    <property name="onheapCacheEnabled" value="false"/>

                    <property name="nearConfiguration">
                        <bean class="org.apache.ignite.configuration.NearCacheConfiguration">
                            <property name="nearEvictionPolicy">
                                <bean class="org.apache.ignite.cache.eviction.lru.LruEvictionPolicy">
                                    <property name="maxSize" value="1000"/>
                                </bean>
                            </property>
                        </bean>
                    </property>
                </bean>
            </list>
        </property>
    </bean>
</beans>
{code}

I have noticed (using visor) strange cache state after putting 20k entries to that cache through client node (@n1):

{code}
+======================================================================================================================+
|      Node ID8(@), IP      | CPUs | Heap Used | CPU Load |   Up Time    |    Size (Primary / Backup)    | Hi/Mi/Rd/Wr |
+======================================================================================================================+
| 99E64885(@n0), 172.17.0.1 | 4    | 2.56 %    | 0.50 %   | 00:02:47.615 | Total: 40000 (40000 / 0)      | Hi: 0       |
|                           |      |           |          |              |   Heap: 20000 (20000 / <n/a>) | Mi: 0       |
|                           |      |           |          |              |   Off-Heap: 20000 (20000 / 0) | Rd: 0       |
|                           |      |           |          |              |   Off-Heap Memory: <n/a>      | Wr: 0       |
+---------------------------+------+-----------+----------+--------------+-------------------------------+-------------+
| FE7BEE4F(@n1), 172.17.0.1 | 4    | 3.89 %    | 3.10 %   | 00:02:37.269 | Total: 1000 (1000 / 0)        | Hi: 0       |
|                           |      |           |          |              |   Heap: 1000 (1000 / <n/a>)   | Mi: 0       |
|                           |      |           |          |              |   Off-Heap: 0 (0 / 0)         | Rd: 0       |
|                           |      |           |          |              |   Off-Heap Memory: 0          | Wr: 0       |
+----------------------------------------------------------------------------------------------------------------------+
{code}

Why Ignite stores entries on heap space on server node? If I put 20k entries through server node then server on-heap space is not used:

{code}
+======================================================================================================================+
|      Node ID8(@), IP      | CPUs | Heap Used | CPU Load |   Up Time    |    Size (Primary / Backup)    | Hi/Mi/Rd/Wr |
+======================================================================================================================+
| 9C1D895B(@n0), 172.17.0.1 | 4    | 1.68 %    | 0.43 %   | 00:15:44.149 | Total: 20000 (20000 / 0)      | Hi: 0       |
|                           |      |           |          |              |   Heap: 0 (0 / <n/a>)         | Mi: 0       |
|                           |      |           |          |              |   Off-Heap: 20000 (20000 / 0) | Rd: 0       |
|                           |      |           |          |              |   Off-Heap Memory: <n/a>      | Wr: 0       |
+---------------------------+------+-----------+----------+--------------+-------------------------------+-------------+
| 5059A9F2(@n1), 172.17.0.1 | 4    | 2.05 %    | 0.00 %   | 00:15:37.410 | Total: 0 (0 / 0)              | Hi: 0       |
|                           |      |           |          |              |   Heap: 0 (0 / <n/a>)         | Mi: 0       |
|                           |      |           |          |              |   Off-Heap: 0 (0 / 0)         | Rd: 0       |
|                           |      |           |          |              |   Off-Heap Memory: 0          | Wr: 0       |
+----------------------------------------------------------------------------------------------------------------------+
{code}





--
This message was sent by Atlassian Jira
(v8.3.2#803003)