Skip to content

Commit 56b33e9

Browse files
committed
doc: add a notice about memory accounting overhead
The documentation for Debian and Ubuntu explains how to enable memory and swap accounting but doesn't explain why it is disabled in the first place. The problem with those subsystems is that they incurs a performance hit even when not used at all. Add this explanation. The provided figure are quite vague. The memory overhead is easily verifiable. It is for example cited in [RedHat documentation][]. For the performance hit, maybe the performance is better now, but a few years ago, it was said to be [between 6 and 15%][]. The goal is that people don't just enable memory accounting if they don't have a use for it. [RedHat documentation]: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Resource_Management_Guide/sec-memory.html [between 6 and 15%]: https://lwn.net/Articles/517562/ Signed-off-by: Vincent Bernat <[email protected]>
1 parent b909463 commit 56b33e9

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

docs/installation/ubuntulinux.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,14 @@ When users run Docker, they may see these messages when working with an image:
190190
WARNING: Your kernel does not support cgroup swap limit. WARNING: Your
191191
kernel does not support swap limit capabilities. Limitation discarded.
192192

193-
To prevent these messages, enable memory and swap accounting on your system. To
194-
enable these on system using GNU GRUB (GNU GRand Unified Bootloader), do the
195-
following.
193+
To prevent these messages, enable memory and swap accounting on your
194+
system. Enabling memory and swap accounting does induce both a memory
195+
overhead and a performance degradation even when Docker is not in
196+
use. The memory overhead is about 1% of the total available
197+
memory. The performance degradation is roughly 10%.
198+
199+
To enable memory and swap on system using GNU GRUB (GNU GRand Unified
200+
Bootloader), do the following:
196201

197202
1. Log into Ubuntu as a user with `sudo` privileges.
198203

0 commit comments

Comments
 (0)