You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -27,7 +27,7 @@ A Java application's memory has several parts, and there are different ways to d
27
27
28
28
Heap memory stores all class instances and arrays. Each Java virtual machine (JVM) has only one heap area, which is shared among threads.
29
29
30
-
Spring Boot Actuator can observe the value of heap memory. Spring Boot Actuator takes the heap value as part of `jvm.memory.used/committed/max`. For more information, see the [jvm.memory.used/committed/max](tools-to-troubleshoot-memory-issues.md#jvmmemoryusedcommittedmax) section in [Tools to troubleshoot memory issues](tools-to-troubleshoot-memory-issues.md).
30
+
Spring Boot Actuator can observe the value of heap memory. Spring Boot Actuator takes the heap value as part of `jvm.memory.used/committed/max`. For more information, see the [jvm.memory.used/committed/max](../enterprise/tools-to-troubleshoot-memory-issues.md#jvmmemoryusedcommittedmax) section in [Tools to troubleshoot memory issues](../enterprise/tools-to-troubleshoot-memory-issues.md).
31
31
32
32
Heap memory is divided into *young generation* and *old generation*. These terms are described in the following list, along with related terms.
33
33
@@ -72,7 +72,7 @@ Full GC or major GC does garbage collection in the entire heap. Full GC can also
72
72
73
73
The maximum heap size influences the frequency of minor GC and full GC. The maximum metaspace and maximum direct memory size influence full GC.
74
74
75
-
When you set the maximum heap size to a lower value, garbage collections occur more frequently, which slow the app a little, but better limits the memory usage. When you set the maximum heap size to a higher value, garbage collections occur less frequently, which may create more out-of-memory (OOM) risk. For more information, see the [Types of out-of-memory issues](how-to-fix-app-restart-issues-caused-by-out-of-memory.md#types-of-out-of-memory-issues) section of [App restart issues caused by out-of-memory issues](how-to-fix-app-restart-issues-caused-by-out-of-memory.md).
75
+
When you set the maximum heap size to a lower value, garbage collections occur more frequently, which slow the app a little, but better limits the memory usage. When you set the maximum heap size to a higher value, garbage collections occur less frequently, which may create more out-of-memory (OOM) risk. For more information, see the [Types of out-of-memory issues](../enterprise/how-to-fix-app-restart-issues-caused-by-out-of-memory.md#types-of-out-of-memory-issues) section of [App restart issues caused by out-of-memory issues](../enterprise/how-to-fix-app-restart-issues-caused-by-out-of-memory.md).
76
76
77
77
Metaspace and direct memory can be collected only by full GC. When metaspace or direct memory is full, full GC will occur.
78
78
@@ -86,7 +86,7 @@ Applications in Azure Spring Apps run in container environments. For more inform
86
86
87
87
### Important JVM options
88
88
89
-
You can configure the maximum size of each part of memory by using JVM options. You can set JVM options by using Azure CLI commands or through the Azure portal. For more information, see the [Modify configurations to fix problems](tools-to-troubleshoot-memory-issues.md#modify-configurations-to-fix-problems) section of [Tools to troubleshoot memory issues](tools-to-troubleshoot-memory-issues.md).
89
+
You can configure the maximum size of each part of memory by using JVM options. You can set JVM options by using Azure CLI commands or through the Azure portal. For more information, see the [Modify configurations to fix problems](../enterprise/tools-to-troubleshoot-memory-issues.md#modify-configurations-to-fix-problems) section of [Tools to troubleshoot memory issues](../enterprise/tools-to-troubleshoot-memory-issues.md).
90
90
91
91
The following list describes the JVM options:
92
92
@@ -156,9 +156,9 @@ Overall, when configuring maximum memory sizes, you should consider the usage of
156
156
157
157
## Java OOM
158
158
159
-
OOM means the application is out of memory. There are two different concepts: container OOM and JVM OOM. For more information, see [App restart issues caused by out-of-memory issues](how-to-fix-app-restart-issues-caused-by-out-of-memory.md).
159
+
OOM means the application is out of memory. There are two different concepts: container OOM and JVM OOM. For more information, see [App restart issues caused by out-of-memory issues](../enterprise/how-to-fix-app-restart-issues-caused-by-out-of-memory.md).
160
160
161
161
## See also
162
162
163
-
-[App restart issues caused by out-of-memory issues](how-to-fix-app-restart-issues-caused-by-out-of-memory.md)
164
-
-[Tools to troubleshoot memory issues](tools-to-troubleshoot-memory-issues.md)
163
+
-[App restart issues caused by out-of-memory issues](../enterprise/how-to-fix-app-restart-issues-caused-by-out-of-memory.md)
164
+
-[Tools to troubleshoot memory issues](../enterprise/tools-to-troubleshoot-memory-issues.md)
Copy file name to clipboardExpand all lines: articles/spring-apps/enterprise/how-to-fix-app-restart-issues-caused-by-out-of-memory.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,7 +43,7 @@ The **Resource health** page on the Azure portal shows app restart events due to
43
43
44
44
The metrics *App memory Usage*, `jvm.memory.used`, and `jvm.memory.committed` provide a view of memory usage. For more information, see the [Metrics](tools-to-troubleshoot-memory-issues.md#metrics) section of [Tools to troubleshoot memory issues](tools-to-troubleshoot-memory-issues.md). Configure the maximum memory sizes in JVM options to ensure that memory is under the limit.
45
45
46
-
The sum of the maximum memory sizes of all the parts in the [Java memory model](concepts-for-java-memory-management.md#java-memory-model) should be less than the real available app memory. To set your maximum memory sizes, see the typical memory layout described in the [Memory usage layout](concepts-for-java-memory-management.md#memory-usage-layout) section of [Java memory management](concepts-for-java-memory-management.md).
46
+
The sum of the maximum memory sizes of all the parts in the [Java memory model](../basic-standard/concepts-for-java-memory-management.md#java-memory-model) should be less than the real available app memory. To set your maximum memory sizes, see the typical memory layout described in the [Memory usage layout](../basic-standard/concepts-for-java-memory-management.md#memory-usage-layout) section of [Java memory management](../basic-standard/concepts-for-java-memory-management.md).
47
47
48
48
Find a balance when you set the maximum memory size. When you set the maximum memory size too high, there's a risk of container OOM. When you set the maximum memory size too low, there's a risk of JVM OOM, and garbage collection will be of and will slow down the app.
49
49
@@ -70,5 +70,5 @@ Metaspace memory is usually stable.
Copy file name to clipboardExpand all lines: articles/spring-apps/enterprise/tools-to-troubleshoot-memory-issues.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,7 +57,7 @@ App memory usage is a percentage equal to the app memory used divided by the app
57
57
58
58
For JVM memory, there are three metrics: `jvm.memory.used`, `jvm.memory.committed`, and `jvm.memory.max`, which are described in the following list.
59
59
60
-
"JVM memory" isn't a clearly defined concept. Here, `jvm.memory` is the sum of [heap memory](concepts-for-java-memory-management.md#heap-memory) and former permGen part of [non-heap memory](concepts-for-java-memory-management.md#non-heap-memory). JVM memory doesn't include direct memory or other memory like the thread stack. Spring Boot Actuator gathers these three metrics and determines the scope of `jvm.memory`.
60
+
"JVM memory" isn't a clearly defined concept. Here, `jvm.memory` is the sum of [heap memory](../basic-standard/concepts-for-java-memory-management.md#heap-memory) and former permGen part of [non-heap memory](../basic-standard/concepts-for-java-memory-management.md#non-heap-memory). JVM memory doesn't include direct memory or other memory like the thread stack. Spring Boot Actuator gathers these three metrics and determines the scope of `jvm.memory`.
61
61
62
62
-`jvm.memory.used` is the amount of used JVM memory, including used heap memory and used former permGen in non-heap memory.
63
63
@@ -69,13 +69,13 @@ For JVM memory, there are three metrics: `jvm.memory.used`, `jvm.memory.committe
69
69
70
70
-`jvm.memory.max` is the maximum amount of JVM memory, not to be confused with the real available amount.
71
71
72
-
The value of `jvm.memory.max` can sometimes be confusing because it can be much higher than the available app memory. To clarify, `jvm.memory.max` is the sum of all maximum sizes of heap memory and the former permGen part of [non-heap memory](concepts-for-java-memory-management.md#non-heap-memory), regardless of the real available memory. For example, if an app is set with 1 GB of memory in the Azure Spring Apps portal, then the default heap memory size is 0.5 GB. For more information, see the [Default maximum heap size](concepts-for-java-memory-management.md#default-maximum-heap-size) section of [Java memory management](concepts-for-java-memory-management.md).
72
+
The value of `jvm.memory.max` can sometimes be confusing because it can be much higher than the available app memory. To clarify, `jvm.memory.max` is the sum of all maximum sizes of heap memory and the former permGen part of [non-heap memory](../basic-standard/concepts-for-java-memory-management.md#non-heap-memory), regardless of the real available memory. For example, if an app is set with 1 GB of memory in the Azure Spring Apps portal, then the default heap memory size is 0.5 GB. For more information, see the [Default maximum heap size](../basic-standard/concepts-for-java-memory-management.md#default-maximum-heap-size) section of [Java memory management](../basic-standard/concepts-for-java-memory-management.md).
73
73
74
74
If the default *compressed class space* size is 1 GB, then the value of `jvm.memory.max` is larger than 1.5 GB regardless of whether the app memory size 1 GB. For more information, see [Java Platform, Standard Edition HotSpot Virtual Machine Garbage Collection Tuning Guide: Other Considerations](https://docs.oracle.com/javase/9/gctuning/other-considerations.htm) in the Oracle documentation.
75
75
76
76
#### jvm.gc.memory.allocated/promoted
77
77
78
-
These two metrics are for observing Java garbage collection (GC). For more information, see the [Java garbage collection](concepts-for-java-memory-management.md#java-garbage-collection) section of [Java memory management](concepts-for-java-memory-management.md). The maximum heap size influences the frequency of minor GC and full GC. The maximum metaspace and maximum direct memory size influence full GC. If you want to adjust the frequency of garbage collection, consider modifying the following maximum memory sizes.
78
+
These two metrics are for observing Java garbage collection (GC). For more information, see the [Java garbage collection](../basic-standard/concepts-for-java-memory-management.md#java-garbage-collection) section of [Java memory management](../basic-standard/concepts-for-java-memory-management.md). The maximum heap size influences the frequency of minor GC and full GC. The maximum metaspace and maximum direct memory size influence full GC. If you want to adjust the frequency of garbage collection, consider modifying the following maximum memory sizes.
79
79
80
80
-`jvm.gc.memory.allocated` is the amount of increase in the size of the young generation memory pool after one GC and before the next. This value reflects minor GC.
81
81
@@ -97,7 +97,7 @@ For more information, see [Capture heap dump and thread dump manually and use Ja
97
97
98
98
## Modify configurations to fix problems
99
99
100
-
Some issues you might identify include [container OOM](how-to-fix-app-restart-issues-caused-by-out-of-memory.md#fix-app-restart-issues-due-to-oom), heap memory that's too large, and abnormal garbage collection. If you identify any of these issues, you may need to configure the maximum memory size in the JVM options. For more information, see the [Important JVM options](concepts-for-java-memory-management.md#important-jvm-options) section of [Java memory management](concepts-for-java-memory-management.md#important-jvm-options).
100
+
Some issues you might identify include [container OOM](how-to-fix-app-restart-issues-caused-by-out-of-memory.md#fix-app-restart-issues-due-to-oom), heap memory that's too large, and abnormal garbage collection. If you identify any of these issues, you may need to configure the maximum memory size in the JVM options. For more information, see the [Important JVM options](../basic-standard/concepts-for-java-memory-management.md#important-jvm-options) section of [Java memory management](../basic-standard/concepts-for-java-memory-management.md#important-jvm-options).
101
101
102
102
You can modify the JVM options by using the Azure portal or the Azure CLI.
0 commit comments