Option: maxElementsOffHeap
Note: | The use of this option requires a special license key. For further information contact your software supplier. |
The option maxElementsOffHeap defines the amount of off-heap memory available to the cache. Off-heap memory is a separate unit of memory available outside of the conventional JVM heap which can be used for caching.
This option's values are given as <number>k|K|m|M|g|G|t|T, where the units can be kilobytes (k|K), megabytes (m|M), gigabytes (g|G) or terabytes (t|T).
For example, maxMemoryOffHeap="2g" allots 2 gigabytes to off-heap memory. A value of 0 means no off-heap memory.
Before using off-heap memory, direct memory space, also called direct (memory) buffers, must be allocated. In most popular JVMs, direct memory space is allocated using the Java property -XX:MaxDirectMemorySize. This memory space, which is part of the Java process heap, is separate from the object heap allocated by -Xmx. The value allocated by -XX:MaxDirectMemorySize must not exceed the physical RAM, and is likely to be less than the total available RAM due to other memory requirements. The value allocated to direct memory should be at least 32MB more than the off-heap memory allocated to the caches.