5GB memory usage idle


**NOTE: i have only used linux for about a year or so and im not a power user, im basically a tired windows user but i know more stuff than most beginners i feel like? like not a lot more but a little bit
**
so when i don't have anything open my memory usage is like 4-5GB out of 16, which makes it pretty bad when i want to play games (even minecraft can make it so my pc use 99% memory so i have to hard reset, although i might have fixed that) and/or when i want some demanding theming things (like a live wallpaper). "Background services" is using like 4GB and "baloo_file_extractor" is using like 1GB out of the 4. I have done a tiny tiny bit of research and ive found out that baloo is a file indexing thingo, but idrk what file indexing is used for so i don't know if i should disable it

distro: endeavourOS
de: kde plasma wayland
ram: 16gb of something (i have a prebuilt so idk what ddr it is or whatever)

if you need more info then please say so (i can't show images for some reason)

in reply to goofsqueak

File indexing allows (faster) searching of files and sometimes even allows finding files by their content not only the file name.

That said those indexers (I'm not using KDE so not sure about details of your specific case) can use an big amount of RAM especially if there are new files to index. As far as I unterstand they should pause if the RAM is needed otherwise but might depend on the implementation.

in reply to Ardor von Heersburg

File indexing allows (faster) searching of files and sometimes even allows finding files by their content not only the file name.


At least for text files, grep can do that too. Off course it is not as fast as indexed files, but how often do you need that? There is ripgrep, a faster alternative. I personally don't miss indexed files as I thought I would. With fast drives and CPU and the knowledge how to do a proper search does most of the stuff I need. Just my opinion. The price for an indexer is too high to me (and besides they were responsible for the death of my SSD... I believe).

in reply to goofsqueak

I'm on EndeavourOS, too. I don't see anything near that kind of memory drain, but I've been using window managers instead of desktop environments for a long time.

For ages I had old, poorly specced laptops, and the big DEs like KDE would quickly cap what memory I had for actual software. And I'm not even a gamer, this would be GIMP or a plain browser that would crash because of too little RAM.

Even now, with more memory and better CPU, I stuck to the habit of using a WM instead, and everything really just runs better. You do sacrifice some eye candy and built-in functions, but IMHO it's worth the tradeoff.

in reply to goofsqueak

You should read into zram,
It's a very fast compressing method that will help you leverage some ram space.
With your 16gb ram you could compress 8gb with a normal 2x compression rate. That would "net" you around 20gb usable ram space. With basically non existing performance penalties.
You can also opt to compress all of your 16gb.

In layman's terms it's like downloading more ram. But it won't help you get rid of your source problem.

in reply to goofsqueak

Baloo is indexing your file system, you can disable it, but its memory usage should drop once it is done. How long it will take to finish depends on how many files you have.

If memory usage is a concern you can always try a lightweight desktop environment but with 16GB you are just fine staying on KDE Plasma.

in reply to goofsqueak

Make sure to avoid miscounting disk buffers. That's kernel-owned memory that might eat a ton of RAM, but
1. It gets freed instantly when your apps need more memory
2. Until then, it increases your overall system performance by avoiding the need to read from storage (making it somewhere around 10ish times faster).
in reply to goofsqueak

@goofsqueak Don't make the mistake of confusing "Free Memory" with "Available Memory", Linux will be default use nearly all available memory for cache and buffers so you let it run long enough and your free memory will only show a few hundred KB but your available memory will still be 14GB or something. Not to be alarmed, start your game and buffers and cache will be flushed to disk and memory will be available for your game.
in reply to goofsqueak

KDE provides a very large set of services. This makes it something of an elephant in the world of Linux desktop environments. Lighter DEs should fit in less than 1GB (that's anything other than KDE and Gnome). I think the last time I checked my system with just the DE up and nothing open, it was using on the order of 200-300MB. However, the lighter DEs will also do less by default.

It should be safe to kill baloo, but as others have already said, you will see some tradeoffs in how file searching works if you stick with KDE. If I'm not mistaken, it may restart periodically to index new files unless you go to some effort to exorcise it.

in reply to goofsqueak

@goofsqueak Baloo is an indexing service for kde search. If you don't need KDE search then you don't need Baloo, or if you don't need to super current you can schedule it to run at 4am or some such. If you really want a light desktop look into LXDE or XFCE.
in reply to goofsqueak

The media in this post is not displayed to visitors. To view it, please go to the original post.

Baloo (which is KDE's file indexer, which is meant to speed up file searches) was borked earlier this year, and I don't know if it has been fixed yet, but seemingly it'd keep doing symlink loops which of course isn't useful. This is likely to happen when you have any wine-prefix installed so even just Steam installed will do this.
::: spoiler The fix on my computer was simply turning it off for all of my /home/$USER folder by adding the location in System Settings - Workspace - Search - File Search - Stop indexing a folder.

:::
If you're on an nVME SSD, and if you rarely do file searches anyway, I don't see any problems doing this.

As for RAM, definitely check out Zram. It works by compressing unused parts of memory back into RAM. Here's what 8 GB Zram looks like on my PC right now:

> zramctl
NAME       ALGORITHM DISKSIZE   DATA  COMPR  TOTAL STREAMS MOUNTPOINT
/dev/zram0 zstd            8G 573,5M 138,6M 154,4M         [SWAP]

So it has compressed half a gigabyte of unsused memory down to ~150 megabytes, that's a 3.7x compression rate, saving quite a bit of memory.

It's very easy to set up, take a look here.
::: spoiler My config for reference, which ships by default with Nobara.

─────┬──────────────────────────────────────────────────────────────────────────
     │ File: /usr/lib/systemd/zram-generator.conf
─────┼──────────────────────────────────────────────────────────────────────────
   1 │ # This config file enables a /dev/zram0 device with the default settings:
   2 │ # — size — same as available RAM or 8GB, whichever is less
   3 │ # — compression — most likely lzo-rle
   4 │ #
   5 │ # To disable, uninstall zram-generator-defaults or create empty
   6 │ # /etc/systemd/zram-generator.conf file.
   7 │ [zram0]
   8 │ zram-size = min(ram, 8192)
─────┴──────────────────────────────────────────────────────────────────────────

:::

Regarding stuff like which algorithm to use etc. the Arch wiki article on zram has some good info.

in reply to RedSnt ♾️🦋♂️👓🖥️

Summary of my reply: Baloo (and mlocate) were stuck on filenames with unusual characters in filenam, which probably caused the death of my system SSD.

Baloo is known to be borked from time to time, in the many years I used it before. I stopped using Baloo for a different reason. Baloo and the more general mlocate file indexer destroyed my previous system SSD. After replacing the drive, (without knowing what the issue was) I was careful and watched write and reads of the drive. And then I found the issue, Baloo (and later mlocate) did massive Gigabytes of writes and reads in short amount of seconds for long period. After examination I found out baloo (and later mlocate the same) were stuck on specific files. Those filenames had unusual characters, that normally would only be seen in binary file formats.

I don't know if we can blame the indexers for this, but as far as I know those are the only applications with the issue. I'm not entirely sure if RetroArch can play those games (these are Rom files for old systems), but at least its file handling worked fine.

This website uses cookies. If you continue browsing this website, you agree to the usage of cookies.