High memory usage with nothing running

Hello kind people,

I’ve been using xfce on my laptop, but recently I got my hands on a cool desktop machine and decided to bring it back to life with Manjaro but this time using KDE, because why not …
I noticed that a lot (well not rly, but seems a lot for not having anything running) of memory is being used without having much running, see the picture. I have never had such high usage on my laptop, so I am worried.

Here is also inxi output:

System:
  Kernel: 5.10.41-1-MANJARO x86_64 bits: 64 compiler: gcc v: 11.1.0 
  parameters: BOOT_IMAGE=/boot/vmlinuz-5.10-x86_64 
  root=UUID=7954003a-9c38-44a6-9db6-db5fa26e4c82 rw quiet apparmor=1 
  security=apparmor resume=UUID=fa4ec151-e333-4ee7-958b-4c63a4e82b1b 
  udev.log_priority=3 
  Desktop: KDE Plasma 5.21.5 tk: Qt 5.15.2 wm: kwin_x11 vt: 1 dm: SDDM 
  Distro: Manjaro Linux base: Arch Linux 
Machine:
  Type: Desktop System: Gigabyte product: H410M H V2 v: -CF serial: <filter> 
  Mobo: Gigabyte model: H410M H V2 v: x.x serial: <filter> 
  UEFI: American Megatrends v: F1 date: 01/20/2021 
Battery:
  Message: No system battery data found. Is one present? 
Memory:
  RAM: total: 7.69 GiB used: 4.02 GiB (52.3%) 
  RAM Report: permissions: Unable to run dmidecode. Root privileges required. 
CPU:
  Info: 6-Core model: Intel Core i5-10400 bits: 64 type: MT MCP 
  arch: Comet Lake family: 6 model-id: A5 (165) stepping: 3 microcode: E0 
  cache: L2: 12 MiB bogomips: 69629 
  Speed: 1732 MHz min/max: 800/4300 MHz Core speeds (MHz): 1: 1732 2: 1798 
  3: 2949 4: 3342 5: 2863 6: 1715 7: 2681 8: 3009 9: 3691 10: 3604 11: 2065 
  12: 1642 
  Flags: 3dnowprefetch abm acpi adx aes aperfmperf apic arat arch_capabilities 
  arch_perfmon art avx avx2 bmi1 bmi2 bts clflush clflushopt cmov constant_tsc 
  cpuid cpuid_fault cx16 cx8 de ds_cpl dtes64 dtherm dts ept ept_ad erms est 
  f16c flexpriority flush_l1d fma fpu fsgsbase fxsr ht hwp hwp_act_window 
  hwp_epp hwp_notify ibpb ibrs ibrs_enhanced ida intel_pt invpcid 
  invpcid_single lahf_lm lm mca mce md_clear mmx monitor movbe mpx msr mtrr 
  nonstop_tsc nopl nx pae pat pbe pcid pclmulqdq pdcm pdpe1gb pebs pge pln pni 
  popcnt pse pse36 pts rdrand rdseed rdtscp rep_good sdbg sep smap smep ss 
  ssbd sse sse2 sse4_1 sse4_2 ssse3 stibp syscall tm tm2 tpr_shadow tsc 
  tsc_adjust tsc_deadline_timer vme vmx vnmi vpid x2apic xgetbv1 xsave xsavec 
  xsaveopt xsaves xtopology xtpr 
  Vulnerabilities: Type: itlb_multihit status: KVM: VMX disabled 
  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: Enhanced IBRS, IBPB: conditional, RSB filling 
  Type: srbds status: Not affected 
  Type: tsx_async_abort status: Not affected 
Graphics:
  Device-1: NVIDIA TU117 [GeForce GTX 1650] driver: nvidia v: 465.31 
  alternate: nouveau,nvidia_drm bus-ID: 01:00.0 chip-ID: 10de:1f82 
  class-ID: 0300 
  Display: x11 server: X.Org 1.20.11 compositor: kwin_x11 driver: 
  loaded: nvidia display-ID: :0 screens: 1 
  Screen-1: 0 s-res: 1920x1080 s-dpi: 90 s-size: 542x301mm (21.3x11.9") 
  s-diag: 620mm (24.4") 
  Monitor-1: DP-2 res: 1920x1080 dpi: 70 size: 698x393mm (27.5x15.5") 
  diag: 801mm (31.5") 
  OpenGL: renderer: NVIDIA GeForce GTX 1650/PCIe/SSE2 v: 4.6.0 NVIDIA 465.31 
  direct render: Yes 
Audio:
  Device-1: Intel Comet Lake PCH cAVS vendor: Gigabyte driver: snd_hda_intel 
  v: kernel alternate: snd_soc_skl,snd_sof_pci bus-ID: 00:1f.3 
  chip-ID: 8086:06c8 class-ID: 0403 
  Device-2: NVIDIA driver: snd_hda_intel v: kernel bus-ID: 01:00.1 
  chip-ID: 10de:10fa class-ID: 0403 
  Sound Server-1: ALSA v: k5.10.41-1-MANJARO running: yes 
  Sound Server-2: JACK v: 0.125.0 running: no 
  Sound Server-3: PulseAudio v: 14.2 running: yes 
  Sound Server-4: PipeWire v: 0.3.28 running: yes 
Network:
  Device-1: Intel Ethernet I219-V vendor: Gigabyte driver: e1000e v: kernel 
  port: efa0 bus-ID: 00:1f.6 chip-ID: 8086:0d4d class-ID: 0200 
  IF: eno1 state: down mac: <filter> 
  Device-2: TP-Link TL-WN823N v2/v3 [Realtek RTL8192EU] type: USB 
  driver: rtl8192eu bus-ID: 1-8:4 chip-ID: 2357:0109 class-ID: 0000 
  serial: <filter> 
  IF: wlp0s20f0u8 state: up mac: <filter> 
  IP v4: <filter> type: dynamic noprefixroute scope: global 
  broadcast: <filter> 
  IP v6: <filter> type: noprefixroute scope: link 
  WAN IP: <filter> 
Bluetooth:
  Message: No bluetooth data found. 
Logical:
  Message: No logical block device data found. 
RAID:
  Message: No RAID data found. 
Drives:
  Local Storage: total: 1.35 TiB used: 63.32 GiB (4.6%) 
  SMART Message: Unable to run smartctl. Root privileges required. 
  ID-1: /dev/sda maj-min: 8:0 vendor: Crucial model: CT480BX500SSD1 
  size: 447.13 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s 
  rotation: SSD serial: <filter> rev: R022 scheme: GPT 
  ID-2: /dev/sdb maj-min: 8:16 vendor: Toshiba model: HDWD110 size: 931.51 GiB 
  block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s 
  rotation: 7200 rpm serial: <filter> rev: A8R0 scheme: GPT 
  Optical-1: /dev/sr0 vendor: HL-DT-ST model: DVDRAM GH24NSD5 rev: LV00 
  dev-links: cdrom 
  Features: speed: 12 multisession: yes audio: yes dvd: yes 
  rw: cd-r,cd-rw,dvd-r,dvd-ram state: running 
Partition:
  ID-1: / raw-size: 225 GiB size: 220.41 GiB (97.96%) used: 20.7 GiB (9.4%) 
  fs: ext4 dev: /dev/sda5 maj-min: 8:5 label: N/A 
  uuid: 7954003a-9c38-44a6-9db6-db5fa26e4c82 
  ID-2: /boot/efi raw-size: 1024 MiB size: 1022 MiB (99.80%) 
  used: 296 KiB (0.0%) fs: vfat dev: /dev/sda7 maj-min: 8:7 label: NO_LABEL 
  uuid: 9AA0-7877 
  ID-3: /home raw-size: 488.28 GiB size: 479.55 GiB (98.21%) 
  used: 41.54 GiB (8.7%) fs: ext4 dev: /dev/sdb3 maj-min: 8:19 label: N/A 
  uuid: c1d8bd90-e40d-4ac1-917a-18a8040fa249 
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default) 
  ID-1: swap-1 type: partition size: 18.14 GiB used: 1.09 GiB (6.0%) 
  priority: -2 dev: /dev/sda6 maj-min: 8:6 label: N/A 
  uuid: fa4ec151-e333-4ee7-958b-4c63a4e82b1b 
Unmounted:
  ID-1: /dev/sda1 maj-min: 8:1 size: 100 MiB fs: vfat label: SYSTEM 
  uuid: 0626-B432 
  ID-2: /dev/sda2 maj-min: 8:2 size: 16 MiB fs: <superuser required> 
  label: N/A uuid: N/A 
  ID-3: /dev/sda3 maj-min: 8:3 size: 201.9 GiB fs: ntfs label: Windows 
  uuid: 5C0431200430FF18 
  ID-4: /dev/sda4 maj-min: 8:4 size: 1000 MiB fs: ntfs label: Recovery tools 
  uuid: A484316684313BDC 
  ID-5: /dev/sdb1 maj-min: 8:17 size: 16 MiB fs: <superuser required> 
  label: N/A uuid: N/A 
  ID-6: /dev/sdb2 maj-min: 8:18 size: 443.21 GiB fs: ntfs label: Volume 
  uuid: 24407DF8407DD152 
USB:
  Hub-1: 1-0:1 info: Full speed (or root) Hub ports: 16 rev: 2.0 
  speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900 
  Device-1: 1-5:2 info: Microdia USB DEVICE type: Keyboard,Mouse 
  driver: hid-generic,usbhid interfaces: 2 rev: 2.0 speed: 12 Mb/s 
  power: 400mA chip-ID: 0c45:8513 class-ID: 0301 
  Device-2: 1-6:3 info: Logitech G502 SE HERO Gaming Mouse type: Mouse,HID 
  driver: hid-generic,usbhid interfaces: 2 rev: 2.0 speed: 12 Mb/s 
  power: 300mA chip-ID: 046d:c08b class-ID: 0300 serial: <filter> 
  Device-3: 1-8:4 info: TP-Link TL-WN823N v2/v3 [Realtek RTL8192EU] 
  type: Network driver: rtl8192eu interfaces: 1 rev: 2.1 speed: 480 Mb/s 
  power: 500mA chip-ID: 2357:0109 class-ID: 0000 serial: <filter> 
  Device-4: 1-10:5 info: Super Top Mass Storage Device type: Mass Storage 
  driver: usb-storage interfaces: 1 rev: 2.0 speed: 480 Mb/s power: 100mA 
  chip-ID: 14cd:125d class-ID: 0806 serial: <filter> 
  Hub-2: 2-0:1 info: Full speed (or root) Hub ports: 8 rev: 3.1 speed: 10 Gb/s 
  chip-ID: 1d6b:0003 class-ID: 0900 
Sensors:
  System Temperatures: cpu: 49.0 C mobo: 16.8 C gpu: nvidia temp: 47 C 
  Fan Speeds (RPM): N/A gpu: nvidia fan: 0% 
Info:
  Processes: 282 Uptime: 13h 34m wakeups: 36 Init: systemd v: 247 
  tool: systemctl Compilers: gcc: 11.1.0 Packages: 1368 pacman: 1356 lib: 341 
  flatpak: 6 snap: 6 Shell: Bash v: 5.1.8 running-in: konsole inxi: 3.3.04

Should I be worried? Is there explanation for this? How can I reduce memory usage?
Thank you all in advance!

you can try running

systemctl | grep enabled

in Terminal
and disable ones that you don’t need
maybe like

sshd.service 

(if you use OpenSSH Deamon)
or

bluetooth.service

just ones that aren’t necessary.

or maybe oven switching to a lighter DE like XFCE, KDE Plasma is heavier but only by a little.

heres the link for it.
Install Desktop Environments - Manjaro

-DTA

Thank you!

Unfortunately, systemctl | grep enabled
does not return anything, so I assume nothing is running.
Also as you can see on the picture above, there is not much running and the resources used do not add up to the total RAM usage for some reason.

I know that KDE is considered heavier and I was expecting higher usage, but right now my laptop has been running xfce for 10 days and the memory used is 1 GB (half what this system uses with nothing running)

is your swap space activated? (you made one right?) when booting your pc press

esc

on your keyboard and see if you see anything like
“failed to activate swap partition”

if that is the case type in your terminal

sudo mkswap /dev/sda2

(sda2 should be swap)

and then type in terminal

sudo swapon /dev/sda2

Probably not. :slight_smile:

What’s the output of free -h just after booting?

Are there any other reasons you suspect a problem?

Help! Linux ate my RAM!

It never will. There is no “enabled” in the output from systemctl. :man_facepalming:

Just in case it needs saying: I don’t know what sda2 is, but it definitely isn’t your swap, don’t run those commands. Your swap is sda6 and is already active.

There are much easier ways of checking your swap partition, inxi and lsblk -f for instance.

1 Like

Sure? Try

systemctl list-unit-files | grep enabled

I meant systemctl on it’s own does not produce output containing “enabled”. I should’ve also provided the proper command, as you have done. :slight_smile:

EDIT:
Apparently the forum has decided I should be replying to myself, so @Manfrago.

thanks for this advice man, and i should have read the log ameliorate posted fully. also i put the wrong command, the command is

systemctl | grep running

Hi,

You do not have memory to not use it. Linux will take all memory it can and will reuse/free it if needed.
You are 50% empty a lot of room.
I see that on the top kwin_x11 is using 4KM → 4GB.
Note that you have VIRT (virtual memory including everything) and RES (Resident set size which is basically the real memory allocated for this process only).
You can also see than you are not using swap (Almost) which means your machine is not and was not in need of memory (RAM).
https://serverfault.com/questions/138427/what-does-virtual-memory-size-in-top-mean

To check your memory use the command free :

 [Manjaro ~]# free 
               total        used        free      shared  buff/cache   available
Mem:            7827         884        2932         208        4010        6230
Swap:           3999          61        3938

You can see the buff/cache there. This is memory used to store volatile data that stay there to avoid disk access like cache, libs etc …
You can clean the cache to think you gain memory but you will loose in peformance as you’ll need to access the disk again instead of taking advantage of your ram.
See : How to Clear RAM Memory Cache, Buffer and Swap Space on Linux
If I do that on my laptop I will have more free mem but I have gained nothing but lost my caches.

[Manjaro ~]#  sync; echo 3 > /proc/sys/vm/drop_caches 
[Manjaro ~]# free 
               total        used        free      shared  buff/cache   available
Mem:            7827        2003        5026         221         798        5231
Swap:           3999         324        3675
[Manjaro ~]# 

More info : Free Command Output Explanation In Linux/Unix - LookLinux

Last thing memory usage of processes are stored in /proc there is an easy to use code to display that (more readable than top) :

I am pretty sure there is nothing to worry about, use you ram and have fun.

1 Like

Thank you all for your time!
I guess I shouldn’t be worried about it. @manifesto explained it pretty well.
There are no problems with the system, I was just curious because of the difference between KDE and XFCE.

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