New issue
Advanced search Search tips

Issue 877143 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Bug



Sign in to add a comment

Limit CPU & RAM granted to an android swarming bot’s container

Project Member Reported by bpastene@chromium.org, Aug 23

Issue description

Follow-up from chops-pm-94

Docker/cgroups can limit RAM and CPU a container consumes. We should apply limits to containers on an android swarming bot so a single container can't consume 100% of everything on a host.
 
The version of docker-py we're using doesn't support "--cpus" arg. Gotta update it.
Project Member

Comment 2 by bugdroid1@chromium.org, Aug 27

The following revision refers to this bug:
  https://chromium.googlesource.com/infra/infra/+/0190dccc3ab9f75bdb7339cd08960d2174d4c609

commit 0190dccc3ab9f75bdb7339cd08960d2174d4c609
Author: Ben Pastene <bpastene@chromium.org>
Date: Mon Aug 27 22:48:33 2018

Bump infra's docker-py from 2.0.1 to 2.7.0.

Picks up support for cpu/mem resource limiting.

Bug: 877143
Change-Id: Ieca97436fbb542bf19b888a18e9b5560e66e3402
Reviewed-on: https://chromium-review.googlesource.com/1192183
Reviewed-by: John Budorick <jbudorick@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Ben Pastene <bpastene@chromium.org>

[modify] https://crrev.com/0190dccc3ab9f75bdb7339cd08960d2174d4c609/bootstrap/deps.pyl

Had a chat w/ friedman a while ago. IIRC, we decided on using cpu_shares to try and deprioritize containers when cpu cycles are short. Uploaded https://chromium-review.googlesource.com/c/infra/infra/+/1321310 for that.
Project Member

Comment 4 by bugdroid1@chromium.org, Nov 6

The following revision refers to this bug:
  https://chromium.googlesource.com/infra/infra/+/7a9e35be7b179b02e54d5df79049505571c88006

commit 7a9e35be7b179b02e54d5df79049505571c88006
Author: Ben Pastene <bpastene@chromium.org>
Date: Tue Nov 06 23:17:15 2018

Reduce cpu-shares for android docker containers to half the default.

R=friedman

Bug: 877143
Change-Id: Iaeea9ebbaa0d3901fa8eda08288eb8d7c64c0f2a
Reviewed-on: https://chromium-review.googlesource.com/c/1321310
Reviewed-by: Elliott Friedman <friedman@chromium.org>
Commit-Queue: Ben Pastene <bpastene@chromium.org>
Cr-Commit-Position: refs/heads/master@{#18824}
[modify] https://crrev.com/7a9e35be7b179b02e54d5df79049505571c88006/infra/services/android_docker/containers.py
[modify] https://crrev.com/7a9e35be7b179b02e54d5df79049505571c88006/infra/services/android_docker/test/containers_test.py

Sign in to add a comment