diff --git a/.github/workflows/push-images.yaml b/.github/workflows/push-images.yaml index 40f8bfeb..86f6db57 100644 --- a/.github/workflows/push-images.yaml +++ b/.github/workflows/push-images.yaml @@ -79,10 +79,11 @@ jobs: GRP_ID="$(id -gn)" USER_SLICE="user.slice/user-$(id -u).slice" USER_SERVICE="${USER_SLICE}/user@$(id -u).service" - AGENT_MEM_LIMIT="2147483648" - AGENT_GROUP_NAME="${USER_SERVICE}/agent-${{ github.run_id }}" DOCKER_MEM_LIMIT="30064771072" + AGENT_MEM_LIMIT="2147483648" DOCKER_GROUP_NAME="${USER_SERVICE}/docker-${{ github.run_id }}" + AGENT_GROUP_NAME="${USER_SERVICE}/agent-${{ github.run_id }}" + echo "::endgroup::" echo "::group::Install Control Group Tools" @@ -100,16 +101,20 @@ jobs: echo "::group::Set Control Group Limits" cgset -r cpu.shares=768 ${DOCKER_GROUP_NAME} cgset -r cpu.shares=500 ${AGENT_GROUP_NAME} - cgset -r memory.limit_in_bytes=${DOCKER_MEM_LIMIT} ${DOCKER_GROUP_NAME} - cgset -r memory.limit_in_bytes=${AGENT_MEM_LIMIT} ${AGENT_GROUP_NAME} - cgset -r memory.memsw.limit_in_bytes=${DOCKER_MEM_LIMIT} ${DOCKER_GROUP_NAME} - cgset -r memory.memsw.limit_in_bytes=${AGENT_MEM_LIMIT} ${AGENT_GROUP_NAME} + cgset -r memory.max=${DOCKER_MEM_LIMIT} ${DOCKER_GROUP_NAME} + cgset -r memory.max=${AGENT_MEM_LIMIT} ${AGENT_GROUP_NAME} + cgset -r memory.swap.max=${DOCKER_MEM_LIMIT} ${DOCKER_GROUP_NAME} + cgset -r memory.swap.max=${AGENT_MEM_LIMIT} ${AGENT_GROUP_NAME} echo "::endgroup::" echo "::group::Move Runner Processes to Control Group" sudo cgclassify --sticky -g cpu,memory:${AGENT_GROUP_NAME} $(pgrep 'Runner.Listener' | tr '\n' ' ') sudo cgclassify -g cpu,memory:${AGENT_GROUP_NAME} $(pgrep 'Runner.Worker' | tr '\n' ' ') echo "::endgroup::" + + ls -al /sys/fs/cgroup/user.slice + ls -al /sys/fs/cgroup/${USER_SLICE} + ls -al /sys/fs/cgroup/${USER_SERVICE} - name: Build and push UI image uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0