|[cross-project-issues-dev] New environment variables on CI instances|
[TL;DR: no impact for 99.9% of projects]
Yesterday, we've setup a couple of environment variables on all CI instances at Eclipse. It ensures that default values for max heap size and java temp dir are set to sensible values. The environment variables are the following:
The values of all these environment variables are the same: "-Xmx2G -Djava.io.tmpdir=/tmp/<ci_user_name>"
For most of projects, it should not change anything. But for those who are parsing the output of the JVM at startup, it will introduce some new outputs (like JDT, see ). Indeed, when JAVA_TOOL_OPTIONS is defined, most JDKs (Oracle, OpenJDK, probably IBM's as well) print the following line to stderr:
Picked up JAVA_TOOL_OPTIONS: -Xmx2G -Djava.io.tmpdir=/tmp/<ci_user_name>
This is unavoidable except if you unset the environment variable. Please don't do that except very extraordinary cases.
The reasoning for setting JAVA_TOOL_OPTIONS on the CI instances is to easily prevent java to define on its own the max heap size. By default on most JVM implementation, it's something like 25% of the machine RAM.
CI instances at Eclipse currently runs on machines with 64GB or 128GB of RAM, making the default value way too high for a shared environment. Setting JAVA_TOOL_OPTIONS is our only way to make the default a more sensible one for every single Java process spawned by builds.
Making sure that projects actually pass a sensible value is an impossible task otherwise. Of course, any project can decide to override the default values by specifying a different one on the command line. E.g., giving a different -Xmx on the command line will override the value from JAVA_TOOL_OPTIONS.
Mikaël Barbero - Eclipse Foundation
IT Services - Release Engineering
📱 (+33) 642 028 039
Description: Message signed with OpenPGP
Back to the top