Nexus Repository Memory Overview
The sections below explain the different configurable memory types, Java arguments for managing certain memory configurations, and examples of using those Java arguments.
Configurable Memory Types
The following describes the configurable memory types for Sonatype Nexus Repository deployments; visit the Configuring the Runtime Environment page to learn how to change the default memory settings.
Java Virtual Machine (JVM) Heap Memory
Stores the objects created by the Java application. The JVM manages this space, and a special process called garbage collection automatically cleans up unused objects to free up memory.
You must specify a min (-Xms) and max (-Xmx); these values should be identical
Do not increase the heap memory larger than recommendations or set the min and max to be different; this will cause performance issues
Min allowable is 2703M
If you go beyond 8G, ensure there is enough RAM to handle and that G1GC garbage collection is enabled
Host or OS Physical Memory (RAM)
Total memory that is allocated to the operating system or virtual hardware. Related to the node.
Min allowable is 8G; no max limit
Minimum unallocated host physical memory should be no less than 1/3 of total physical RAM to allow for virtual memory swap
max heap + max direct memory <= host physical/RAM * 2/3
JVM Direct Memory
Reserved section of the operating system's physical memory that Java programs access directly, bypassing and completely independent of heap memory. This is allocated outside of and distinctly from heap memory and is managed by application code that needs to process large amounts of data at once.
Required only for legacy OrientDB
Min allowable is 2703M
Must configure a max value
(host physical/RAM * 2/3) - JVM max heap
Example Maximum Memory Configurations
The table provides examples of memory configuration using the Java arguments.
See the memory-related Java arguments section to learn more.
Physical/RAM Memory | PostgreSQL | H2 | OrientDB |
---|---|---|---|
8GB | -Xms4G -Xmx4G | -Xms4G -Xmx4G | -Xms2703M -Xmx2703M -XX:MaxDirectMemorySize=2703M |
16GB | -Xms8G -Xmx8G | -Xms8G -Xmx8G | -Xms4G -Xmx4G -XX:MaxDirectMemorySize=6717M |
32GB | -Xms16G -Xmx16G | Not applicable * | Not applicable * |
64GB | -Xms32G -Xmx32G | Not applicable * | Not applicable * |
* Deployments of this scale should use PostgreSQL