2017-04-07 5 views
1

私は、レプリケートモードで動作しているイグニッションサーバと、キャッシュが有効になっている同じノード上の多くのクライアントを持っています。現在、キャッシュに近いキャッシュを使用していて、キャッシュに近いキャッシュを使用していないクライアントを実行すると、パフォーマンスの大幅な違いはありません。Ignite C++クライアントモード、ニアキャッシュ

キャッシュに近いことは、頻繁に使用されるキーと値がクライアント自体に格納されるため、実際にサーバーにGet()コールが行われないことです。私が間違っている場合は私を修正してください。

キャッシュ可能なキャッシュ構成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 to cache recently 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 to provide list of initial nodes. --> 
     <property name="discoverySpi"> 
      <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi"> 
       <property name="ipFinder"> 
        <!-- 
         Ignite provides several options for automatic discovery that can be used 
         instead os static IP based discovery. 
        --> 
        <!-- Uncomment static IP finder to 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 with 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 to cache recently 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 to provide list of initial nodes. --> 
     <property name="discoverySpi"> 
      <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi"> 
       <property name="ipFinder"> 
        <!-- 
         Ignite provides several options for automatic discovery that can be used 
         instead os static IP based discovery. 
        --> 
        <!-- Uncomment static IP finder to 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 with 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> 

答えて

1

はい、ニア・キャッシュは、ローカルノード上で頻繁に使用されたエントリをキャッシュすることでパフォーマンスを向上させていますが、単一のマシンまたはJVM上のすべてのテストを実行する場合、それは意味がありません。ニア・キャッシュでは、データのリモート・ノードには行かないが、テストではすべてがすでにローカルで動作しています。

キャッシュの近くには、サーバーノードがREPLICATEDまたはPARTITIONEDキャッシュ(ここで、バックアップの数はデータノードの数よりも多いか等しい)には意味がありません。

パフォーマンスを向上させるには、サーバーノードがリモートマシン上で動作する場合に、ニアキャッシュを使用するようにクライアントノードを構成する必要があります。測定する前にキャッシュの近くでウォームアップすることを忘れないでください。私が使用した構成を追加した

... 
<bean class="org.apache.ignite.configuration.CacheConfiguration"> 

     <!-- Your other cache config --> 

     <property name="nearConfiguration"> 
      <bean class="org.apache.ignite.configuration.NearCacheConfiguration"/> 
     </property> 
</bean> 
... 
+0

、しかし、私は近くにキャッシュがignitevisorからOFF有効になって見ることができる上記の設定を使用して:

は、ここでXMLキャッシュの近くに設定するためのスニペットです。 – Immortalisai

+0

あなたは間違ったノードを見ていると思います。サーバでは無効になっている可能性がありますが、クライアントでは有効になっています。 –

+0

こんにちは、ありがとう、私は私が別々にすべてのキャッシュのニアキャッシュの設定を追加didntを見ることができます。今すぐ近くのキャッシュが有効になっているのを見ることができます。 – Immortalisai

関連する問題