This is an automated email from the ASF dual-hosted git repository.
dzamo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/drill.git
The following commit(s) were added to refs/heads/master by this push:
new 50b4ad819b [MINOR UPDATE]: Improve the Github CI memory constraint
workarounds (#2839)
50b4ad819b is described below
commit 50b4ad819b0b450c416184a19baf3a81a8773cd2
Author: James Turton <[email protected]>
AuthorDate: Wed Oct 25 07:05:33 2023 +0200
[MINOR UPDATE]: Improve the Github CI memory constraint workarounds (#2839)
* Add a 2GB swap file when setting up the Actions Runner.
* Remove /proc/sys/vm/drop_caches snake oil.
* Tune the heap and direct memory limits applied to the test suite.
---
.github/workflows/ci.yml | 18 ++++++++++++++----
pom.xml | 4 ++--
2 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index e83615ec90..586680c28e 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -48,20 +48,30 @@ jobs:
distribution: 'temurin'
java-version: ${{ matrix.java }}
cache: 'maven'
+ - name: Set up swap space
+ # Linux Action Runners come with 7GB of RAM which isn't quite enoough
+ # to run the test suite. Two workarounds are used below: a swap file is
+ # added to the Runner and memory hungry tests are run separately.
+ run: |
+ sudo sh -c "
+ fallocate -l 2G /tmp/swapfile
+ chmod 0600 /tmp/swapfile
+ mkswap /tmp/swapfile
+ swapon /tmp/swapfile
+ "
- name: Build and test
- # The total GitHub Actions memory is 7000Mb. But GitHub CI requires
some memory for the container to perform tests
run: |
- MAVEN_OPTS="-XX:+UseG1GC"
- sudo sh -c 'echo 1 > /proc/sys/vm/drop_caches' && \
mvn -P${{ matrix.profile }} install --batch-mode
--no-transfer-progress \
-DexcludedGroups=org.apache.drill.categories.EasyOutOfMemory \
-Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false
-Dmaven.wagon.httpconnectionManager.ttlSeconds=120
- name: Test Specific Categories # EasyOutOfMemory
run: |
- sudo sh -c 'echo 1 > /proc/sys/vm/drop_caches' && \
mvn -P${{ matrix.profile }} test -pl
org.apache.drill.exec:drill-java-exec \
-Dgroups=org.apache.drill.categories.EasyOutOfMemory \
-Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false
-Dmaven.wagon.httpconnectionManager.ttlSeconds=120
+ - name: Remove swap space
+ run : |
+ sudo swapoff /tmp/swapfile
checkstyle_protobuf:
name: Run checkstyle and generate protobufs
runs-on: ubuntu-latest
diff --git a/pom.xml b/pom.xml
index ecbf0a9bc9..a87d52c3d7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -90,8 +90,8 @@
<javax.validation.api>2.0.1.Final</javax.validation.api>
<asm.version>9.5</asm.version>
<excludedGroups />
- <memoryMb>2500</memoryMb>
- <directMemoryMb>4500</directMemoryMb>
+ <memoryMb>2560</memoryMb>
+ <directMemoryMb>2560</directMemoryMb>
<rat.skip>true</rat.skip>
<license.skip>true</license.skip>
<docker.repository>apache/drill</docker.repository>