Skip to content

Commit 4ecbe85

Browse files
authored
Merge pull request #85 from axiom-data-science/readme-use-erddap-memory
Update README to favor ERDDAP_MEMORY usage (same Xms/Xmx)
2 parents 450425d + 38e1803 commit 4ecbe85

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

README.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,17 +179,26 @@ Any number of these options can be taken to configure your ERDDAP container inst
179179
180180
This is **highly** recommended, or nothing will persist across container restarts (logs/cache/etc.)
181181
182-
5. Specify the amount of memory to be allocated:
182+
5. Specify the amount of heap memory (using Java's `Xms` and `Xmx`) to be allocated:
183183

184184
``` bash
185185
docker run \
186186
-p 8080:8080 \
187-
--env ERDDAP_MIN_MEMORY=4G --env ERDDAP_MAX_MEMORY=8G
187+
--env ERDDAP_MEMORY=10G
188188
... \
189189
axiom/docker-erddap
190190
```
191191

192-
Note that both environment variables will fall back to a single ERDDAP_MEMORY variable, which in turn falls back to 4G by default.
192+
You may also explicity set `ERDDAP_MIN_MEMORY` and `ERDDAP_MAX_MEMORY` value (these map to `Xms` and `Xmx` respectively),
193+
but generally the best practice is to set these to the same value to prevent costly heap resizing at runtime.
194+
195+
``` bash
196+
docker run \
197+
-p 8080:8080 \
198+
--env ERDDAP_MIN_MEMORY=8G --env ERDDAP_MAX_MEMORY=8G
199+
... \
200+
axiom/docker-erddap
201+
```
193202

194203
Alternatively, you can set `ERDDAP_MAX_RAM_PERCENTAGE` set the maximum Java heap size to a percentage of the memory available to the container. This option sets the JVM option `-XX:MaxRAMPercentage`. For example, to limit the container's memory to 10GB and allow the Java heap size to use 90% of that amount:
195204

0 commit comments

Comments
 (0)