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

List:       kde-devel
Subject:    Re: KDE4 is a memory hog
From:       dunsens () web ! de
Date:       2009-07-17 9:45:38
Message-ID: 200907171145.39591.dunsens () web ! de
[Download RAW message or body]

Hi,

I have now tried, stepped ahead and installed 4.2.4 on my machines (debian-
desktop.org backports). I have to say that I am quite pleased. Since the PS3 
has a fast swap it is actually capable of running KDE4 sessions. The C3 feels 
slow, but 512mb seem enough. KWin crashes with my default settings for 
openchrome via driver though, so i had to disable the composite extension. 
The PS3 feels a bit sluggish, but it does not really get in your way. You can 
run Kopete + Firefox + amarok (1.4). This is really o.k. (No youtube of 
course, shame at adobe).
I can also login 3 sessions with an typical work environment on the 1gb ram 
machines. I get 100-200mb swapping then, but I guess that 4.3 will improve 
that due to the nvidia issue.

Things that I have seen testing with exmap/valgrind --massif:

-Fonts can make a huge difference. Parts of my high memory usage seem to be 
related to using "Free Sans". I am at DejaVu Sans now and it is better. 
Dolphin shows high heap usage related to libfreetype for example. But it is 
not really gone - Konsole uses 7mb heap for a one bash tab:
91.09% (6,792,796B) (heap allocation functions) malloc/new/new[], --alloc-fns, 
etc.
->44.73% (3,335,865B) 0x5CCDCEC: (within /usr/lib/libfreetype.so.6.3.18)
| ->44.73% (3,335,865B) 0x5CD1EBA: ft_mem_qalloc (in 
/usr/lib/libfreetype.so.6.3.18)
|   ->44.73% (3,335,865B) 0x5CD3B72: ft_mem_alloc (in 
/usr/lib/libfreetype.so.6.3.18)

-Konqueror really is a memory hog although it seems to not be. It uses more 
memory on the same three tabs/sites test setup than firefox, although exmap 
even calculates the shared lib usage where it should have a great advantage. 
This is bad since Firefox has not nearly a as good kde integration.

-Kopete takes too much memory. It has a total memory of between 20-24mb here, 
having 12mb heap:
85.80% (10,692,856B) (heap allocation functions) malloc/new/new[], --alloc-
fns, etc.
->24.69% (3,077,240B) 0x4F67DCC: qMalloc(unsigned) (in 
/usr/lib/libQtCore.so.4.4.3)
| ->07.87% (981,434B) 0x4FB1AB8: QString::realloc(int) (in 
/usr/lib/libQtCore.so.4.4.3)
Don't know why, but I guess that could be better... Maybe it is due to the 
emoticons being cached...

-Akonadi takes round about 30 mb. I just kill it if I need to. The always on 
startup message about migrating the standard ressources gets on my nerves, 
too, btw....

-Amarok really uses between 60-70 mb on kubuntu here. This does not mean much 
as heaps seem to be generally larger on kubuntu for some reason. But 70 mb is 
really bad. 

I am happy to be able to use KDE4 on my systems now and I am looking forward 
to use 4.3/4.4. It is really the most advanced *nix desktop imo, so thx for 
your great work!

Cheers,
whilo

> 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!
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

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