Further optimize memory for Travis jobs #6150
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #6149.
I tested this PR by triggering several Travis jobs, and could see
processing
module succeeded 5 times in a row.In this PR,
CloseableDefaultBlockingPool
andCloseableStupidPool
for only unit testing to release buffers as soon as possible. Some tests can be further optimized to release buffers per parameterized run once Junit 4.13 is released which contains @BeforeParam/@AfterParam for Parameterized runner junit-team/junit4#1435. With this change,processing
module testing can be run with 1500m off-heap memory.processing
and others.processing
requires small heap and large off-heap memory, but others are opposite. I set the default memory configuration to-Xmx1500m -XX:MaxDirectMemorySize=512m
in${DRUID_HOME}/pom.xml
.processing
has its own configuration,-Xmx512m -XX:MaxDirectMemorySize=1500m
in${DRUID_HOME}/processing/pom.xml
. These configurations can also be set per Travis jobs using_JAVA_OPTIONS
, but I think it's better to put them inpom.xml
files to use those configurations whenever running tests even in local.parallel-test
spawns new processes, it's not easy to control the memory being used by each process.