Vladislav Pyatkov created IGNITE-29234:
------------------------------------------
Summary: Parallelize page store initialization during persistent
node recovery
Key: IGNITE-29234
URL: https://issues.apache.org/jira/browse/IGNITE-29234
Project: Ignite
Issue Type: Improvement
Reporter: Vladislav Pyatkov
Fix For: 2.20
When a persistent node has many caches and cache groups, startup can spend
considerable time initializing page stores before binary memory recovery.
{{GridCacheProcessor.CacheRecoveryLifecycle.beforeBinaryMemoryRestore()}}
currently iterates over persistent caches sequentially:
{code:java}
for (DynamicCacheDescriptor cacheDescriptor : persistentCaches())
preparePageStore(cacheDescriptor, true);
{code}
Initialization checks existing partition files and opens them to read page
store version headers. With many cache groups and partitions, these filesystem
operations accumulate on the startup thread.
The following stack was observed on Windows with JDK 21.0.2:
{noformat}
"main" cpu=42046.88ms elapsed=426.56s
java.lang.Thread.State: RUNNABLE
at sun.nio.fs.WindowsNativeDispatcher.CreateFile0(Native Method)
at sun.nio.fs.WindowsChannelFactory.open(...)
at java.nio.channels.AsynchronousFileChannel.open(...)
at o.a.i.internal.processors.cache.persistence.file.AsyncFileIO.<init>(...)
at
o.a.i.internal.processors.cache.persistence.file.AsyncFileIOFactory.create(...)
at
o.a.i.internal.processors.cache.persistence.file.FileVersionCheckingFactory.createPageStore(...)
at
o.a.i.internal.processors.cache.persistence.file.FilePageStoreManager.initDir(...)
at
o.a.i.internal.processors.cache.persistence.file.FilePageStoreManager.initForCache(...)
at
o.a.i.internal.processors.cache.persistence.file.FilePageStoreManager.initializeForCache(...)
at o.a.i.internal.processors.cache.GridCacheProcessor.preparePageStore(...)
at
o.a.i.internal.processors.cache.GridCacheProcessor$CacheRecoveryLifecycle.beforeBinaryMemoryRestore(...)
at
o.a.i.internal.processors.cache.persistence.GridCacheDatabaseSharedManager.restoreBinaryMemory(...)
{noformat}
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)