Plasmashell apparently using up too much RAM

People have already written on this issue with plasmashell, but I’m not sure I’ve seen a definite solution (see below). I have 32 GB of RAM, and half of it is used up by plasmashell. Even some swap is taken.

I estimated the amount of RAM used up by the plasmashell by counting the many plasmashell processes in htop.

A script to fix this or something like this has been mentioned in December:

Is that still applicable?

I think somebody said that such behavior is by design. Is that the case?

I’m a big fan of KDE Plasma, by the way. It is so rich and intuitive. I barely even changed the ways it is OOTB. I came from Mint’s Cinnamon and was blown away. It wouldn’t be my first choice to give up on Plasma. (And reinstalling at this point would be a hassle, too.)

EDIT I also applied the solution from here:

https://forum.kde.org/viewtopic.php?t=165779

Probably have to reboot, but, as I have already complained here, Timeshift is wasting my time without mercy, so I’m waiting until it finishes deleting the snapshot.

1 Like

Where do you see that? If that was the case as a bug, we all should be affected … The second linked topic shows
0 17440 G /usr/bin/plasmashell 115MiB
That is not half of 32GiB Or was something else you pointed that out?

System Monitor shows this on my end regarding plasmashell

1 Like

return

 free
 ps -Ao pid,user,comm,pcpu,rss,size,vsize,share --sort rss | grep -E "PID|plasmashell";

 ps -Ao pid,user,comm,pcpu,rss,size,vsize,share --sort rss | tail -10

I have 22 “plasmashell” threads but less 300Mo used for all :wink: ps -eLf | grep plasmashell

1 Like
               total        used        free      shared  buff/cache   available
Mem:           31934        3111         806       13538       28017       14827
Swap:          33791         427       33364
    PID USER     COMMAND         %CPU   RSS  SIZE    VSZ -
 150628 happy    plasmashell      0.4 283084 670688 4739020 -
 148097 happy        brave            0.1 195108 266996 21444712 -
 157788 happy        plasma-systemmo  4.7 196480 397820 2136924 -
 148480 happy        brave            0.1 201604 319060 21501352 -
 146090 happy        brave            0.1 206636 348896 21451652 -
 149489 happy        pamac-manager    0.0 218032 234208 1165636 -
 146190 happy        brave            0.9 251512 407072 21517348 -
 150628 happy        plasmashell      0.4 285640 672644 4740428 -
 147367 happy        brave            0.2 322280 418896 21541384 -
 145359 happy        brave            1.2 348744 480924 18005648 -
 145637 happy        brave            2.5 424640 537308 21633040 -

This is an example of what I saw in htop. I realize I’m probably wrong, but I took it to mean that 32,4% of available RAM (approx. 10 gigs) is taken by plasmashell.

 150635 happy          20   0 4569M  285M  153M S  0.0  0.9  0:02.89 /usr/bin/plasmashell
 150636 happy          20   0 4569M  285M  153M S  0.0  0.9  0:02.53 /usr/bin/plasmashell
 150637 happy          20   0 4569M  285M  153M S  0.0  0.9  0:00.12 /usr/bin/plasmashell
 150641 happy          20   0 4569M  285M  153M S  0.0  0.9  0:00.01 /usr/bin/plasmashell
 150652 happy          20   0 4569M  285M  153M S  0.0  0.9  0:00.44 /usr/bin/plasmashell
 150653 happy          39  19 4569M  285M  153M S  0.0  0.9  0:00.00 /usr/bin/plasmashell
 150654 happy          39  19 4569M  285M  153M S  0.0  0.9  0:00.00 /usr/bin/plasmashell
 150655 happy          39  19 4569M  285M  153M S  0.0  0.9  0:00.00 /usr/bin/plasmashell
 150656 happy          39  19 4569M  285M  153M S  0.0  0.9  0:00.00 /usr/bin/plasmashell
 150657 happy          20   0 4569M  285M  153M S  0.0  0.9  0:00.00 /usr/bin/plasmashell
 157760 happy          20   0 4569M  285M  153M S  0.0  0.9  0:00.00 /usr/bin/plasmashell
 157761 happy          20   0 4569M  285M  153M S  0.0  0.9  0:00.00 /usr/bin/plasmashell
 157762 happy          20   0 4569M  285M  153M S  0.0  0.9  0:00.00 /usr/bin/plasmashell
 157763 happy          20   0 4569M  285M  153M S  0.0  0.9  0:00.00 /usr/bin/plasmashell
 157764 happy          20   0 4569M  285M  153M S  0.0  0.9  0:00.00 /usr/bin/plasmashell
 157765 happy          20   0 4569M  285M  153M S  0.0  0.9  0:00.00 /usr/bin/plasmashell
 157766 happy          20   0 4569M  285M  153M S  0.0  0.9  0:00.00 /usr/bin/plasmashell
 157767 happy          20   0 4569M  285M  153M S  0.0  0.9  0:00.00 /usr/bin/plasmashell
 157768 happy          20   0 4569M  285M  153M S  0.0  0.9  0:00.02 /usr/bin/plasmashell
 157769 happy          20   0 4569M  285M  153M S  0.0  0.9  0:00.00 /usr/bin/plasmashell
 157770 happy          20   0 4569M  285M  153M S  0.0  0.9  0:00.00 /usr/bin/plasmashell
 157771 happy          20   0 4569M  285M  153M S  0.0  0.9  0:00.00 /usr/bin/plasmashell
 157772 happy          20   0 4569M  285M  153M S  0.0  0.9  0:00.00 /usr/bin/plasmashell
 157773 happy          20   0 4569M  285M  153M S  0.0  0.9  0:00.00 /usr/bin/plasmashell
 157774 happy          20   0 4569M  285M  153M S  0.0  0.9  0:00.00 /usr/bin/plasmashell
 157775 happy          20   0 4569M  285M  153M S  0.0  0.9  0:00.00 /usr/bin/plasmashell
 157776 happy          20   0 4569M  285M  153M S  0.0  0.9  0:00.00 /usr/bin/plasmashell
 157777 happy          20   0 4569M  285M  153M S  0.0  0.9  0:00.00 /usr/bin/plasmashell
 157778 happy          20   0 4569M  285M  153M S  0.0  0.9  0:00.01 /usr/bin/plasmashell
 157779 happy          20   0 4569M  285M  153M S  0.0  0.9  0:00.01 /usr/bin/plasmashell
 157780 happy          20   0 4569M  285M  153M S  0.0  0.9  0:00.00 /usr/bin/plasmashell
 157781 happy          20   0 4569M  285M  153M S  0.0  0.9  0:00.00 /usr/bin/plasmashell
 157782 happy          20   0 4569M  285M  153M S  0.0  0.9  0:00.00 /usr/bin/plasmashell
 157783 happy          20   0 4569M  285M  153M S  0.0  0.9  0:00.00 /usr/bin/plasmashell
 157784 happy          20   0 4569M  285M  153M S  0.0  0.9  0:00.00 /usr/bin/plasmashell
 157785 happy          20   0 4569M  285M  153M S  0.0  0.9  0:00.00 /usr/bin/plasmashell

read command free result : man

ram: 32Go
used: 3Go (brave use most)
available: 14 Go
shared: 13Go : default is 50% ram, can be released if needed (so you can view also as available :wink: )


free: 800Mo … is good, because linux optimize all ram : use all if no needed by apps

1 Like

If shared can be released as needed, why was swap used? Truth be told, I didn’t reduce swappiness yet. But does this mean that shared is inaccessible until the entire swap (33 gigs) is taken?

why you have swap ? we set swap only for hibernation or pc have few ram (less 8Go)
as writed in man, “shared” is a virtual directory (read man tmpfs) : if at a moment you use 15Go, linux reduce tmpfs
shared: 13Go : view as 13Go max (not /tmp/ use 13Go) :wink:

I tried to research shared. Checked this out:

https://www.linuxatemyram.com/

According to this site, and as you said, the system returns memory to apps if they need it. But the site says swap won’t be used. And my swap was used, though too much. I don’t get it.

The site also lists the increase in swap used as a warning sign.

EDIT 2 Looked at tmpfs(5) — Arch manual pages
It says tmpfs can use swap, so I guess the other site isn’t trustworthy.

But it isn’t explicitly stated that the space is freed if the apps need it. Isn’t the space as good as taken then?

No, there was only a minute percantage of swap used.

1 Like

Oh, my apologies, I meant to type “though not too much”.

I upgraded from 16 gigs because I sometimes work with huge files. I never thought I’d have to reboot Linux to use the entire new RAM. I still assume that apps can’t reclaim shared, because I didn’t find an absolute confirmation of that.

read “note” wiki arch and best source is linux documentation


with 32Go ram, to have tmpfs 15Go max is big ! you can reduce to 6Go “max” if you want, view arch wiki examples for edit etc/fstab

1 Like

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