[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    KDE4 is a memory hog
From:       Christian Weilbach <christian_weilbach () web ! de>
Date:       2009-07-13 8:26:34
Message-ID: 200907131026.39606.christian_weilbach () web ! de
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi,

As I have blogged before here: http://whilos.blogsite.org/?p=102 I have 
certain problems about KDE4's increased memory requirements and I am not 
alone.
Forgive me the length of the mail, but I have already tried to convince people 
that this is a serious issue and have failed in the past, so I have really 
tried to get proving information together and am looking forward to your help.

The problem:
KDE3's memory usage is roughly on par with Gnome 2 on my systems. The memory 
usage for a default session in "free" has always roughly been 200-300 mb for a 
chat app + a web browser + maybe some other app. I know this is not exact, but 
it gives an idea + my systems with 1gb ram always worked well with several 
running KDE3 and Gnome sessions (generally max. 4), so back then I haven't 
really worried about ram. My setup consists of a nfs4 file server for /home + 
multimedia and on the client-side: a VIA C3 with 512mb ram, a PS3 with ~200 mb 
ram, an iBook with 512mb ram, an Athlon XP 64bit with 1gb ram, a Core 2 Duo 
laptop with 1gb ram and a kvm machine with 512mb ram as nxserver for external 
usage. 
They all share the same /home settings, which works great for me. But this 
only works if you can keep versions the same on all clients, so all my 
machines are running Debian Lenny (i386/ppc) with KDE 3.5 to not stress me too 
much.
At the moment I am testing KDE4.2 backported packages from www.debian-
desktop.org (which are backported from experimental for stable) for a future 
upgrade path on my laptop. Before I have tested Kubuntu 9.04 which has had a 
quite similar memory usage (500-700 free -patches/buffers [haven't got the 
exmap modules to compile yet btw]).
I have already worked with svn trunk in the past and ever since I have first 
tried 4.0 betas I have recognized a bloated memory usage. In the beginning I 
have not cared much, since I only needed one session on my laptop and it was 
only my dev environment with debugging stuff + I have thought it could be my 
fault. But in the meantime KDE4 has grown stable and at some point in the 
future I'd really like to update + I have to, although the memory situation 
has not changed.
So either I have to drop KDE from my environment and switch to Gnome/... or I 
have to upgrade at least 3 of my machines to get KDE4 running. (512mb for one 
session can get you swapping already, not to mention if you use Firefox with 
KDE4, which sadly is not memory friendly either) + the 1gb ones for 
multisession usage as well. At least the C3 and the PS3 will be to weak and 
not upgradable for KDE4's memory usage. I don't know if the iBook is easily 
accessible for memory upgrade either by the way. 
This is the first time in my personal 5 year Linux desktop history that I have 
to upgrade my hardware to keep roughly the same feature set running 
(browser+chat+fileserving+multimedia stuff+office) and I don't think I 
want to pay all the ram dims and pull the other machines off the network.

Objections so far:
a) "free is not a benchmarking tool"
Sure but even looking at Lubos memory benchmarking sites free gives roughly an 
idea + swapping really occurs. See exmap testing below.

b) "Kubuntu is a bad distribution for KDE." 
I guess they still share a lot with Debian KDE-wise, so Debian packages should 
have the problem as well. People in #debian-kde object this objection, as they 
basically use unpatchted sources. Memory usage due to "free" without any X 
running, but all other services is roughly 40mb so this cannot be a problem 
with the lower not-involved software stack on Debian Lenny here.
Still I have tested with exmap as advised by Lubos. See below. The problem is 
that exmap has not really friendly output options, only a GTK interface.

c) "It works for me on distribution X." 
Well I have compared to OpenSuse 11.1 and I can tell you that, since this is 
Lubos' distribution, it should compare really well, but it does neither in 
stock nor in my settings. The differences are a certain margin in favour of 
OpenSUSE (which might be due to i386 against i586 archs/compiler flags/... for 
example). But i586 does not run on the C3.

d) "You have to get new hardware sometimes."
I totally agree that I need new hardware to get new features, e.g. hardware 
compositing. But funnily this now starts to work on older machines like the 
VIA or iBook and might work once there is a Cell state tracker for Gallium3d 
in the future on the PS3 as well. The CPU usage is also absolutely not the 
problem unless you watch highdef video.
And I cannot use strigi for example, it always deactivates itself, since nfs4 
is not designed for proper file locking. Plasma as being told by Aaron is not 
thought to be the problem either and I don't have many containments or 
applets.

The benchmarking:
You find the screenshots of exmap attached. I have always rebooted between 
tests and new users accounts have been freshly created + initialized by a KDE4 
session and tested after a reboot. I have tested both with GDM and KDM, which 
gave the funny result that KDE4+GDM on OpenSUSE is less memory hungry than 
with KDM?!!
I have loaded 2xweb browser processes (konqueror for kde/firefox for gnome 
[which is already a kde friendly choice]) + a terminal window as this reflects 
a minimum actually "usable" session for me.
You can clearly see that Gnome is much better and KDE4 takes ~310-360 mb 
minimum where Gnome with the hungry Firefox (55mb) takes only 210 mb. Gnome 
runs without compositing though (this is an i945 chip btw). Compared to Lubos' 
benchmark from 2006 (http://ktown.kde.org/~seli/memory/desktop_benchmark.html) 
this is generally a lot worse, but most likely also a bit more realistic for 
an average session. But back then KDE3 has been claimed to be more efficient and 
128mb were enough for a small session. You cannot talk of that anymore, really 
not.

I can do any further testing as you wish and post the results here. 

Cheers,
whilo

P.S.: I have really tried hard to do it seriously, it has taken me several 
hours to setup OpenSUSE+configure it for my network (nfs4,kerberos,...) + get 
exmap installed to compare. I really take this serious.

P.P.S.: Of course I am writing this because I like KDE4 a lot, so don't take 
it as moaning. I am simply out of ideas and don't see the issue being 
addressed. I have also lost my perspective on caring for my few dev pet 
projects in svn, since I am currently not sure if I can even use KDE4 in the 
next years.
-- 
My blog: http://whilos.blogsite.org

No brain - no headache!



[Attachment #5 (text/html)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" \
"http://www.w3.org/TR/REC-html40/strict.dtd"><html><head><meta name="qrichtext" \
content="1" /><style type="text/css">p, li { white-space: pre-wrap; \
}</style></head><body style=" font-family:'FreeSans'; font-size:11pt; \
font-weight:400; font-style:normal;">Hi,<br> <p style="-qt-paragraph-type:empty; \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>As I have blogged \
before here: http://whilos.blogsite.org/?p=102 I have <br> certain problems about \
KDE4's increased memory requirements and I am not <br> alone.<br>
Forgive me the length of the mail, but I have already tried to convince people <br>
that this is a serious issue and have failed in the past, so I have really tried to \
get proving information together and am looking forward to your help.<br> <p \
style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>The \
problem:<br> KDE3's memory usage is roughly on par with Gnome 2 on my systems. The \
memory <br> usage for a default session in "free" has always roughly been 200-300 mb \
for a chat app + a web browser + maybe some other app. I know this is not exact, but \
it gives an idea + my systems with 1gb ram always worked well with several running \
KDE3 and Gnome sessions (generally max. 4), so back then I haven't really worried \
about ram. My setup consists of a nfs4 file server for /home + <br> multimedia and on \
the client-side: a VIA C3 with 512mb ram, a PS3 with ~200 mb <br> ram, an iBook with \
512mb ram, an Athlon XP 64bit with 1gb ram, a Core 2 Duo <br> laptop with 1gb ram and \
a kvm machine with 512mb ram as nxserver for external <br> usage. <br>
They all share the same /home settings, which works great for me. But this <br>
only works if you can keep versions the same on all clients, so all my <br>
machines are running Debian Lenny (i386/ppc) with KDE 3.5 to not stress me too <br>
much.<br>
At the moment I am testing KDE4.2 backported packages from www.debian-<br>
desktop.org (which are backported from experimental for stable) for a future <br>
upgrade path on my laptop. Before I have tested Kubuntu 9.04 which has had a quite \
similar memory usage (500-700 free -patches/buffers [haven't got the exmap modules to \
compile yet btw]).<br> I have already worked with svn trunk in the past and ever \
since I have first <br> tried 4.0 betas I have recognized a bloated memory usage. In \
the beginning I <br> have not cared much, since I only needed one session on my \
laptop and it was <br> only my dev environment with debugging stuff + I have thought \
it could be my <br> fault. But in the meantime KDE4 has grown stable and at some \
point in the <br> future I'd really like to update + I have to, although the memory \
situation has not changed.<br> So either I have to drop KDE from my environment and \
switch to Gnome/... or I have to upgrade at least 3 of my machines to get KDE4 \
running. (512mb for one <br> session can get you swapping already, not to mention if \
you use Firefox with KDE4, which sadly is not memory friendly either) + the 1gb ones \
for multisession usage as well. At least the C3 and the PS3 will be to weak and not \
upgradable for KDE4's memory usage. I don't know if the iBook is easily accessible \
for memory upgrade either by the way. <br> This is the first time in my personal 5 \
year Linux desktop history that I have to upgrade my hardware to keep roughly the \
same feature set running (browser+chat+fileserving+multimedia stuff+office) and I \
don't think I <br> want to pay all the ram dims and pull the other machines off the \
network.<br> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;"><br></p>Objections so far:<br> a) "free is not a benchmarking \
tool"<br> Sure but even looking at Lubos memory benchmarking sites free gives roughly \
an <br> idea + swapping really occurs. See exmap testing below.<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;"><br></p>b) "Kubuntu is a bad distribution for KDE." <br> I guess \
they still share a lot with Debian KDE-wise, so Debian packages should have the \
problem as well. People in #debian-kde object this objection, as they basically use \
unpatchted sources. Memory usage due to "free" without any X running, but all other \
services is roughly 40mb so this cannot be a problem with the lower not-involved \
software stack on Debian Lenny here.<br> Still I have tested with exmap as advised by \
Lubos. See below. The problem is <br> that exmap has not really friendly output \
options, only a GTK interface.<br> <p style="-qt-paragraph-type:empty; \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>c) "It works for me \
on distribution X." <br> Well I have compared to OpenSuse 11.1 and I can tell you \
that, since this is Lubos' distribution, it should compare really well, but it does \
neither in stock nor in my settings. The differences are a certain margin in favour \
of OpenSUSE (which might be due to i386 against i586 archs/compiler flags/... for \
example). But i586 does not run on the C3.<br> <p style="-qt-paragraph-type:empty; \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>d) "You have to get \
new hardware sometimes."<br> I totally agree that I need new hardware to get new \
features, e.g. hardware <br> compositing. But funnily this now starts to work on \
older machines like the <br> VIA or iBook and might work once there is a Cell state \
tracker for Gallium3d <br> in the future on the PS3 as well. The CPU usage is also \
absolutely not the <br> problem unless you watch highdef video.<br>
And I cannot use strigi for example, it always deactivates itself, since nfs4 <br>
is not designed for proper file locking. Plasma as being told by Aaron is not thought \
to be the problem either and I don't have many containments or applets.<br> <p \
style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>The \
benchmarking:<br> You find the screenshots of exmap attached. I have always rebooted \
between tests and new users accounts have been freshly created + initialized by a \
KDE4 session and tested after a reboot. I have tested both with GDM and KDM, which \
gave the funny result that KDE4+GDM on OpenSUSE is less memory hungry than with \
KDM?!!<br> I have loaded 2xweb browser processes (konqueror for kde/firefox for gnome \
[which is already a kde friendly choice]) + a terminal window as this reflects a \
minimum actually "usable" session for me.<br> You can clearly see that Gnome is much \
better and KDE4 takes ~310-360 mb minimum where Gnome with the hungry Firefox (55mb) \
takes only 210 mb. Gnome runs without compositing though (this is an i945 chip btw). \
Compared to Lubos' benchmark from 2006 \
(http://ktown.kde.org/~seli/memory/desktop_benchmark.html) this is generally a lot \
worse, but most likely also a bit more realistic for an average session. But back \
then KDE3 has been claimed to be more efficient and 128mb were enough for a small \
session. You cannot talk of that anymore, really not.<br> <p \
style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>I \
can do any further testing as you wish and post the results here. <br> <p \
style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;"><br></p>Cheers,<br> whilo<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;"><br></p>P.S.: I have really tried hard to do it seriously, it has \
taken me several hours to setup OpenSUSE+configure it for my network \
(nfs4,kerberos,...) + get exmap installed to compare. I really take this serious.<br> \
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;"><br></p>P.P.S.: Of course I am writing this because I like KDE4 a \
lot, so don't take it as moaning. I am simply out of ideas and don't see the issue \
being addressed. I have also lost my perspective on caring for my few dev pet \
projects in svn, since I am currently not sure if I can even use KDE4 in the next \
                years.<br>
-- <br>
My blog: http://whilos.blogsite.org<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;"><br></p>No brain - no headache!<br> <p \
style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p><p \
style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;"><br></p></body></html>


["debian_gnome_gdm.png" (image/png)]
["debian_kde_newuser_gdm.png" (image/png)]
["debian_kde_gdm.png" (image/png)]
["opensuse_kde_gdm.png" (image/png)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic