My application uses Ignite as a persistent cache. The machine is fast, the cache folder is on a hard drive. The startup time is ca. 40 seconds. How can I make the startup faster? If subsequent cache access becomes slower, that is fine for me. I just need a quick startup during development.
The configuration (in Kotlin):
IgniteConfiguration().apply {
metricsLogFrequency = 0
dataStorageConfiguration = DataStorageConfiguration().apply {
this.storagePath = storagePath
defaultDataRegionConfiguration.apply {
isPersistenceEnabled = true
maxSize = 1024 * 1024 * 1024 // 1 GiB RAM
}
}
}
CacheConfiguration<K, V>(name).apply {
setExpiryPolicyFactory(CreatedExpiryPolicy.factoryOf(Duration.ETERNAL))
atomicityMode = CacheAtomicityMode.TRANSACTIONAL
}
Try to ensure that you shut down cleanly, that way when it starts, it does not have to replay the transaction log.
However, the real answer is: don't keep shutting down your Ignite server. Run it as a server process (ignite.sh) and have your Kotlin application connect as a client.