Ignite C++ client mode, Near cache -


i have ignite server running in replicated mode , many clients on same node has near cache enabled. don't find significant performance difference when run client near cache , without near cache.

my understanding of near cache used key , value stored on client itself, there won't actual get() call made server. please correct me if wrong.

can share working near cache configuration xml.

server config: <beans xmlns="http://www.springframework.org/schema/beans"        xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"        xmlns:util="http://www.springframework.org/schema/util"        xsi:schemalocation="         http://www.springframework.org/schema/beans         http://www.springframework.org/schema/beans/spring-beans.xsd         http://www.springframework.org/schema/util         http://www.springframework.org/schema/util/spring-util.xsd">         <bean id="grid.cfg" class="org.apache.ignite.configuration.igniteconfiguration">              <property name="cacheconfiguration">                 <bean class="org.apache.ignite.configuration.cacheconfiguration">                     <property name="cachemode" value="local" />                                 <!-- enable near cache cache accessed data. -->                                  <!--    <property name="nearconfiguration">                                      <bean class="org.apache.ignite.configuration.nearcacheconfiguration"/>                                  </property> -->                     <property name="nearconfiguration">                     <bean class="org.apache.ignite.configuration.nearcacheconfiguration">                     </bean>                     </property>                  </bean>             </property>         <!-- explicitly configure tcp discovery spi provide list of initial nodes. -->         <property name="discoveryspi">             <bean class="org.apache.ignite.spi.discovery.tcp.tcpdiscoveryspi">                 <property name="ipfinder">                     <!--                         ignite provides several options automatic discovery can used                         instead os static ip based discovery.                     -->                     <!-- uncomment static ip finder enable static-based discovery of initial nodes. -->                     <!-- <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.tcpdiscoveryvmipfinder"> -->                               <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.tcpdiscoverymulticastipfinder">                           <property name="addresses">                             <list>                                 <!-- in distributed environment, replace actual host ip address. -->                                 <!-- <value>127.0.0.1:48550..48551</value> -->                                 <value>xxx.zzz.yyy.36:47500..47501</value>                               </list>                         </property>                     </bean>                 </property>             </bean>         </property>      </bean> </beans>   client config:  <beans xmlns="http://www.springframework.org/schema/beans"        xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"        xmlns:util="http://www.springframework.org/schema/util"        xsi:schemalocation="         http://www.springframework.org/schema/beans         http://www.springframework.org/schema/beans/spring-beans.xsd         http://www.springframework.org/schema/util         http://www.springframework.org/schema/util/spring-util.xsd">         <bean id="grid.cfg" class="org.apache.ignite.configuration.igniteconfiguration">              <property name="cacheconfiguration">                 <bean class="org.apache.ignite.configuration.cacheconfiguration">                     <property name="cachemode" value="local" />                                 <!-- enable near cache cache accessed data. -->                                  <!--    <property name="nearconfiguration">                                      <bean class="org.apache.ignite.configuration.nearcacheconfiguration"/>                                  </property> -->                     <property name="nearconfiguration">                     <bean class="org.apache.ignite.configuration.nearcacheconfiguration">                     </bean>                     </property>                  </bean>             </property>         <!-- explicitly configure tcp discovery spi provide list of initial nodes. -->         <property name="discoveryspi">             <bean class="org.apache.ignite.spi.discovery.tcp.tcpdiscoveryspi">                 <property name="ipfinder">                     <!--                         ignite provides several options automatic discovery can used                         instead os static ip based discovery.                     -->                     <!-- uncomment static ip finder enable static-based discovery of initial nodes. -->                     <!-- <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.tcpdiscoveryvmipfinder"> -->                               <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.tcpdiscoverymulticastipfinder">                           <property name="addresses">                             <list>                                 <!-- in distributed environment, replace actual host ip address. -->                                 <!-- <value>127.0.0.1:48550..48551</value> -->                                 <value>xxx.zzz.yyy.38:47500..47501</value>                               </list>                         </property>                     </bean>                 </property>             </bean>         </property>       </bean> </beans> 

yes, near cache improves performance caching used entries on node locally, doesn't make sense if run tests on single machine or jvm. near cache allows not go on remote node data, in test works locally.

also near cache have no sense server nodes on replicated or partitioned cache, number of backups equals or bigger number of data nodes, because data set available each node locally.

so performance boost need configure client node use near cache, when server nodes work on remote machines. not forget warm near cache before measuring.

here xml snippet setting near cache:

... <bean class="org.apache.ignite.configuration.cacheconfiguration">         <!-- other cache config -->         <property name="nearconfiguration">              <bean class="org.apache.ignite.configuration.nearcacheconfiguration"/>        </property> </bean> ... 

Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -