Skip to content

Commit 25893da

Browse files
authored
ci: adjust CPU and memory settings (#3671)
1 parent a3409cd commit 25893da

2 files changed

Lines changed: 12 additions & 4 deletions

File tree

.gitlab/generate-appsec.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
image: registry.ddbuild.io/images/mirror/datadog/dd-trace-ci:php-${PHP_MAJOR_MINOR}_bookworm-6
7272
variables:
7373
KUBERNETES_CPU_REQUEST: 3
74-
KUBERNETES_MEMORY_REQUEST: 3Gi
74+
KUBERNETES_MEMORY_REQUEST: 4Gi
7575
KUBERNETES_MEMORY_LIMIT: 4Gi
7676
parallel:
7777
matrix:

.gitlab/generate-profiler.php

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@
1818
tags: [ "arch:${ARCH}" ]
1919
image: registry.ddbuild.io/images/mirror/datadog/dd-trace-ci:${IMAGE_PREFIX}${PHP_MAJOR_MINOR}${IMAGE_SUFFIX}
2020
variables:
21-
KUBERNETES_CPU_REQUEST: 5
22-
KUBERNETES_MEMORY_REQUEST: 3Gi
23-
KUBERNETES_MEMORY_LIMIT: 4Gi
21+
KUBERNETES_CPU_REQUEST: 3
22+
KUBERNETES_CPU_LIMIT: 3
23+
KUBERNETES_MEMORY_REQUEST: 6Gi
24+
KUBERNETES_MEMORY_LIMIT: 6Gi
2425
CARGO_TARGET_DIR: /mnt/ramdisk/cargo # ramdisk??
2526
libdir: /tmp/datadog-profiling
2627
parallel:
@@ -38,6 +39,13 @@
3839
- if [ -f /sbin/apk ] && [ $(uname -m) = "aarch64" ]; then ln -sf ../lib/llvm17/bin/clang /usr/bin/clang; fi
3940

4041
- cd profiling
42+
- 'echo "nproc: $(nproc)"'
43+
- 'echo "KUBERNETES_CPU_REQUEST: ${KUBERNETES_CPU_REQUEST:-<unset>}"'
44+
- |
45+
if [ -n "${KUBERNETES_CPU_REQUEST:-}" ]; then
46+
export CARGO_BUILD_JOBS="${KUBERNETES_CPU_REQUEST}"
47+
fi
48+
echo "CARGO_BUILD_JOBS: ${CARGO_BUILD_JOBS}"
4149
- export TEST_PHP_EXECUTABLE=$(which php)
4250
- run_tests_php=$(find $(php-config --prefix) -name run-tests.php) # don't anticipate there being more than one
4351
- cp -v "${run_tests_php}" tests

0 commit comments

Comments
 (0)