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

Alexey Goncharuk commented on IGNITE-12142:
-------------------------------------------

[~bstefanski], [~dmagda], this is an expected behavior based on the current 
near cache design. The reason for keeping a reader is to properly update near 
caches when an update for the corresponding cache entry happens. 
Moving this to offheap is quite complicated. We cannot keep this information in 
the data store tree because it is persisted when Ignite native persistence is 
enabled, but the readers information is transient. Moving this information to a 
separate off-heap data structure will most likely impose a visible slowdown for 
reads (however, this may be a reasonable tradeoff given that subsequent reads 
will be server from near nodes).

I am not sure if anybody in the community is willing to work on this 
improvement as of now.

> 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.4#803005)

Reply via email to