High memory consumption

Coming from Ubuntu I basically run the same stuff now as before.

  • thunderbirg
  • firefox with many tabs open
  • kitty terminal
  • neovide with nvim

Now I see baloo more active than before.

In Ubuntu I had typically

NAME           TYPE      SIZE USED PRIO
/swap/swapfile file       16G   0B   -2
/dev/zram0     partition 7,5G   2G    5

free -t -h showed

               total        used        free      shared  buff/cache   available
Mem:            15Gi       3,9Gi       186Mi        13Mi        10Gi        10Gi
Swap:           23Gi       2,0Gi        21Gi
Total:          38Gi       5,9Gi        21Gi

Now I have

NAME           TYPE      SIZE USED PRIO
/swap/swapfile file       18G 4.1G   -2
/dev/zram0     partition 5.3G 5.2G  100

and free -t -h shows

               total        used        free      shared  buff/cache   available
Mem:            15Gi       5.6Gi       137Mi       7.0Mi       9.3Gi       9.1Gi
Swap:           23Gi       9.3Gi        13Gi
Total:          38Gi        14Gi        14Gi

ps -o pid,user,%mem,command ax | sort -b -k3 -r starts with

  PID USER     %MEM COMMAND
   1182 manfred   6.3 /usr/lib/baloo_file
   4754 manfred   1.3 /usr/lib/firefox/firefox
   3744 manfred   0.9 /usr/lib/thunderbird/thunderbird
   4963 manfred   0.7 /usr/lib/firefox/firefox -contentproc -childID 2 -isForBrowser -prefsLen 57280 -prefMapSize 237886 -jsInitLen 277276 -parentBuildID 20220706125320 -appDir /usr/lib/firefox/browser 4754 true tab
   7174 manfred   0.7 /usr/lib/firefox/firefox -contentproc -childID 14 -isForBrowser -prefsLen 62629 -prefMapSize 237886 -jsInitLen 277276 -parentBuildID 20220706125320 -appDir /usr/lib/firefox/browser 4754 true tab
   5662 manfred   0.3 /usr/lib/firefox/firefox -contentproc -childID 11 -isForBrowser -prefsLen 62629 -prefMapSize 237886 -jsInitLen 277276 -parentBuildID 20220706125320 -appDir /usr/lib/firefox/browser 4754 true tab
    939 manfred   0.3 /usr/bin/syncthing serve --no-browser --no-restart --logflags=0
   1241 manfred   0.3 /usr/bin/plasmashell --no-respawn
   8220 manfred   0.3 /usr/bin/copyq --clipboard-access synchronizeFromSelection
   5481 manfred   0.2 /usr/lib/firefox/firefox -contentproc -childID 9 -isForBrowser -prefsLen 62628 -prefMapSize 237886 -jsInitLen 277276 -parentBuildID 20220706125320 -appDir /usr/lib/firefox/browser 4754 true tab
   5477 manfred   0.2 /usr/lib/firefox/firefox -contentproc -childID 8 -isForBrowser -prefsLen 62628 -prefMapSize 237886 -jsInitLen 277276 -parentBuildID 20220706125320 -appDir /usr/lib/firefox/browser 4754 true tab
   5098 manfred   0.2 /usr/lib/firefox/firefox -contentproc -childID 5 -isForBrowser -prefsLen 62535 -prefMapSize 237886 -jsInitLen 277276 -parentBuildID 20220706125320 -appDir /usr/lib/firefox/browser 4754 true tab
   7828 manfred   0.2 /usr/lib/firefox/firefox -contentproc -childID 17 -isForBrowser -prefsLen 62628 -prefMapSize 237886 -jsInitLen 277276 -parentBuildID 20220706125320 -appDir /usr/lib/firefox/browser 4754 true tab
   7782 manfred   0.2 /usr/lib/firefox/firefox -contentproc -childID 16 -isForBrowser -prefsLen 62628 -prefMapSize 237886 -jsInitLen 277276 -parentBuildID 20220706125320 -appDir /usr/lib/firefox/browser 4754 true tab
   6063 manfred   0.2 /usr/lib/firefox/firefox -contentproc -childID 13 -isForBrowser -prefsLen 62628 -prefMapSize 237886 -jsInitLen 277276 -parentBuildID 20220706125320 -appDir /usr/lib/firefox/browser 4754 true tab
   1196 manfred   0.2 /usr/bin/kwin_x11 --replace

I am a bit confused because of these large differences in memory consumption.

Are you comparing like-for-like?

Ubuntu doesn’t use KDE, and doesn’t have Baloo, so this is a key difference already.

3 Likes

In a terminal as user, type in the following:

balooctl suspend
balooctl disable
balooctl purge
balooctl status

Then see if your memory usage goes down.
If the memory usage is to your liking, then you can decide how much you need baloo.

Pudge

1 Like

Looks kinda normal to me. More ram you have the more your OS asks it.

Here what my ram usage looks after 6h

free -t -h
               total        used        free      shared  buff/cache   available
Mem:            31Gi       5,7Gi       5,1Gi       498Mi        20Gi        24Gi
Swap:          8,0Gi       6,0Mi       8,0Gi
Total:          39Gi       5,7Gi        13Gi

❯ sudo ps_mem
 Private  +   Shared  =  RAM used	Program

116.0 KiB +  14.5 KiB = 130.5 KiB	fusermount3
232.0 KiB +  34.5 KiB = 266.5 KiB	binfmt-bypass
416.0 KiB +  45.5 KiB = 461.5 KiB	xsettingsd
420.0 KiB +  43.5 KiB = 463.5 KiB	rtkit-daemon
880.0 KiB +  27.5 KiB = 907.5 KiB	crond
620.0 KiB + 473.0 KiB =   1.1 MiB	avahi-daemon (2)
  1.1 MiB + 114.5 KiB =   1.2 MiB	at-spi2-registryd
896.0 KiB + 395.0 KiB =   1.3 MiB	dnsmasq (2)
  1.2 MiB + 127.5 KiB =   1.3 MiB	at-spi-bus-launcher
984.0 KiB + 441.5 KiB =   1.4 MiB	systemd-timesyncd
  1.1 MiB + 371.5 KiB =   1.4 MiB	systemd-machined
  1.7 MiB + 101.5 KiB =   1.8 MiB	bash
  1.5 MiB + 477.5 KiB =   1.9 MiB	systemd-logind
  2.6 MiB +  80.5 KiB =   2.7 MiB	xdg-permission-store
  2.6 MiB +  87.5 KiB =   2.7 MiB	agent
  2.7 MiB +   9.5 KiB =   2.8 MiB	3
  2.5 MiB + 335.5 KiB =   2.8 MiB	sudo
  2.8 MiB +  89.5 KiB =   2.8 MiB	dconf-service
  3.0 MiB + 115.5 KiB =   3.1 MiB	power-profiles-daemon
  2.5 MiB + 747.5 KiB =   3.2 MiB	sddm-helper
  3.1 MiB + 162.5 KiB =   3.2 MiB	xdg-document-portal
  3.1 MiB + 183.5 KiB =   3.3 MiB	gvfsd
  2.8 MiB + 751.5 KiB =   3.5 MiB	kscreen_backend_launcher
  2.9 MiB + 735.5 KiB =   3.6 MiB	xembedsniproxy
  2.8 MiB + 784.5 KiB =   3.6 MiB	gmenudbusmenuproxy
  3.5 MiB + 201.5 KiB =   3.7 MiB	gvfsd-dnssd
  2.1 MiB +   1.6 MiB =   3.7 MiB	journalctl
  3.7 MiB + 385.5 KiB =   4.1 MiB	systemd-udevd
  4.3 MiB + 488.5 KiB =   4.8 MiB	sddm
  4.6 MiB + 394.5 KiB =   5.0 MiB	gnome-keyring-daemon
  4.4 MiB + 686.5 KiB =   5.0 MiB	kio_http_cache_cleaner
  4.2 MiB + 874.5 KiB =   5.1 MiB	virtlogd
  4.8 MiB + 369.5 KiB =   5.1 MiB	dbus-daemon (3)
  5.0 MiB + 195.5 KiB =   5.2 MiB	gvfsd-fuse
  4.6 MiB + 666.5 KiB =   5.2 MiB	udisksd
  4.7 MiB + 586.5 KiB =   5.3 MiB	gvfs-udisks2-volume-monitor
  5.6 MiB +  92.5 KiB =   5.7 MiB	upowerd
  5.5 MiB + 227.5 KiB =   5.7 MiB	gvfsd-trash
  5.5 MiB + 226.5 KiB =   5.7 MiB	gvfsd-network
  4.8 MiB +   1.0 MiB =   5.8 MiB	kio-fuse
  4.9 MiB +   1.7 MiB =   6.5 MiB	zsh (2)
  5.4 MiB +   1.7 MiB =   7.1 MiB	systemd-journald
  5.3 MiB +   1.9 MiB =   7.1 MiB	startplasma-x11
  5.8 MiB +   1.9 MiB =   7.7 MiB	xdg-desktop-portal-kde
  5.9 MiB +   2.1 MiB =   8.0 MiB	kaccess
  6.2 MiB +   2.0 MiB =   8.1 MiB	ksmserver
  6.2 MiB +   2.0 MiB =   8.2 MiB	kwalletd5
  7.7 MiB + 661.5 KiB =   8.3 MiB	xdg-desktop-portal
  7.0 MiB +   1.7 MiB =   8.7 MiB	kglobalaccel5
  6.6 MiB +   2.3 MiB =   8.9 MiB	org_kde_powerdevil
  8.1 MiB +   2.3 MiB =  10.4 MiB	DiscoverNotifier
  8.7 MiB +   1.9 MiB =  10.6 MiB	kactivitymanagerd
  9.8 MiB + 772.5 KiB =  10.6 MiB	NetworkManager
  8.2 MiB +   2.6 MiB =  10.9 MiB	dolphin
 11.1 MiB + 435.5 KiB =  11.5 MiB	conky
  8.3 MiB +   3.5 MiB =  11.9 MiB	baloorunner
  8.0 MiB +   3.9 MiB =  11.9 MiB	systemd (3)
 12.3 MiB +   4.6 MiB =  16.9 MiB	wireplumber
 17.6 MiB + 281.5 KiB =  17.9 MiB	polkitd
 24.1 MiB +   2.4 MiB =  26.5 MiB	baloo_file
 23.4 MiB +   4.1 MiB =  27.6 MiB	kded5
 27.4 MiB +   1.3 MiB =  28.7 MiB	pipewire
 30.5 MiB +   2.2 MiB =  32.7 MiB	firewalld
 30.3 MiB +   9.3 MiB =  39.6 MiB	polkit-kde-authentication-agent-1
 35.9 MiB +   4.2 MiB =  40.1 MiB	firewall-applet
 50.0 MiB + 722.5 KiB =  50.8 MiB	pipewire-pulse
 82.6 MiB +   8.9 MiB =  91.4 MiB	Xorg
106.4 MiB +  18.8 MiB = 125.3 MiB	kitty (2)
133.6 MiB +  17.4 MiB = 150.9 MiB	krunner
158.3 MiB +  13.4 MiB = 171.7 MiB	kwin_x11
184.4 MiB +  38.2 MiB = 222.7 MiB	steam (2)
226.8 MiB +  21.1 MiB = 247.9 MiB	plasmashell
265.7 MiB +  87.7 MiB = 353.4 MiB	@joplinapp-desktop (6)
447.5 MiB + 103.8 MiB = 551.3 MiB	Discord (8)
446.8 MiB + 111.0 MiB = 557.8 MiB	spotify (7)
698.4 MiB + 145.1 MiB = 843.6 MiB	steamwebhelper (9)
723.4 MiB + 122.3 MiB = 845.7 MiB	thunderbird (3)
  1.8 GiB + 164.8 MiB =   2.0 GiB	firefox (20)
---------------------------------
                          6.6 GiB
=================================

Thunderbird alone eats 600mb to 1500mb with 2 accounts. And browser is a another story :smiley:

What DE are you are running?

I wasn’t precise enough. I used Kubuntu, i.e. with KDE Plasma and baloo was runnign before when I was using Ubuntu.

Additionally, I haven’t changed anything. It is the same /home as before.

Same services as before where a few are specific for the way I am working

  • local imap server dovecot
  • opensmtpd for sending emails
  • sshd (this is pretty normal)
  • syncthing

As said I am using (and used before) KDE Plasma.

Here my ps_mem (didn’t know that handy tool) run

 Private  +   Shared  =  RAM used	Program

  0.0 KiB +   2.5 KiB =   2.5 KiB	sh
  4.0 KiB +   3.5 KiB =   7.5 KiB	sshd
  0.0 KiB +  12.5 KiB =  12.5 KiB	bash (5)
  4.0 KiB +  18.5 KiB =  22.5 KiB	anvil
  4.0 KiB +  20.5 KiB =  24.5 KiB	xsettingsd
  4.0 KiB +  24.5 KiB =  28.5 KiB	obexd
  4.0 KiB +  34.5 KiB =  38.5 KiB	log
  4.0 KiB +  35.5 KiB =  39.5 KiB	dovecot
  4.0 KiB +  61.5 KiB =  65.5 KiB	stats
  4.0 KiB +  63.5 KiB =  67.5 KiB	sddm-helper
 12.0 KiB +  59.5 KiB =  71.5 KiB	config
  4.0 KiB +  73.5 KiB =  77.5 KiB	firewalld
  4.0 KiB +  86.5 KiB =  90.5 KiB	power-profiles-daemon
  4.0 KiB +  90.5 KiB =  94.5 KiB	sddm
  4.0 KiB + 144.5 KiB = 148.5 KiB	startplasma-x11
160.0 KiB +  16.5 KiB = 176.5 KiB	crond
176.0 KiB +  63.0 KiB = 239.0 KiB	avahi-daemon (2)
  4.0 KiB + 273.5 KiB = 277.5 KiB	colord
268.0 KiB +  73.5 KiB = 341.5 KiB	at-spi2-registryd
180.0 KiB + 216.5 KiB = 396.5 KiB	systemd-timesyncd
408.0 KiB +  37.5 KiB = 445.5 KiB	rtkit-daemon
404.0 KiB +  64.5 KiB = 468.5 KiB	at-spi-bus-launcher
344.0 KiB + 125.5 KiB = 469.5 KiB	gmenudbusmenuproxy
416.0 KiB +  88.5 KiB = 504.5 KiB	ssh-agent
420.0 KiB + 122.5 KiB = 542.5 KiB	kscreen_backend_launcher
344.0 KiB + 230.5 KiB = 574.5 KiB	polkit-kde-authentication-agent-1
484.0 KiB + 140.5 KiB = 624.5 KiB	xembedsniproxy
496.0 KiB + 214.5 KiB = 710.5 KiB	kaccess
476.0 KiB + 321.5 KiB = 797.5 KiB	systemd-logind
908.0 KiB +  64.5 KiB = 972.5 KiB	udisksd
728.0 KiB + 273.5 KiB =   1.0 MiB	systemd-udevd
816.0 KiB + 192.5 KiB =   1.0 MiB	cupsd
988.0 KiB +  43.5 KiB =   1.0 MiB	dconf-service
936.0 KiB + 100.5 KiB =   1.0 MiB	upowerd
  1.1 MiB + 269.5 KiB =   1.3 MiB	kglobalaccel5
960.0 KiB + 530.5 KiB =   1.5 MiB	ksmserver
  1.2 MiB + 239.5 KiB =   1.5 MiB	kdeconnectd
  1.2 MiB + 440.5 KiB =   1.6 MiB	yakuake
  1.5 MiB + 525.5 KiB =   2.0 MiB	kactivitymanagerd
  1.6 MiB + 551.5 KiB =   2.2 MiB	smtpd (7)
  2.1 MiB + 180.5 KiB =   2.3 MiB	polkitd
  1.8 MiB + 836.5 KiB =   2.6 MiB	org_kde_powerdevil
  2.5 MiB + 354.5 KiB =   2.8 MiB	firewall-applet
  2.5 MiB + 380.5 KiB =   2.9 MiB	pipewire-pulse
  2.7 MiB + 272.5 KiB =   3.0 MiB	dbus-daemon (3)
  2.8 MiB + 426.5 KiB =   3.2 MiB	wireplumber
  1.9 MiB +   1.4 MiB =   3.3 MiB	baloorunner
  3.9 MiB + 112.5 KiB =   4.0 MiB	wpa_supplicant
  3.5 MiB + 508.5 KiB =   4.0 MiB	sudo
  2.5 MiB +   1.7 MiB =   4.1 MiB	yad (6)
  3.8 MiB + 589.5 KiB =   4.4 MiB	pipewire
  3.0 MiB +   2.3 MiB =   5.3 MiB	systemd (3)
  5.4 MiB + 146.5 KiB =   5.6 MiB	NetworkManager
  5.8 MiB +  56.0 KiB =   5.9 MiB	fish (2)
  5.5 MiB + 412.5 KiB =   5.9 MiB	kitty
  5.4 MiB +   1.2 MiB =   6.6 MiB	kded5
  3.9 MiB +   3.1 MiB =   7.0 MiB	systemsettings
  9.0 MiB + 344.5 KiB =   9.3 MiB	systemd-journald
  6.9 MiB +   2.6 MiB =   9.5 MiB	imap (5)
  4.9 MiB +   5.5 MiB =  10.4 MiB	copyq (4)
 10.0 MiB +   2.6 MiB =  12.5 MiB	kwin_x11
 17.9 MiB + 488.5 KiB =  18.4 MiB	Xorg
 13.7 MiB +   4.8 MiB =  18.5 MiB	plasmashell
 66.3 MiB +  99.0 KiB =  66.4 MiB	syncthing (2)
 92.9 MiB +  10.7 MiB = 103.6 MiB	thunderbird (3)
162.4 MiB +  28.0 MiB = 190.4 MiB	firefox (13)
  1.4 GiB + 339.5 KiB =   1.4 GiB	baloo_file
---------------------------------
                          1.9 GiB
=================================

Far less usage than what you showed whereas your swap usage is much lower.

Baloo seems to be an issue. Atliest in my system it tooks only 10mb of RAM.
Disabling the indexer

**balooctl suspend**
**balooctl disable**

The indexer will be disabled on next login.

Alternatively, disable Enable File Search in System settings under Search > File search.

To permanently delete the index database, run:

**balooctl purge**

https://wiki.archlinux.org/title/Baloo#Command-line_usage

@Pudge had the right instinct, and @bitterhalt too. The bad guy was baloo.

As said in Ubuntu I used KDE Plasma before and also baloo. I had defined certain directories to scan and the baloo index file was 20 GB in size.

When starting out with EnOS I had all directories baloo was told to scan at the same places and they all had the same timestamps (from restore).

Nevertheless baloo was working like hell… Perhaps it is a bug, I dunno.

I did what @Pudge told me, namely to disable and delete the index. Then swap was ok.

Now I started to give the previous directories to baloo for indexing. index file is now around 1GB and swapping still ok.

               total        used        free      shared  buff/cache   available
Mem:            15Gi       4.0Gi       340Mi        65Mi        10Gi        10Gi
Swap:           23Gi       2.0Mi        23Gi
Total:          38Gi       4.0Gi        23Gi

So, it seems I am back to normal.

3 Likes

Additionally, now when baloo is heavily working on indexing file contents its usage is high

 ▶ sudo ps_mem | rg baloo
  7.7 MiB +   4.6 MiB =  12.3 MiB	baloorunner
605.4 MiB + 197.1 MiB = 802.5 MiB	baloo_file
  2.9 GiB + 199.6 MiB =   3.1 GiB	baloo_file_extractor

Nevertheless swapping is ok

▶ swapon
NAME           TYPE      SIZE  USED PRIO
/dev/zram0     partition 5.3G 16.3M  100
/swap/swapfile file       18G    0B   -2
 ▶ free -t -h
               total        used        free      shared  buff/cache   available
Mem:            15Gi       7.0Gi       170Mi        57Mi       7.8Gi       7.6Gi
Swap:           23Gi        16Mi        23Gi
Total:          38Gi       7.1Gi        23Gi

So before when I had the problems it must have freaked out totally.

Or it was reindexing because it’s a newer version with an updated database schema?

1 Like

From looking at versions it is a possibility.

In Ubuntu 22 I had baloo-kf5 5.92.0-0ubuntu1

When installing EnOS I had

[2022-07-08T16:02:27+0200] [ALPM] installed baloo (5.95.0-1)

Now I have

[2022-07-11T07:59:43+0200] [ALPM] upgraded baloo (5.95.0-1 -> 5.96.0-1)

@manfredlotz welcome