Skip to content

Commit a37c941

Browse files
committed
Update documentation about memory limits.
1 parent 6e5cb30 commit a37c941

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

docs/reference-manual/native-image/BuildOutput.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ GraalVM Native Image: Generating 'helloworld' (executable)...
3030
Garbage collector: Serial GC (max heap size: 80% of RAM)
3131
--------------------------------------------------------------------------------
3232
Build resources:
33-
- 13.24GB of memory (42.7% of 31.00GB system memory, determined at start)
33+
- 13.24GB of memory (42.7% of system memory, reason: enough available)
3434
- 16 thread(s) (100.0% of 16 available processor(s), determined at start)
3535
[2/8] Performing analysis... [****] (4.5s @ 0.54GB)
3636
3,163 reachable types (72.5% of 4,364 total)
@@ -142,12 +142,13 @@ The `NATIVE_IMAGE_OPTIONS` environment variable is designed to be used by users,
142142
#### <a name="glossary-build-resources"></a>Build Resources
143143
The memory limit and number of threads used by the build process.
144144

145-
More precisely, the memory limit of the Java heap, so actual memory consumption can be even higher.
145+
More precisely, the memory limit of the Java heap, so actual memory consumption can be higher.
146146
Please check the [peak RSS](#glossary-peak-rss) reported at the end of the build to understand how much memory was actually used.
147-
By default, the build process tries to only use free memory (to avoid memory pressure on the build machine), and never more than 32GB of memory.
148-
If less than 8GB of memory are free, the build process falls back to use 85% of total memory.
147+
By default, the build process will use up to 85% of system memory in containers or CI environments, but never more than 32GB of memory.
148+
Otherwise, it tries to use available memory to avoid memory pressure on developer machines.
149+
If less than 8GB of memory are available, the build process falls back to use 85% of system memory.
149150
Therefore, consider freeing up memory if your machine is slow during a build, for example, by closing applications that you do not need.
150-
It is possible to overwrite the default behavior, for example with `-J-XX:MaxRAMPercentage=60.0` or `-J-Xmx16g`.
151+
It is possible to override the default behavior and set relative or absolute memory limits, for example with `-J-XX:MaxRAMPercentage=60.0` or `-J-Xmx16g`.
151152

152153
By default, the build process uses all available processors to maximize speed, but not more than 32 threads.
153154
Use the `--parallelism` option to set the number of threads explicitly (for example, `--parallelism=4`).

0 commit comments

Comments
 (0)