-
Notifications
You must be signed in to change notification settings - Fork 53
Java Memory Usage
The Java heap is the area of memory used to store objects instantiated by the applications running on the Java Virtual Machine (JVM). The Maximum Java Heap Size (Xmx) is the maximum amount of memory that a Java application can use. Objects in the heap can be shared between threads. Each thread in a Java application has its own stack. The stack is also used to hold return addresses, function/method call arguments, etc. So if a thread tends to process large structures via recursive algorithms, it may need a large stack for all those return addresses and such. With the Sun JVM, you can set that size via that parameter.
The default values for Xmx is based on the physical memory of the machine. From Java 11 the Xmx value is 25% of the available memory with a maximum of 25 GB. owever, where there is 2 GB or less of physical memory, the value set is 50% of available memory with a minimum value of 16 MB and a maximum value of 512 MB.
Use these java command-line parameters to control the memory usage:
- Use
-Xmxto specify the maximum heap size - Use
-Xmsto specify the initial Java heap size - Use
-Xssto set the Java thread stack size
Example to specify the amount of memory the JVM should use when starting a core system:
java -jar arrowhead-{core-system}-{version}.jar -Xms128M -Xmx1G
JVM will startup with 128 megabytes of memory and will allow the process to use up to 1 gigabyte of memory
Note: The higher traffic is expected, the more memory will be necessary. A lower Xmx value will cause a decrease in performance due to JVM has to force frequent garbage collections in order to free up space, also if the Xmx value is lower than the amount of live data, it might trigger OutOfMemoryError.
Certificates
Quick start
How to contribute?
- Inter-Cloud setup
- Java Memory Usage
- MySQL Connections
- Change Database Engine
- Compile Only One Module
Service Registry
- Service Registry - Overview
- Service Registry - Services
- Service Registry - Management
- Service Registry - Configuration
Orchestrator
- Orchestrator - Overview
- Orchestrator - Services
- Orchestrator - Management
- Orchestrator - Configuration
Authorization
- Authorization - Overview
- Authorization - Services
- Authorization - Management
- Authorization - Configuration
Gatekeeper
Gateway
Event Handler
- Event Handler - Overview
- Event Handler - Services
- Event Handler - Management
- Event Handler - Configuration
Choreographer
- Choreographer - Overview
- Choreographer - Services
- Choreographer - Management
- Choreographer - Configuration
Quality of Service Monitor
Certificate Authority
- Certificate Authority - Overview
- Certificate Authority - Services
- Certificate Authority - Management
- Certificate Authority - Configuration
System Registry
- System Registry - Overview
- System Registry - Services
- System Registry - Management
- System Registry - Configuration
Device Registry
- Device Registry - Overview
- Device Registry - Services
- Device Registry - Management
- Device Registry - Configuration
Onboarding
Data Manager
Time Manager
Plant Description Engine
- Plant Description Engine - Overview
- Plant Description Engine - Services
- Plant Description Engine - Management
- Plant Description Engine - Configuration
HawkBit Configuration Manager
Device Hub