Skip to content

-Xscminaot / -Xscmaxaot

When you create a shared classes cache, you can use these options to set the minimum and maximum number of bytes in the class cache to reserve for AOT data.

Setting -Xscmaxaot is useful if you want a certain amount of cache space guaranteed for non-AOT data.

Syntax

Setting Effect Default
-Xscminaot<size> Set minimum size for AOT class cache 0
-Xscmaxaot<size> Set maximum size for AOT class cache The amount of free space in the cache

See Using -X command-line options for more information about the <size> parameter.

-Xscminaot

If -Xscminaot is not specified, no space is reserved for AOT data. However, AOT data is still written to the cache until the cache is full or the -Xscmaxaot limit is reached.

The value of -Xscminaot must not exceed the value of -Xscmx or -Xscmaxaot and should be considerably less than the total cache size, because AOT data can be created only for cached classes. If the value of -Xscminaot equals the value of -Xscmx, no class data or AOT data can be stored.

  • You can also adjust the -Xscminaot value by using:
  • You can also adjust the -Xscmaxaot value by using:

-Xscmaxaot

The value of this option must not be smaller than the value of -Xscminaot and must not be larger than the value of -Xscmx.

When you run an application with the -Xshareclasses:verbose option, the VM writes to the console the amount of AOT data that is not stored due to the current setting of the maximum AOT data space. You can also get this information by using the MemoryMXBean.getSharedClassCacheMaxAotUnstoredBytes() method in the com.ibm.lang.management API. You can increase the maximum AOT data space size accordingly if you want to add the unstored AOT data to the shared cache.

See also