You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by vyhignite1 <vy...@hotmail.com> on 2019/01/22 18:45:27 UTC
Eviction policy is not working for default and new data region
I have one ignite node with native persistence turn off. I have set eviction
policy for both Default_Region and a new data region I created. However,
none of them seem to be working.
Here is the default-config.xml file for Ignite Configuration:
<bean class="org.apache.ignite.configuration.IgniteConfiguration">
<property name="dataStorageConfiguration">
<bean
class="org.apache.ignite.configuration.DataStorageConfiguration">
<property name="defaultDataRegionConfiguration">
<bean
class="org.apache.ignite.configuration.DataRegionConfiguration">
<property name="name" value="Default_Region"/>
<property name="initialSize" value="#{100 * 1024 *
1024}"/>
<property name="maxSize" value="#{1L * 1024 * 1024 *
1024}"/>
<property name="pageEvictionMode"
value="RANDOM_LRU"/>
</bean>
</property>
<property name="dataRegionConfigurations">
<list>
<bean
class="org.apache.ignite.configuration.DataRegionConfiguration">
<property name="name" value="2GB_Region"/>
<property name="initialSize" value="#{200 * 1024
* 1024}"/>
<property name="maxSize" value="#{2L * 1024 *
1024 * 1024}"/>
<property name="pageEvictionMode"
value="RANDOM_2_LRU"/>
</bean>
</list>
</property>
</bean>
</property>
</bean>
And here is the code I set the data region:
Ignite ignite = Ignition.start("default-config.xml");
CacheConfiguration config = new CacheConfiguration("content-access-cache");
//set any config here before start cache
config.setCacheMode(CacheMode.PARTITIONED); //example
config.setAtomicityMode(CacheAtomicityMode.ATOMIC);
config.setBackups(0);
// config.setDataRegionName("2GB_Region");
//***
IgniteCache<String, byte[]> cache = ignite.getOrCreateCache(config);
And here is the log for both cases:
1.) Default_Region:
13:34:34] Topology snapshot [ver=1, servers=1, clients=0, CPUs=8,
offheap=3.0GB, heap=6.9GB]
[13:34:34] ^-- Node [id=BB0B908B-FDC9-4DC6-8CA2-30502CCC53EB,
clusterState=ACTIVE]
[13:34:34] Data Regions Configured:
[13:34:34] ^-- Default_Region [initSize=100.0 MiB, maxSize=1.0 GiB,
persistenceEnabled=false]
[13:34:34] ^-- 2GB_Region [initSize=200.0 MiB, maxSize=2.0 GiB,
persistenceEnabled=false]
SEVERE: JVM will be halted immediately due to the failure:
[failureCtx=FailureContext [type=CRITICAL_ERROR, err=class
o.a.i.i.mem.IgniteOutOfMemoryException: Out of memory in data region
[name=Default_Region, initSize=100.0 MiB, maxSize=1.0 GiB,
persistenceEnabled=false] Try the following:
^-- Increase maximum off-heap memory size
(DataRegionConfiguration.maxSize)
^-- Enable Ignite persistence (DataRegionConfiguration.persistenceEnabled)
^-- Enable eviction or expiration policies]]
2.) 2GB_Region:
[13:31:00] Ignite node started OK (id=f2c3a196)
[13:31:00] Topology snapshot [ver=1, servers=1, clients=0, CPUs=8,
offheap=8.2GB, heap=6.9GB]
[13:31:00] ^-- Node [id=F2C3A196-E3B8-41A0-AF0A-11E2F5C1E67B,
clusterState=ACTIVE]
[13:31:00] Data Regions Configured:
[13:31:00] ^-- Default_Region [initSize=100.0 MiB, maxSize=6.2 GiB,
persistenceEnabled=false]
[13:31:00] ^-- 2GB_Region [initSize=200.0 MiB, maxSize=2.0 GiB,
persistenceEnabled=false]
at
org.apache.ignite.internal.pagemem.impl.PageMemoryNoStoreImpl.allocatePage(PageMemoryNoStoreImpl.java:304)
at
org.apache.ignite.internal.processors.cache.persistence.freelist.AbstractFreeList.allocateDataPage(AbstractFreeList.java:463)
at
org.apache.ignite.internal.processors.cache.persistence.freelist.AbstractFreeList.insertDataRow(AbstractFreeList.java:501)
at
org.apache.ignite.internal.processors.cache.persistence.RowStore.addRow(RowStore.java:97)
at
org.apache.ignite.internal.processors.cache.IgniteCacheOffheapManagerImpl$CacheDataStoreImpl.createRow(IgniteCacheOffheapManagerImpl.java:1302)
at
org.apache.ignite.internal.processors.cache.GridCacheMapEntry$AtomicCacheUpdateClosure.update(GridCacheMapEntry.java:4951)
at
org.apache.ignite.internal.processors.cache.GridCacheMapEntry$AtomicCacheUpdateClosure.call(GridCacheMapEntry.java:4746)
at
org.apache.ignite.internal.processors.cache.GridCacheMapEntry$AtomicCacheUpdateClosure.call(GridCacheMapEntry.java:4460)
at
org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree$Invoke.invokeClosure(BPlusTree.java:3083)
at
org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree$Invoke.access$6200(BPlusTree.java:2977)
at
org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.invokeDown(BPlusTree.java:1732)
at
org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.invoke(BPlusTree.java:1610)
at
org.apache.ignite.internal.processors.cache.IgniteCacheOffheapManagerImpl$CacheDataStoreImpl.invoke(IgniteCacheOffheapManagerImpl.java:1249)
at
org.apache.ignite.internal.processors.cache.IgniteCacheOffheapManagerImpl.invoke(IgniteCacheOffheapManagerImpl.java:352)
at
org.apache.ignite.internal.processors.cache.GridCacheMapEntry.innerUpdate(GridCacheMapEntry.java:1767)
at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.updateSingle(GridDhtAtomicCache.java:2421)
at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.update(GridDhtAtomicCache.java:1883)
at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.updateAllAsyncInternal0(GridDhtAtomicCache.java:1736)
at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.updateAllAsyncInternal(GridDhtAtomicCache.java:1628)
at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridNearAtomicAbstractUpdateFuture.sendSingleRequest(GridNearAtomicAbstractUpdateFuture.java:299)
at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridNearAtomicSingleUpdateFuture.map(GridNearAtomicSingleUpdateFuture.java:483)
at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridNearAtomicSingleUpdateFuture.mapOnTopology(GridNearAtomicSingleUpdateFuture.java:443)
at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridNearAtomicAbstractUpdateFuture.map(GridNearAtomicAbstractUpdateFuture.java:248)
at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.update0(GridDhtAtomicCache.java:1117)
at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.put0(GridDhtAtomicCache.java:606)
at
org.apache.ignite.internal.processors.cache.GridCacheAdapter.put(GridCacheAdapter.java:2372)
at
org.apache.ignite.internal.processors.cache.GridCacheAdapter.put(GridCacheAdapter.java:2349)
at
org.apache.ignite.internal.processors.cache.IgniteCacheProxyImpl.put(IgniteCacheProxyImpl.java:1084)
at
org.apache.ignite.internal.processors.cache.GatewayProtectedCacheProxy.put(GatewayProtectedCacheProxy.java:788)
at org.dcache.vfs4j.LocalVFS.writeToIgnite(LocalVFS.java:379)
at org.dcache.vfs4j.LocalVFS.write(LocalVFS.java:303)
at org.dcache.nfs.vfs.PseudoFs.write(PseudoFs.java:291)
at org.dcache.nfs.v4.OperationWRITE.process(OperationWRITE.java:82)
at
org.dcache.nfs.v4.NFSServerV41.NFSPROC4_COMPOUND_4(NFSServerV41.java:204)
at
org.dcache.nfs.v4.xdr.nfs4_prot_NFS4_PROGRAM_ServerStub.dispatchOncRpcCall(nfs4_prot_NFS4_PROGRAM_ServerStub.java:48)
at org.dcache.oncrpc4j.rpc.RpcDispatcher$1.run(RpcDispatcher.java:110)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
SEVERE: JVM will be halted immediately due to the failure:
[failureCtx=FailureContext [type=CRITICAL_ERROR, err=class
o.a.i.i.mem.IgniteOutOfMemoryException: Out of memory in data region
[name=2GB_Region, initSize=200.0 MiB, maxSize=2.0 GiB,
persistenceEnabled=false] Try the following:
^-- Increase maximum off-heap memory size
(DataRegionConfiguration.maxSize)
^-- Enable Ignite persistence (DataRegionConfiguration.persistenceEnabled)
^-- Enable eviction or expiration policies]]
Can anyone give me some hint on what's wrong here? Thanks.
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: Eviction policy is not working for default and new data region
Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!
I have looked at your reproducer, and got as far as:
Exception in thread "main" java.io.IOException: Это каталог
at sun.nio.ch.FileDispatcherImpl.read0(Native Method)
at sun.nio.ch.FileDispatcherImpl.read(FileDispatcherImpl.java:46)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
at sun.nio.ch.IOUtil.read(IOUtil.java:197)
at sun.nio.ch.FileChannelImpl.read(FileChannelImpl.java:159)
at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:65)
at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:109)
at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:103)
at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:284)
at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
at java.io.InputStreamReader.read(InputStreamReader.java:184)
at java.io.BufferedReader.fill(BufferedReader.java:161)
at java.io.BufferedReader.readLine(BufferedReader.java:324)
at java.io.BufferedReader.readLine(BufferedReader.java:389)
at java.nio.file.Files.readAllLines(Files.java:3205)
at java.nio.file.Files.readAllLines(Files.java:3242)
at org.dcache.nfs.ExportFile.parse(ExportFile.java:130)
at org.dcache.nfs.ExportFile.rescan(ExportFile.java:322)
at org.dcache.nfs.ExportFile.<init>(ExportFile.java:98)
at org.dcache.nfs.ExportFile.<init>(ExportFile.java:68)
at org.dcache.vfs4j.NfsMain.main(NfsMain.java:102)
Can you please modify it so it doesn't have extensive dependencies or data
requirements? That I can simply run it and reproduce this behavior?
Regards,
--
Ilya Kasnacheev
чт, 24 янв. 2019 г. в 17:34, vyhignite1 <vy...@hotmail.com>:
> Can anyone help?
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>
Re: Eviction policy is not working for default and new data region
Posted by vyhignite1 <vy...@hotmail.com>.
Can anyone help?
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: Eviction policy is not working for default and new data region
Posted by vyhignite1 <vy...@hotmail.com>.
Thanks for the reply and here is the link for the code in GitHub:
https://github.com/ghvchen/vfs4j-ignite
Thanks,
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: Eviction policy is not working for default and new data region
Posted by aealexsandrov <ae...@gmail.com>.
Hi,
Could you please attach full XML configuration and java code that can
reproduce this issue? You can upload your reproducer to GitHub for example.
BR,
Andrei
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: Eviction policy is not working for default and new data region
Posted by vyhignite1 <vy...@hotmail.com>.
Here is the code link in GitHub:
https://github.com/ghvchen/vfs4j-ignite
Thanks,
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/