Docker - ATENÇÃO: Nenhum suporte de limite de permuta

13

Eu estou executando o Docker (1.9.1) no Ubuntu 16.04. Quando executo docker info , a última linha da saída diz WARNING: No swap limit support .

INFO[0781] GET /v1.21/info                              
Containers: 0
Images: 0
Server Version: 1.9.1
Storage Driver: aufs
 Root Dir: /var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 0
 Dirperm1 Supported: true
Execution Driver: native-0.2
Logging Driver: json-file
Kernel Version: 4.4.0-62-generic
Operating System: Ubuntu 16.04.1 LTS (containerized)
CPUs: 2
Total Memory: 3.664 GiB
Name: lenovo
ID: A3ZV:2EVK:U5QB:O7CG:PEDL:SANK:X74X:QNLC:VOTK:GFDR:S24T:C5KT
WARNING: No swap limit support

O que esse aviso significa? Eu definitivamente tenho uma partição swap, como evidenciado por free -mh , embora eu não entenda porque meu swap não tem nenhuma entrada em available

total        used        free      shared  buff/cache   available
Mem:           3.7G        1.9G        182M        157M        1.6G           1.3G
Swap:          3.8G        2.9M        3.8G
    
por Stephen C 05.02.2017 / 22:16

1 resposta

12

O suporte ao limite de troca permite limitar a troca que o contêiner usa, consulte link

De acordo com link :

You can enable these capabilities on Ubuntu or Debian by following these instructions. Memory and swap accounting incur an overhead of about 1% of the total available memory and a 10% overall performance degradation, even if Docker is not running.

1) Log into the Ubuntu or Debian host as a user with sudo privileges.

2) Edit the /etc/default/grub file. Add or edit the GRUB_CMDLINE_LINUX line to add the following two key-value pairs:

GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1"

3) Update GRUB.

$ sudo update-grub
    
por 05.12.2017 / 16:18

Tags