On 20/09/2021 12:02, Martynas Jusevičius wrote:
Hi,

I see that the default Dockerfile has hardcoded
JAVA_OPTIONS="-Xmx2048m -Xms2048m"
https://github.com/apache/jena/blob/main/jena-fuseki2/jena-fuseki-docker/Dockerfile#L107

https://docs.docker.com/engine/reference/builder/#env
"""
The environment variables set using ENV will persist when a container is run from the resulting image. You can view the values using docker inspect, and change them using docker run --env <key>=<value>.
"""
so they are the initial runtime settings.
When the container is run, you can pass in other values with

-e JAVA_OPTIONS="..."

This doesn't make much sense in a Docker environment where the
hardcoded value can either go over the limit of the container's memory
or fail to scale leaving memory unused.

On our own containers we have been using the Docker-specific Java
options for a while
https://stackoverflow.com/questions/54292282/clarification-of-meaning-new-jvm-memory-parameters-initialrampercentage-and-minr
More specifically: -XX:+UseContainerSupport -XX:MaxRAMPercentage=75

Would there be any reason why these shouldn't be used with Fuseki
containers and/or made the default in the Dockerfile?

Yes to -XX:+UseContainerSupport
Do all major JVMs now support +UseContainerSupport?

I don't know what a safe default of MaxRAMPercentage would be.
Correct heap size depends usage: about 2G per TDB dataset and leave space for mmap files; memory datasets are in heap so entiurely data size dependent.

    Andy



Martynas
atomgraph.com

Reply via email to