chore: optimization to reduce number of open TCP connections while ru… · googleapis/python-storage@fe6d7c9 · GitHub
Skip to content
This repository was archived by the owner on Mar 31, 2026. It is now read-only.

Commit fe6d7c9

Browse files
authored
chore: optimization to reduce number of open TCP connections while running zonal system tests (#1691)
chore: optimization to reduce number of open TCP connections while running zonal system tests 1. Increase `ulimit -n 10000` before ssh'ing into the VM where system tests for zonal buckets are running. 2. Delete `mrd` and `writer` instance and trigger `gc.collect()` ( this alone should suffice but increasing doing the above optimization to avoid future issues.
1 parent bee6089 commit fe6d7c9

3 files changed

Lines changed: 36 additions & 38 deletions

File tree

cloudbuild/run_zonal_tests.sh

Lines changed: 2 additions & 1 deletion

cloudbuild/zb-system-tests-cloudbuild.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ substitutions:
33
_ZONE: "us-central1-a"
44
_SHORT_BUILD_ID: ${BUILD_ID:0:8}
55
_VM_NAME: "py-sdk-sys-test-${_SHORT_BUILD_ID}"
6+
_ULIMIT: "10000" # 10k, for gRPC bidi streams
67

78

89

@@ -67,7 +68,7 @@ steps:
6768
# Execute the script on the VM via SSH.
6869
# Capture the exit code to ensure cleanup happens before the build fails.
6970
set +e
70-
gcloud compute ssh ${_VM_NAME} --zone=${_ZONE} --internal-ip --ssh-key-file=/workspace/.ssh/google_compute_engine --command="COMMIT_SHA=${COMMIT_SHA} _ZONAL_BUCKET=${_ZONAL_BUCKET} bash run_zonal_tests.sh"
71+
gcloud compute ssh ${_VM_NAME} --zone=${_ZONE} --internal-ip --ssh-key-file=/workspace/.ssh/google_compute_engine --command="ulimit -n {_ULIMIT}; COMMIT_SHA=${COMMIT_SHA} _ZONAL_BUCKET=${_ZONAL_BUCKET} bash run_zonal_tests.sh"
7172
EXIT_CODE=$?
7273
set -e
7374

tests/system/test_zonal.py

Lines changed: 32 additions & 36 deletions

0 commit comments

Comments
 (0)