Skip to contentSkip to conversation

travis.yml: Limit simultaneous jobs to 3

PATCH In review Thomas Huth 3 participants 3 messages Feb 17, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 travis.yml: Limit simultaneous jobs to 3

Even though the host machines that run the Travis CI jobs have quite a lot of CPUs (e.g. nproc in an aarch64 job reports 32), the containers on Travis are still limited to 2 vCPUs according to:

https://docs.travis-ci.com/user/reference/overview/#approx-boot-time

So we do not gain much when compiling with a job number based on the output of "getconf _NPROCESSORS_ONLN" - quite the contrary, the aarch64 containers are currently aborting quite often since they are running out of memory. Thus let's rather use a fixed number like 3 in the jobs here, so that e.g. two threads can actively run while a third one might be waiting for I/O operations to complete. This should hopefully fix the out-of-memory failures in the aarch64 CI jobs.

---
See also this URL for the explanation of the 32 vs 2 CPUs on aarch64:
https://travis-ci.community/t/nproc-reports-32-cores-on-arm64/5851

 .travis.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
.travis.yml +1 -1
index fc27fd6330..cc39a447e8 100644
@@ -88,7 +88,7 @@ git:
 # Common first phase for all steps
 before_install:
   - if command -v ccache ; then ccache --zero-stats ; fi
-  - export JOBS=$(($(getconf _NPROCESSORS_ONLN) + 1))
+  - export JOBS=3
   - echo "=== Using ${JOBS} simultaneous jobs ==="
 
 # Configure step - may be overridden
Signature · 1 line
2.27.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 28 lines · Thomas Huth

Even though the host machines that run the Travis CI jobs have quite a lot of CPUs (e.g. nproc in an aarch64 job reports 32), the containers on Travis are still limited to 2 vCPUs according to:

https://docs.travis-ci.com/user/reference/overview/#approx-boot-time

So we do not gain much when compiling with a job number based on the output of "getconf _NPROCESSORS_ONLN" - quite the contrary, the aarch64 containers are currently aborting quite often since they are running out of memory. Thus let's rather use a fixed number like 3 in the jobs here, so that e.g. two threads can actively run while a third one might be waiting for I/O operations to complete. This should hopefully fix the out-of-memory failures in the aarch64 CI jobs.

---
See also this URL for the explanation of the 32 vs 2 CPUs on aarch64:
https://travis-ci.community/t/nproc-reports-32-cores-on-arm64/5851

 .travis.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
.travis.yml +0 -0
index fc27fd6330..cc39a447e8 100644

.travis.yml git: · line 91

Quoted 5 lines
.travis.yml +1 -1
@@ -88,7 +88,7 @@ git:
 # Common first phase for all steps
 before_install:
   - if command -v ccache ; then ccache --zero-stats ; fi
-  - export JOBS=$(($(getconf _NPROCESSORS_ONLN) + 1))
+  - export JOBS=3

Maybe worth a comment around?

Quoted 4 lines
.travis.yml +0 -0
   - echo "=== Using ${JOBS} simultaneous jobs ==="
 
 # Configure step - may be overridden
#2 lore raw
In reply to Thomas Huth
Quoted 6 lines · Thomas Huth

Even though the host machines that run the Travis CI jobs have quite a lot of CPUs (e.g. nproc in an aarch64 job reports 32), the containers on Travis are still limited to 2 vCPUs according to:

https://docs.travis-ci.com/user/reference/overview/#approx-boot-time

Quoted 9 lines

So we do not gain much when compiling with a job number based on the output of "getconf _NPROCESSORS_ONLN" - quite the contrary, the aarch64 containers are currently aborting quite often since they are running out of memory. Thus let's rather use a fixed number like 3 in the jobs here, so that e.g. two threads can actively run while a third one might be waiting for I/O operations to complete. This should hopefully fix the out-of-memory failures in the aarch64 CI jobs.

Queued to testing/next, thanks.

Quoted 21 lines

---
See also this URL for the explanation of the 32 vs 2 CPUs on aarch64:
https://travis-ci.community/t/nproc-reports-32-cores-on-arm64/5851

 .travis.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
.travis.yml +1 -1
index fc27fd6330..cc39a447e8 100644
@@ -88,7 +88,7 @@ git:
 # Common first phase for all steps
 before_install:
   - if command -v ccache ; then ccache --zero-stats ; fi
-  - export JOBS=$(($(getconf _NPROCESSORS_ONLN) + 1))
+  - export JOBS=3
   - echo "=== Using ${JOBS} simultaneous jobs ==="
 
 # Configure step - may be overridden
Signature · 1 line
Alex Bennée