Bug 369566 - Absurdly high memory usage from kwin_x11, plasmashell, krunner, and kded5
Summary: Absurdly high memory usage from kwin_x11, plasmashell, krunner, and kded5
Status: RESOLVED NOT A BUG
Alias: None
Product: plasmashell
Classification: Plasma
Component: general (show other bugs)
Version: 5.6.5
Platform: Other Linux
: NOR grave
Target Milestone: 1.0
Assignee: David Edmundson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-30 10:45 UTC by Luke-Jr
Modified: 2016-10-03 13:25 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luke-Jr 2016-09-30 10:45:41 UTC
I have 16 GB RAM and I'm swapping with 20 GB of use after less than a day of uptime. Of the top 5 offenders, KDE 5 are 4 of them for /trivial/ things:
- kwin_x11 using over 3.5 GB
- plasmashell using over 3 GB
- krunner using nearly 1.5 GB
- kded5 using over 1 GB

I consider this to be "basically unusable" because it takes ~10 seconds just to see the text I am typing show up due to the heavy swapping.

Reproducible: Always
Comment 1 David Edmundson 2016-09-30 13:05:31 UTC
How are you determining memory usage?
Comment 2 Mathieu Jobin 2016-09-30 13:55:15 UTC
hmm, that strange, I have 3.8GB of ram on my ultrabook

kwin_x11 takes 188MB
plasma 92MB
krunner 22MB
kded5 takes 2360KB

and i'll throw Xorg in there as well, as it is quite critical
44MB

Chrome and Firefox are the two biggest memory consumer... 

I have mysqld, postgresql, elasticsearch and several other backend services... only firefox and chrome together brings my tiny system to a crawl

for that reason, I use qupzilla (169MB) 7 tabs open at the moment
Comment 3 Luke-Jr 2016-10-01 00:05:46 UTC
ps -eo size,pid,args | sort -n

AFAIK this is the only reliable way when swap is in use...?
Comment 4 David Edmundson 2016-10-03 01:13:38 UTC
That's not a valid measure. 
You're including shared memory multiple times as well as mmapd data pages.
Comment 5 Luke-Jr 2016-10-03 02:13:23 UTC
SIZE measures the amount of swap space a process would use if it were swapped out entirely. So while this might include some shared memory, it would only include it once per process, which isn't unreasonable for this report. It would also not include mmapd pages unless they were anonymous mmaps not stored on disk or used to access some other hardware, which are really no different than mallocs and therefore should be included in every meaningful measurement.

If you'd prefer I use another measurement, which do you suggest? The other alternatives all appear to be much less valid.
Comment 6 Mathieu Jobin 2016-10-03 13:01:30 UTC
I agree with David, this is not a valid measure of process memory usage.

not only its irrelevent to consider the total size to swap a process we use constantly

but also, I see processes showing up at the top of that list that i know for sure has no impact on my machine whether I bring them up, or close them.... like kate and kmail which shows 4th and 1st respectively. kwin is 2nd and plasmashell 3rd.

I can kill plasmashell it will make no performance impact on my system, I can relauch plasmashell it will have again no impact on my system.

sorting by rss is much more accurate in my opinion

here is my top 15

[mathieu@hz550 ~]$ ps -eo rss,command | sort -nr | awk {'print $2'} | head -n 15
kwin_x11
/opt/google/chrome/chrome
/usr/bin/qupzilla
/usr/bin/kmail
/opt/google/chrome/chrome
/opt/google/chrome/chrome
/opt/google/chrome/chrome
/usr/bin/plasmashell
/opt/google/chrome/chrome
/usr/lib/jvm/default-runtime/bin/java
/opt/google/chrome/chrome
/usr/lib/xorg-server/Xorg
/opt/google/chrome/chrome
/opt/google/chrome/chrome
/usr/lib/qt/libexec/QtWebEngineProcess
[mathieu@hz550 ~]$ 

even if kwin shows first, i don't care as i need it 100% if the time and its a single process.

32 chrome process is much more of a problem in my life

 mathieu@hz550 ~]$ ps -eo rss,command | sort -nr | awk {'print $2'} | grep chrome | wc -l 
32
[mathieu@hz550 ~]$ 

[mathieu@hz550 ~]$ ps -eo rss,vsz,size,pid,args | sort -n | cut -c -89 | tail -n 20
63084 868408 158032 3991 /opt/google/chrome/chrome --type=renderer --enable-features=Linu
65512 1308516 111400 8674 /usr/lib/qt/libexec/QtWebEngineProcess --type=renderer --disabl
67192 893400 184904 27013 /opt/google/chrome/chrome --type=renderer --enable-features=Lin
76056 1314728 110820 8813 /usr/lib/qt/libexec/QtWebEngineProcess --type=renderer --disabl
89776 681432 609356 1070 /usr/bin/mysqld --defaults-file=/home/mathieu/.local/share/akona
100492 1341528 135596 8809 /usr/lib/qt/libexec/QtWebEngineProcess --type=renderer --disab
105336 963104 200820 29069 /opt/google/chrome/chrome --type=renderer --enable-features=Li
112068 1391888 368624 26700 /opt/google/chrome/chrome --type=renderer --enable-features=L
117244 346676 64596  497 /usr/lib/xorg-server/Xorg -nolisten tcp -auth /var/run/sddm/{425
129928 975796 272952 26713 /opt/google/chrome/chrome --type=renderer --enable-features=Li
136536 4640520 620420 3583 /usr/lib/jvm/default-runtime/bin/java -Xms256m -Xmx1g -Djava.a
149360 988648 285212 26820 /opt/google/chrome/chrome --type=renderer --enable-features=Li
153064 9497796 2422820 2637 /usr/bin/plasmashell
161388 1510348 647616 26621 /opt/google/chrome/chrome
163888 1041524 320608 30004 /opt/google/chrome/chrome --type=renderer --enable-features=L
187280 1395876 876436 26695 /opt/google/chrome/chrome --type=gpu-process --channel=26621.
194980 5652248 2535452 8637 /usr/bin/kmail -qwindowtitle KMail
277884 3553852 778660 8756 /usr/bin/qupzilla https://bugs.kde.org/show_bug.cgi?id=369566
325052 1841280 998552 4245 /opt/google/chrome/chrome --type=renderer --enable-features=Li
363304 3608772 2480772 788 kwin_x11
[mathieu@hz550 ~]$
Comment 7 Mathieu Jobin 2016-10-03 13:25:26 UTC
for the sake of comparison...

after closing chrome and qupzilla

[mathieu@hz550 ~]$ ps -eo rss,vsz,size,pid,args | sort -n | cut -c -89 | tail -n 20
11932 1500652 124684 1157 /usr/bin/akonadi_imap_resource --identifier akonadi_imap_resour
12168 1426892 116024 1150 /usr/bin/akonadi_imap_resource --identifier akonadi_imap_resour
12232 731120 41084  1166 /usr/bin/akonadi_indexing_agent --identifier akonadi_indexing_ag
12988 1427140 116576 1160 /usr/bin/akonadi_imap_resource --identifier akonadi_imap_resour
14456 371260  5864  8655 /usr/lib/qt/libexec/QtWebEngineProcess --type=zygote --lang=en
14704 1355056 119488 1164 /usr/bin/akonadi_imap_resource --identifier akonadi_imap_resour
14804 1355696 110104 1152 /usr/bin/akonadi_imap_resource --identifier akonadi_imap_resour
15184 1427860 148148 1142 /usr/bin/akonadi_imap_resource --identifier akonadi_imap_resour
16040 102156 17204   154 /usr/lib/systemd/systemd-journald
18440 686824 615008  570 /usr/sbin/mysqld
35860 608012 39996 27633 /usr/bin/konsole
43228 697912 33564  5695 /usr/bin/ksysguard
65404 1358936 126752 8674 /usr/lib/qt/libexec/QtWebEngineProcess --type=renderer --disabl
66372 3968984 2266584 23570 kate -n --start Stadium
107728 339284 64596  497 /usr/lib/xorg-server/Xorg -nolisten tcp -auth /var/run/sddm/{425
118472 681432 609356 1070 /usr/bin/mysqld --defaults-file=/home/mathieu/.local/share/akon
137040 4640520 620420 3583 elasticsearch
153232 9497916 2422900 2637 /usr/bin/plasmashell
176920 6890432 2630020 8637 /usr/bin/kmail -qwindowtitle KMail
261992 3467080 2411264 788 kwin_x11
[mathieu@hz550 ~]$ free -k
              total        used        free      shared  buff/cache   available
Mem:        3962292     1056684     1998896      481452      906712     2199032
Swap:       3583992     1102876     2481116
[mathieu@hz550 ~]$