From c1d9e7c6fbae0614da33ff5c2d9677a303cccfd7 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Fri, 7 Aug 2015 14:31:33 +0200 Subject: [PATCH] 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 (cherry picked from commit 56b33e9f27fa9dc50cec16392ca01bd4234390f9) --- docs/installation/ubuntulinux.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/docs/installation/ubuntulinux.md b/docs/installation/ubuntulinux.md index 7f2e1fa199..bae68063c1 100644 --- a/docs/installation/ubuntulinux.md +++ b/docs/installation/ubuntulinux.md @@ -197,9 +197,14 @@ When users run Docker, they may see these messages when working with an image: WARNING: Your kernel does not support cgroup swap limit. WARNING: Your kernel does not support swap limit capabilities. Limitation discarded. -To prevent these messages, enable memory and swap accounting on your system. To -enable these on system using GNU GRUB (GNU GRand Unified Bootloader), do the -following. +To prevent these messages, enable memory and swap accounting on your +system. Enabling memory and swap accounting does induce both a memory +overhead and a performance degradation even when Docker is not in +use. The memory overhead is about 1% of the total available +memory. The performance degradation is roughly 10%. + +To enable memory and swap on system using GNU GRUB (GNU GRand Unified +Bootloader), do the following: 1. Log into Ubuntu as a user with `sudo` privileges.