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 11:27:00 UTC

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

    [ https://issues.apache.org/jira/browse/IGNITE-12142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16923296#comment-16923296 ] 

Bartłomiej Stefański commented on IGNITE-12142:
-----------------------------------------------

Also, I tested scenario when on-heap store and lru eviction are enabled on server and client nodes:
{code:java}
...
<property name="onheapCacheEnabled" value="true"/>
<property name="evictionPolicy">
    <bean class="org.apache.ignite.cache.eviction.lru.LruEvictionPolicy">
        <property name="maxSize" value="2000"/>
    </bean>
</property>
...
{code}
After putting 20k entries to cache through client node:
{code:java}
Nodes for: myCache(@c0)
+======================================================================================================================+
|      Node ID8(@), IP      | CPUs | Heap Used | CPU Load |   Up Time    |    Size (Primary / Backup)    | Hi/Mi/Rd/Wr |
+======================================================================================================================+
| F8BCB4F9(@n0), 172.17.0.1 | 4    | 1.61 %    | 0.10 %   | 00:09:26.228 | 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       |
+---------------------------+------+-----------+----------+--------------+-------------------------------+-------------+
| 33B76295(@n1), 172.17.0.1 | 4    | 2.11 %    | 0.10 %   | 00:09:13.108 | 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}
Heap of server node (@n0) contains 20k entries, but should contain only 2k (max size configured in eviction policy). If I put values directly on server node eviction works fine:
{code:java}
Nodes for: myCache(@c0)
+======================================================================================================================+
|      Node ID8(@), IP      | CPUs | Heap Used | CPU Load |   Up Time    |    Size (Primary / Backup)    | Hi/Mi/Rd/Wr |
+======================================================================================================================+
| F8BCB4F9(@n0), 172.17.0.1 | 4    | 2.38 %    | 0.33 %   | 00:14:20.920 | Total: 22000 (22000 / 0)      | Hi: 0       |
|                           |      |           |          |              |   Heap: 2000 (2000 / <n/a>)   | Mi: 0       |
|                           |      |           |          |              |   Off-Heap: 20000 (20000 / 0) | Rd: 0       |
|                           |      |           |          |              |   Off-Heap Memory: <n/a>      | Wr: 0       |
+---------------------------+------+-----------+----------+--------------+-------------------------------+-------------+
| 33B76295(@n1), 172.17.0.1 | 4    | 3.30 %    | 0.10 %   | 00:14:09.125 | 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}

> 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, 2.7.5
>            Reporter: Bartłomiej Stefański
>            Priority: Major
>
> 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)