0

(Manjaro 20, Linux 5.8.3, KDE, this laptop)

When reasonably much is going on in my system, the RAM and swap usage often goes much higher than it should. For example currently I have a VM with a VM in it running and two instances of Minecraft, also some smaller stuff like music. That might sound like much, but my CPU is totally fine and even the sum of all the RAM usage shown in the task manager seems to be less than 2GB. Despite this, almost all of my 16GB RAM and 16GB swap are in use by… something.

This is the output of free:

              total        used        free      shared  buff/cache   available
Mem:          15898       15218         151         305         527          92
Swap:         17490       16442        1047

This much calmer picture is seen in the task manager:

I've read here that sometimes virtualisation causes weird RAM issues, but my outer VM is restricted to 8GB. Even if it somehow used all of that without showing it in the task manager, it would still not explain about a quarter of my RAM usage and none of the swap usage.
free shows that I should not blame caching (for once).
I've heard that disk I/O that can't be done in time gets queued up in RAM, but iotop shows nothing overly active.
This is also not just a measurement error, I do indeed get lag spikes in pretty much everything due to this. So quite a portion of memory of the programs I'm actively using is in swap.

What uses this additional RAM and why so much of it?

3
  • 2
    Post ps aux --sort -rss, ps aux --sort -size, ps aux --sort -vsize output, first 20 lines of each. Or just review them yourself, you'll locate the big spenders.
    – Krackout
    Aug 28, 2020 at 19:41
  • @Krackout "rss" results in a little under 13GB total (14GB are used), "size" doesn't really tell me much, but "vsize" seems to be the pointer that I needed: 268686100 for "/usr/lib/baloorunner" and 268666184 for "/usr/bin/baloo_file"! That's two times over 256GB! And googling "baloorunner" gives me two purple links for two separate issues: CPU usage and space usage. Seems like RAM usage is the next thing Baloo is bad at. Maybe I should just disable it. (It's a file indexer BTW.) Aug 28, 2020 at 20:41
  • Now the real question is: Why does this not show up in the task manager? Aug 28, 2020 at 20:43

1 Answer 1

0

Following comments, ps aux --sort -vsize helped locating the big spender, baloo. I'll propose disabling it; it's an index service, perhaps you can live without it.

Control commands:

balooctl status
balooctl disable

Edit ~/.config/baloofilerc
Indexing-Enabled=false

(perhaps needs reboot)

You could also try to purge and rebuild cache, or narrow the directories it indexes.

I can't tell why it's not shown in graphic task manager, I never rely or use these tools. top, or more modern htop (interactive tools) and of course ps command are your friends.

1
  • 1
    Simply disabling workspace→file search→enable file search already disabled Baloo, but freeing the memory required a reboot, which took REALLY long, because the swapoff process simply did not want to give up. The system gave it many chances and sent multiple SIGTERM and SIGKILL signals until it finally enforced a shutdown. It was interesting watching that in the log. Aug 28, 2020 at 21:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .