You do not need to configure Xmx in the backup instance if it is not doing anything (or anything else), because it must stay close to the value that you set with Xms until it does the real job.
The Xmx switch determines the maximum amount of heap that a Java instance can use. Xms controls the starting amount.
If you install Xms small on the backup instance and Xmx according to what you need, and then switch to the backup instance (by killing the regular instance), it should work fine.
It may be necessary to actually stop / kill a regular Java process, depending on your available memory, so that the standby process allocates the whole heap that it needs as it moves from the initial heap size to the maximum.
Eric J.
source share