Browse Source

ansible playbook: limit container's cpu usage

Fabian Peter Hammerle 3 years ago
parent
commit
aa63d37284
2 changed files with 6 additions and 0 deletions
  1. 3 0
      CHANGELOG.md
  2. 3 0
      ansible-playbook.yml

+ 3 - 0
CHANGELOG.md

@@ -5,6 +5,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
 
 ## [Unreleased]
+### Added
+- ansible playbook: limit container's cpu usage
+
 ### Changed
 - healthcheck: probe [network-liveness](https://gitweb.torproject.org/torspec.git/tree/control-spec.txt)
   instead of tcp scanning via socks proxy

+ 3 - 0
ansible-playbook.yml

@@ -21,5 +21,8 @@
       read_only: yes
       cap_drop: [ALL]
       security_opts: [no-new-privileges]
+      cpu_quota: 5000
+      cpu_period: 10000
       memory: 128M
       restart_policy: unless-stopped
+      state: started