Reputation: 2556
It seems like Ubuntu 18.04 broke docker swap support.
It's working fine in ubuntu 16.04, but this morning when I setup a new server with ubuntu 18.04 it didn't work.
Does anyone know how to enable swap accounting in docker, with ubuntu 18.04?
My docker info:
root@proxima:~# docker info
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 0
Server Version: 18.05.0-ce
Storage Driver: btrfs
Build Version: Btrfs v4.15.1
Library Version: 102
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 773c489c9c1b21a6d78b5c538cd395416ec50f88
runc version: 4fc53a81fb7c994640722ac585fa9ca548971871
init version: 949e6fa
Security Options:
apparmor
seccomp
Profile: default
Kernel Version: 4.15.0-20-generic
Operating System: Ubuntu 18.04 LTS
OSType: linux
Architecture: x86_64
CPUs: 8
Total Memory: 31.33GiB
Name: proxima
ID: HFCK:DE5O:VDGY:PK3Z:WXNP:OF4P:CGIV:Z3XE:TM7F:VIMG:7ZUH:CXNW
Docker Root Dir: /ozone/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
WARNING: No swap limit support
my etc/fstab:
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/md2 / ext4 errors=remount-ro,discard 0 1
/dev/md1 /boot ext4 errors=remount-ro,discard 0 1
/dev/sda3 swap swap defaults 0 0
/dev/sdb3 swap swap defaults 0 0
/dev/sda4 /ozone btrfs defaults,noatime,ssd,compress=zstd,commit=120 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs defaults 0 0
Upvotes: 1
Views: 2647
Reputation: 2556
the solution is to edit files in /etc/default/grub.d/ instead of editing the file /etc/default/grub .
Dunno why they changed it.
Upvotes: 2