English 中文(简体)
驱逐政策何时开始淡化数据? 如何运作?
原标题:when will EvictionPolicy start to deltete data? and how it works?
  • 时间:2024-03-29 02:23:14
  •  标签:
  • ignite

I v use LruEvictionPolicyFactory in my CacheConfiguration such as fire

CacheConfiguration<K, V> cacheCfg = new CacheConfiguration<>();
cacheCfg.setAtomicityMode(CacheAtomicityMode.ATOMIC);
cacheCfg.setRebalanceMode(CacheRebalanceMode.ASYNC);
cacheCfg.setPartitionLossPolicy(PartitionLossPolicy.READ_WRITE_SAFE);
cacheCfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.PRIMARY_SYNC);
cacheCfg.setEvictionPolicyFactory(new LruEvictionPolicyFactory<>(200000));

我使用数据

 <bean class="org.apache.ignite.configuration.DataRegionConfiguration">      
    <property name="initialSize" value="#{512L * 1024 * 1024}"/>
    <property name="maxSize" value="#{3 * 1024L * 1024 * 1024}"/>
    <property name="pageEvictionMode" value="RANDOM_LRU"/>
    <property name="evictionThreshold" value="0.9"/>
    <property name="metricsEnabled" value="true"/>
    <property name="persistenceEnabled" value="false"/>
 </bean>

但是,我可以看到,我藏匿的2000 000多份记录,有时甚至有800 000份记录。

• 如何控制我海滩的数据规模,避免使用太多的记忆

问题回答

你的数据区域配置似乎越来越正确,根据这个网址:page。 我建议使用<条码>RANDOM_2_LRU,并没收一个数据区域名称供参考。

 <bean class="org.apache.ignite.configuration.DataRegionConfiguration">      
    <property name="initialSize" value="#{512L * 1024 * 1024}"/>
    <property name="name" value="region_name"/>
    <property name="maxSize" value="#{3 * 1024L * 1024 * 1024}"/>
    <property name="pageEvictionMode" value="RANDOM_LRU"/>
    <property name="evictionThreshold" value="0.9"/>
    <property name="metricsEnabled" value="true"/>
    <property name="persistenceEnabled" value="false"/>
 </bean>

页: 1 https://www.gridgain.com/sdk/latest/javadoc/org/apache/ignite/configuration/CacheConfiguration.html#setDataRegionName-java.lang.String-"rel=“nofollow noretinger” 例如:

CacheConfiguration<K, V> cacheCfg = new CacheConfiguration<>();
cacheCfg.setAtomicityMode(CacheAtomicityMode.ATOMIC);
cacheCfg.setRebalanceMode(CacheRebalanceMode.ASYNC);
cacheCfg.setPartitionLossPolicy(PartitionLossPolicy.READ_WRITE_SAFE);
cacheCfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.PRIMARY_SYNC);
cacheCfg.setDataRegionName("region_name");




相关问题
How to do Cache Sizing?

Using Ignite 2.15, i am trying to do some cache sizing. Do we have any documents to do sizing activity? I found an old document https://apacheignite.readme.io/docs/capacity-planning Is this still ...

Why does getting Ignite node sigsegv error?

We have an ignite cluster with 10 nodes.(Each node has 12 CPU 62 GB Memory.)Sometimes one of the ignition nodes is broken. When we examine the ignition logs, we cannot see any error logs, warnings or ...

热门标签