On Mon, Sep 20, 2021 at 3:07 PM Andy Seaborne <[email protected]> wrote: > > > > 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="..."
I am aware :) This is more regarding reasonable default values. > > 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. We have started using these options with Java 11 but they have been backported some updates of Java 8 as well: https://dzone.com/articles/best-practices-java-memory-arguments-for-container We have used MaxRAMPercentage=75 successfully and it seems that 80 also works. My AWS go-to guy says his experiments show that the OS needs around 200MB. Does JVM support matter if we're only talking about Fuseki's image where the base image and the JVM version are known?
