High RAM usage

Very high RAM usage
I have the usual apps running on my session, Brave, VSCode, Discord, Spotify, ... but before that, the maximum amount of RAM I would use with these apps was 8-9Go maybe ?

When I reboot the computer, everything works fine. RAM usage is very low maybe 4-5Go with all the apps running. But after some time, the RAM usage starts increasing quickly.

I can't tell if it's related, but I started to observe high RAM usage soon after this event :

I'm not sure exactly when this started to happen, but it was after I used SDL graphic library for a game dev project. Malloc were not freed somewhere, and I launched the game so many times that it needed to use Swap memory at some point. I noticed the laptop was very slow, and realized swap limit was increased from 15Go to 30Go, I was at Mem:14/15G and Swp: 20/30G. Rebooted the computer, RAM was freed and computer was working fine...

  Kernel: 6.2.12-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 12.2.1
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
    root=UUID=394702fa-734d-4ffe-be2e-fc60fa05f197 rw [email protected]
    quiet splash rd.udev.log_priority=3 vt.global_cursor_default=0
    resume=UUID=6e50783f-d483-49d4-ae7f-6d21a4cb652d loglevel=3 ibt=off
  Desktop: KDE Plasma v: 5.27.4 tk: Qt v: 5.15.9 wm: kwin_x11 vt: 1 dm: SDDM
    Distro: Garuda Linux base: Arch Linux
  Type: Laptop System: ASUSTeK product: Vivobook_ASUSLaptop M3401QA_M3401QA
    v: 1.0 serial: <superuser required>
  Mobo: ASUSTeK model: M3401QA v: 1.0 serial: <superuser required>
    UEFI: American Megatrends LLC. v: M3401QA.303 date: 08/06/2021
  ID-1: BAT0 charge: 54.6 Wh (100.0%) condition: 54.6/63.0 Wh (86.5%)
    volts: 12.0 min: 12.0 model: ASUSTeK ASUS Battery type: Li-ion serial: N/A
    status: not charging cycles: 69
  Device-1: hidpp_battery_0 model: Logitech MX Keys Wireless Keyboard
    serial: <filter> charge: 100% (should be ignored) rechargeable: yes
    status: discharging
  Device-2: hidpp_battery_1 model: Logitech Wireless Mouse MX Master 3
    serial: <filter> charge: 100% (should be ignored) rechargeable: yes
    status: discharging
  Info: model: AMD Ryzen 7 5800H with Radeon Graphics bits: 64 type: MT MCP
    arch: Zen 3 gen: 4 level: v3 note: check built: 2021-22
    process: TSMC n7 (7nm) family: 0x19 (25) model-id: 0x50 (80) stepping: 0
    microcode: 0xA50000C
  Topology: cpus: 1x cores: 8 tpc: 2 threads: 16 smt: enabled cache:
    L1: 512 KiB desc: d-8x32 KiB; i-8x32 KiB L2: 4 MiB desc: 8x512 KiB
    L3: 16 MiB desc: 1x16 MiB
  Speed (MHz): avg: 1365 high: 2332 min/max: 1200/4462 boost: enabled
    scaling: driver: acpi-cpufreq governor: schedutil cores: 1: 2332 2: 1200
    3: 1198 4: 1200 5: 1813 6: 1200 7: 1200 8: 1200 9: 1200 10: 1200 11: 1360
    12: 1200 13: 1200 14: 1221 15: 1200 16: 1923 bogomips: 102200
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
  Vulnerabilities: <filter>
  Device-1: AMD Cezanne [Radeon Vega Series / Radeon Mobile Series]
    vendor: ASUSTeK driver: amdgpu v: kernel arch: GCN-5 code: Vega
    process: GF 14nm built: 2017-20 pcie: gen: 3 speed: 8 GT/s lanes: 16
    link-max: gen: 4 speed: 16 GT/s ports: active: HDMI-A-1,eDP-1 empty: none
    bus-ID: 03:00.0 chip-ID: 1002:1638 class-ID: 0300 temp: 46.0 C
  Device-2: IMC Networks USB2.0 HD UVC WebCam type: USB driver: uvcvideo
    bus-ID: 3-3:3 chip-ID: 13d3:5458 class-ID: fe01 serial: <filter>
  Display: x11 server: X.Org v: 21.1.8 with: Xwayland v: 23.1.1
    compositor: kwin_x11 driver: X: loaded: amdgpu unloaded: modesetting
    alternate: fbdev,vesa dri: radeonsi gpu: amdgpu display-ID: :0 screens: 1
  Screen-1: 0 s-res: 3840x1200 s-dpi: 96 s-size: 1015x317mm (39.96x12.48")
    s-diag: 1063mm (41.86")
  Monitor-1: HDMI-A-1 mapped: HDMI-A-0 pos: primary,bottom-r model: AOC 27B2
    serial: <filter> built: 2020 res: 1920x1080 dpi: 82 gamma: 1.2
    size: 598x336mm (23.54x13.23") diag: 686mm (27") ratio: 16:9 modes:
    max: 1920x1080 min: 720x400
  Monitor-2: eDP-1 mapped: eDP pos: top-left model: Samsung 0x4154
    built: 2020 res: 1920x1200 hz: 90 dpi: 161 gamma: 1.2
    size: 302x189mm (11.89x7.44") diag: 356mm (14") ratio: 16:10 modes:
    max: 2880x1800 min: 640x480
  API: OpenGL v: 4.6 Mesa 23.0.3 renderer: AMD Radeon Graphics (renoir LLVM
    15.0.7 DRM 3.49 6.2.12-zen1-1-zen) direct-render: Yes
  Device-1: AMD Renoir Radeon High Definition Audio driver: snd_hda_intel
    v: kernel bus-ID: 1-2:2 pcie: chip-ID: 0d8c:0102 gen: 3 class-ID: 0300
    speed: 8 GT/s lanes: 16 link-max: gen: 4 speed: 16 GT/s bus-ID: 03:00.1
    chip-ID: 1002:1637 class-ID: 0403
  Device-2: AMD ACP/ACP3X/ACP6x Audio Coprocessor vendor: ASUSTeK
    driver: N/A alternate: snd_pci_acp3x, snd_rn_pci_acp3x, snd_pci_acp5x,
    snd_pci_acp6x, snd_acp_pci, snd_rpl_pci_acp6x, snd_pci_ps,
    snd_sof_amd_renoir, snd_sof_amd_rembrandt pcie: gen: 3 speed: 8 GT/s
    lanes: 16 link-max: gen: 4 speed: 16 GT/s bus-ID: 03:00.5
    chip-ID: 1022:15e2 class-ID: 0480
  Device-3: AMD Family 17h/19h HD Audio vendor: ASUSTeK
    driver: snd_hda_intel v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 16
    link-max: gen: 4 speed: 16 GT/s bus-ID: 03:00.6 chip-ID: 1022:15e3
    class-ID: 0403
  Device-4: C-Media CM106 Like Sound Device type: USB
    driver: hid-generic,snd-usb-audio,usbhid
  API: ALSA v: k6.2.12-zen1-1-zen status: kernel-api tools: N/A
  Server-1: sndiod v: N/A status: off tools: aucat,midicat,sndioctl
  Server-2: PipeWire v: 0.3.70 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    4: pw-jack type: plugin tools: pactl,pw-cat,pw-cli,wpctl
  Device-1: MEDIATEK MT7921 802.11ax PCI Express Wireless Network Adapter
    vendor: AzureWave driver: mt7921e v: kernel pcie: gen: 2 speed: 5 GT/s
    lanes: 1 bus-ID: 01:00.0 chip-ID: 14c3:7961 class-ID: 0280
  IF: wlp1s0 state: up mac: <filter>
  Device-1: IMC Networks Wireless_Device type: USB driver: btusb v: 0.8
    bus-ID: 3-2:2 chip-ID: 13d3:3563 class-ID: e001 serial: <filter>
  Report: bt-adapter ID: hci0 rfk-id: 0 state: up address: <filter>
  Local Storage: total: 953.87 GiB used: 118.58 GiB (12.4%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Intel model: SSDPEKNU010TZ
    size: 953.87 GiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s
    lanes: 4 type: SSD serial: <filter> rev: 002C temp: 30.9 C scheme: GPT
  ID-1: / raw-size: 936.96 GiB size: 936.96 GiB (100.00%)
    used: 118.58 GiB (12.7%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
    used: 576 KiB (0.2%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
  ID-3: /home raw-size: 936.96 GiB size: 936.96 GiB (100.00%)
    used: 118.58 GiB (12.7%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-4: /var/log raw-size: 936.96 GiB size: 936.96 GiB (100.00%)
    used: 118.58 GiB (12.7%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-5: /var/tmp raw-size: 936.96 GiB size: 936.96 GiB (100.00%)
    used: 118.58 GiB (12.7%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
  Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: partition size: 16.61 GiB used: 0 KiB (0.0%)
    priority: -2 dev: /dev/nvme0n1p3 maj-min: 259:3
  ID-2: swap-2 type: zram size: 15.03 GiB used: 11.13 GiB (74.0%)
    priority: 100 dev: /dev/zram0
  System Temperatures: cpu: 57.0 C mobo: N/A gpu: amdgpu temp: 48.0 C
  Fan Speeds (RPM): cpu: 2800
  Processes: 465 Uptime: 2d 7m wakeups: 300 Memory: 15.03 GiB
  used: 12.72 GiB (84.6%) Init: systemd v: 253 default: graphical
  tool: systemctl Compilers: gcc: 12.2.1 clang: 15.0.7 Packages: pm: pacman
  pkgs: 2157 libs: 417 tools: octopi,pamac,paru,yay Shell: Zsh v: 5.9
  running-in: xfce4-terminal inxi: 3.3.26
Garuda (2.6.16-1):
  System install date:     2022-01-04
  Last full system update: 2023-04-29
  Is partially upgraded:   No
  Relevant software:       snapper(custom) NetworkManager mkinitcpio
  Windows dual boot:       No/Undetected
  Failed units:            

Also, does Garuda include scripts to reset Memory to default settings or something that could help me reset the Swap limit to 15Go ?

Have you run htop or btop to see which program is using the memory?

1 Like

Brave > Discord > plasmashell > VSCode > Spotify ...
The usual apps.

Please read
Unused RAM is wasted RAM.


yeh I know that, but Garuda should never need to use my full RAM + 5 to 10Go of Swap (at least it was not a month ago).
It's supposed to 'give back' RAM when the user needs it. RAM is not freed when I need some, instead it's just 'unavailable' and I have to use Swap memory.
And it slows down my computer, I have to reboot twice a day because it becomes very slow when I'm at Mem:15/15Go and Swp:20/30Go. I don't think this has to deal with 'Unused Memory is Wasted Memory'.

None of them processes are showing high mem usage? which process have you concluded to be using the memory?

1 Like

Closed all the Apps, Mem went back to 3.70Go and Swp to 1.50Go.

I runned the app in the following order and noted Mem Swp usage at every stage :

I opened few more tabs, it seems that it stabilized itself around 7.2Go Mem usage.

Note that Brave is back to 2.8% Mem usage instead of 14.5%.
Maybe some extension I use has memory leaks.

You can check this by viewing the process manager in Brave or other browsers (shift+esc) when the memory leak is happening.

I'm not sure how much this would help but you can try using VScodium instead of VScode. Vanilla VScode is full of telemetry which may be contributing to some memory usage, but I've never compared it myself so take that with a grain of salt.

KDE is definitely fat but I've only had this kind of memory problem with GNOME's software manager-related stuff on a different pc... o_o; hope you can get this sorted out!


It seems that the tabs just consume more and more memory with the time.

This is the mem usage at Brave Start

200k heaviest tabs
100k average
80k fdp viewers

And this is when I have a High Mem usage

900k+ for heaviest tabs
800k average


Have you tried other web browsers?

Have you run brave without any extensions?

Have you disabled any plasma widgets you installed?


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