How to enable swap accounting for memory cgroup?

I am trying to use minikube, but keep getting into trouble with enabling swap accounting. I have followed the guide on the docker docs, without any success. I also found a stack thread with the same solution.

Yes, I have sudo update-grub

My grub config:

     cat /etc/default/grub | grep 'GRUB_CMDLINE_LINUX'
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash rd.udev.log_priority=3 vt.global_cursor_default=0 systemd.unified_cgroup_hierarchy=1 resume=UUID=bef431c9-3bd8-4fcc-9de0-55d0e0864379 loglevel=3"
GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1"

Entire:

# GRUB boot loader configuration

GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="Garuda"
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash rd.udev.log_priority=3 vt.global_cursor_default=0 systemd.unified_cgroup_hierarchy=1 resume=UUID=bef431c9-3bd8-4fcc-9de0-55d0e0864379 loglevel=3"
GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1"

# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"

# Uncomment to enable booting from LUKS encrypted devices
#GRUB_ENABLE_CRYPTODISK=y

# Set to 'countdown' or 'hidden' to change timeout behavior,
# press ESC key to display menu.
GRUB_TIMEOUT=5

# Uncomment to use basic console
GRUB_TERMINAL_INPUT=console

# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
GRUB_GFXMODE=auto

# Uncomment to allow the kernel use the same resolution used by grub
GRUB_GFXPAYLOAD_LINUX=keep

# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
GRUB_DISABLE_RECOVERY=true

# Uncomment and set to the desired menu colors.  Used by normal and wallpaper
# modes only.  Entries specified as foreground/background.
#GRUB_COLOR_NORMAL="light-blue/black"
#GRUB_COLOR_HIGHLIGHT="light-cyan/blue"

# Uncomment one of them for the gfx desired, a image background or a gfxtheme
#GRUB_BACKGROUND="/path/to/wallpaper"
#GRUB_THEME="/path/to/gfxtheme"

# Uncomment to get a beep at GRUB start
#GRUB_INIT_TUNE="480 440 1"

# Uncomment to make GRUB remember the last selection. This requires
# setting 'GRUB_DEFAULT=saved' above.
#GRUB_SAVEDEFAULT=true

# Uncomment to disable submenus in boot menu
#GRUB_DISABLE_SUBMENU=y

GRUB_DISABLE_OS_PROBER=false
GRUB_THEME="/boot/grub/themes/starfield/theme.txt"

Here is the requested info:

System:    Kernel: 5.14.14-zen1-1-zen x86_64 bits: 64 compiler: gcc v: 11.1.0
parameters: BOOT_IMAGE=/vmlinuz-linux-zen root=UUID=271f832d-09f2-4b21-a369-ae6519f69c12 rw rootflags=subvol=@
cgroup_enable=memory swapaccount=1 quiet splash rd.udev.log_priority=3 vt.global_cursor_default=0
systemd.unified_cgroup_hierarchy=1 resume=UUID=bef431c9-3bd8-4fcc-9de0-55d0e0864379 cgroup_enable=memory
swapaccount=1 loglevel=3
Desktop: KDE Plasma 5.23.1 tk: Qt 5.15.2 info: latte-dock wm: kwin_x11 vt: 1 dm: SDDM Distro: Garuda Linux
base: Arch Linux
Machine:   Type: Desktop Mobo: ASUSTeK model: ROG STRIX B350-F GAMING v: Rev X.0x serial: <filter> UEFI: American Megatrends
v: 5603 date: 07/28/2020
CPU:       Info: 8-Core model: AMD Ryzen 7 1700 bits: 64 type: MT MCP arch: Zen family: 17 (23) model-id: 1 stepping: 1
microcode: 8001138 cache: L2: 4 MiB
flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm bogomips: 95808
Speed: 3250 MHz min/max: 1550/3000 MHz boost: enabled Core speeds (MHz): 1: 3250 2: 2570 3: 2567 4: 2562 5: 3115
6: 2736 7: 2572 8: 2720 9: 3264 10: 2568 11: 2555 12: 2571 13: 3152 14: 2964 15: 3419 16: 3119
Vulnerabilities: Type: itlb_multihit status: Not affected
Type: l1tf status: Not affected
Type: mds status: Not affected
Type: meltdown status: Not affected
Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl and seccomp
Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization
Type: spectre_v2 mitigation: Full AMD retpoline, IBPB: conditional, STIBP: disabled, RSB filling
Type: srbds status: Not affected
Type: tsx_async_abort status: Not affected
Graphics:  Device-1: NVIDIA GP102 [GeForce GTX 1080 Ti] vendor: eVga.com. driver: nvidia v: 470.74
alternate: nouveau,nvidia_drm bus-ID: 07:00.0 chip-ID: 10de:1b06 class-ID: 0300
Device-2: Logitech Webcam C930e type: USB driver: snd-usb-audio,uvcvideo bus-ID: 1-2:2 chip-ID: 046d:0843
class-ID: 0102
Display: x11 server: X.Org 1.20.13 compositor: kwin_x11 driver: loaded: nvidia display-ID: :0 screens: 1
Screen-1: 0 s-res: 3440x1440 s-dpi: 109 s-size: 802x333mm (31.6x13.1") s-diag: 868mm (34.2")
Monitor-1: DP-2 res: 3440x1440 dpi: 109 size: 800x330mm (31.5x13.0") diag: 865mm (34.1")
OpenGL: renderer: NVIDIA GeForce GTX 1080 Ti/PCIe/SSE2 v: 4.6.0 NVIDIA 470.74 direct render: Yes
Audio:     Device-1: NVIDIA GP102 HDMI Audio vendor: eVga.com. driver: snd_hda_intel v: kernel bus-ID: 07:00.1
chip-ID: 10de:10ef class-ID: 0403
Device-2: Advanced Micro Devices [AMD] Family 17h HD Audio vendor: ASUSTeK driver: snd_hda_intel v: kernel
bus-ID: 09:00.3 chip-ID: 1022:1457 class-ID: 0403
Device-3: Logitech Webcam C930e type: USB driver: snd-usb-audio,uvcvideo bus-ID: 1-2:2 chip-ID: 046d:0843
class-ID: 0102
Device-4: TC Electronic GoXLR type: USB driver: snd-usb-audio bus-ID: 3-1:2 chip-ID: 1220:8fe0 class-ID: 0102
Device-5: SAVITECH JDS Labs Element DAC type: USB driver: hid-generic,snd-usb-audio,usbhid bus-ID: 3-3:3
chip-ID: 262a:1048 class-ID: 0102
Sound Server-1: ALSA v: k5.14.14-zen1-1-zen running: yes
Sound Server-2: JACK v: 1.9.19 running: no
Sound Server-3: PulseAudio v: 15.0 running: yes
Sound Server-4: PipeWire v: 0.3.38 running: yes
Network:   Device-1: Intel I211 Gigabit Network vendor: ASUSTeK driver: igb v: kernel port: d000 bus-ID: 04:00.0
chip-ID: 8086:1539 class-ID: 0200
IF: enp4s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
IF-ID-1: br-0bf3a6706009 state: up speed: 10000 Mbps duplex: unknown mac: <filter>
IF-ID-2: br-0dc7692bb377 state: down mac: <filter>
IF-ID-3: docker0 state: down mac: <filter>
IF-ID-4: veth77931fc state: up speed: 10000 Mbps duplex: full mac: <filter>
RAID:      Supported mdraid levels: raid0
Device-1: md0 maj-min: 9:0 type: mdraid level: raid-0 status: active size: 849.75 GiB
Info: report: N/A blocks: 891025408 chunk-size: 512k super-blocks: 1.2
Components: Online:
0: sdb1 maj-min: 8:17 size: 425 GiB
1: sdc1 maj-min: 8:33 size: 425 GiB
Drives:    Local Storage: total: 2.54 TiB used: 1.08 TiB (42.5%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Samsung model: SSD 950 PRO 512GB size: 476.94 GiB block-size:
physical: 512 B logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter> rev: 2B0QBXX7 temp: 49.9 C
scheme: GPT
ID-2: /dev/nvme1n1 maj-min: 259:9 vendor: Samsung model: SSD 960 EVO 1TB size: 931.51 GiB block-size:
physical: 512 B logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter> rev: 3B7QCXE7 temp: 38.9 C
scheme: GPT
ID-3: /dev/sda maj-min: 8:0 vendor: Samsung model: SSD 850 EVO 250GB size: 232.89 GiB block-size: physical: 512 B
logical: 512 B speed: 6.0 Gb/s type: SSD serial: <filter> rev: 2B6Q scheme: GPT
ID-4: /dev/sdb maj-min: 8:16 vendor: Crucial model: CT525MX300SSD1 size: 489.05 GiB block-size: physical: 512 B
logical: 512 B speed: 6.0 Gb/s type: SSD serial: <filter> rev: R060 scheme: GPT
ID-5: /dev/sdc maj-min: 8:32 vendor: Samsung model: SSD 860 EVO 500GB size: 465.76 GiB block-size: physical: 512 B
logical: 512 B speed: 6.0 Gb/s type: SSD serial: <filter> rev: 4B6Q scheme: GPT
Partition: ID-1: / raw-size: 121.64 GiB size: 121.64 GiB (100.00%) used: 95.26 GiB (78.3%) fs: btrfs dev: /dev/nvme0n1p6
maj-min: 259:6
ID-2: /boot raw-size: 400 MiB size: 400 MiB (100.00%) used: 201.7 MiB (50.4%) fs: btrfs dev: /dev/nvme0n1p8
maj-min: 259:8
ID-3: /boot/efi raw-size: 100 MiB size: 96 MiB (96.00%) used: 25.5 MiB (26.6%) fs: vfat dev: /dev/nvme0n1p1
maj-min: 259:1
ID-4: /home raw-size: 250.86 GiB size: 250.86 GiB (100.00%) used: 211.06 GiB (84.1%) fs: btrfs dev: /dev/nvme0n1p7
maj-min: 259:7
ID-5: /var/log raw-size: 121.64 GiB size: 121.64 GiB (100.00%) used: 95.26 GiB (78.3%) fs: btrfs
dev: /dev/nvme0n1p6 maj-min: 259:6
ID-6: /var/tmp raw-size: 121.64 GiB size: 121.64 GiB (100.00%) used: 95.26 GiB (78.3%) fs: btrfs
dev: /dev/nvme0n1p6 maj-min: 259:6
Swap:      Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
ID-1: swap-1 type: zram size: 15.56 GiB used: 0 KiB (0.0%) priority: 100 dev: /dev/zram0
Sensors:   System Temperatures: cpu: 47.5 C mobo: 40.0 C gpu: nvidia temp: 59 C
Fan Speeds (RPM): cpu: 393 fan-2: 350 fan-3: 363 fan-4: 380 fan-6: 368 gpu: nvidia fan: 39%
Power: 12v: N/A 5v: N/A 3.3v: 3.31 vbat: 3.27
Info:      Processes: 535 Uptime: 4m wakeups: 0 Memory: 15.56 GiB used: 5.04 GiB (32.4%) Init: systemd v: 249 tool: systemctl
Compilers: gcc: 11.1.0 alt: 10 clang: 12.0.1 Packages: pacman: 2187 lib: 531 Shell: fish v: 3.3.1
running-in: konsole inxi: 3.3.07

There are no obvious differences between the docs and what you’ve configured, so
which bit doesn’t work?

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.