I'm not sure, Vinoth, but the first suspect is that recovery is doing a lot of work when re-opening the environment with the smaller cache, and this starts a cycle of eviction/cleaning.
Are you doing a normal shutdown before re-opening with the smaller cache?
In any case perhaps the JE 5 change that impacts this situation is this one:
Improvements were made to recovery (Environment open) performance by changing the behavior of checkpoints in certain cases. Recovery should always be very quick after the following types of checkpoints:
CheckpointConfig.setMinimizeRecoveryTime(true)is used along with an explicit checkpoint performed by calling the
Environment.closeis called, since it performs a final checkpoint.
In addition, a problem was fixed where periodic checkpoints (performed by the checkpointer thread or by calling
Environment.checkpoint) would cause long recovery times under certain circumstances. As a part of this work, the actions invoked by ReplicatedEnvironment.shutdownGroup() were streamlined to use the setMinimizeRecoveryTime() option and to reduce spurious timeouts during the shutdown processing. [#19559]