SUSE Support

Here When You Need Us

Enabling swap accounting for Docker

This document (7016754) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server 12 Service Pack 2
SUSE Linux Enterprise Server 12 Service Pack 3
SUSE Linux Enterprise Server 12 Service Pack 4
SUSE Linux Enterprise Server 12 Service Pack 5
SUSE Linux Enterprise Server 15
SUSE Linux Enterprise Server 15 Service Pack 1
SUSE Linux Enterprise Server 15 Service Pack 2
SUSE Linux Enterprise Server 15 Service Pack 3

Situation

The following warning may be generated when the Docker host kernel does not take swap accounting into consideration:

WARNING: Your kernel does not support cgroup swap limit.
WARNING: Your kernel does not support swap limit capabilities. Limitation discarded.

Resolution

To remove this warning message perform the following steps:
  • Start YaST, and select System > Boot Loader
  • Click 'Kernel Parameters'
  • Enter the following strings inside of the “Optional Kernel Command Line Parameter”:
    swapaccount=1
  • Press the OK button
  • Reboot your machine

Alternatively:

  • edit the /etc/default/grub file
  • Add the following string inside of the GRUB_CMDLINE_LINUX_DEFAULT variable:
    swapaccount=1
  • Save the change
  • Run: “sudo update-bootloader –refresh
  • Reboot your machine

Additional Information

The swap warnings are not seen on SLES15 SP4

Cgroups v2 are supported starting with SLES15 SP2

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:7016754
  • Creation Date: 11-Aug-2015
  • Modified Date:04-Apr-2023
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.