[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: KDE4 is a memory hog
From: "Aaron J. Seigo" <aseigo () kde ! org>
Date: 2009-07-15 6:49:33
Message-ID: 200907150049.38302.aseigo () kde ! org
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
On Monday 13 July 2009, Thiago Macieira wrote:
> Our stacks are far too large. That's easily visible in many applications.
> Here's an excerpt from /proc/`pidof plasma-desktop`/smaps:
>
> 096d8000-168ad000 rw-p 096d8000 00:00 0 [heap]
em. our stacks are far too large, so here's the heap measure? :)
aseigo@independence:~/Documents> cat /proc/`pidof plasma-desktop`/smaps | grep
stack -A4
bf95e000-bf973000 rw-p bffeb000 00:00 0 [stack]
Size: 84 kB
Rss: 80 kB
Pss: 80 kB
Shared_Clean: 0 kB
anyways:
> Size: 214868 kB
> Rss: 214576 kB
> Pss: 214576 kB
>
> Can anyone tell me why Plasma needed to allocate 209.8 MB of RAM? (binary
> 1024 units)
probably a memory leak somewhere. or maybe something in your configuration
that's taking an unreasonable amount of ram.
profiling would be helpful. even knowing what your configuration is would be
helpful. (there have been reports that suggest there's a leak somewhere in the
slideshow wallpaper, though it hasn't been identified. iirc you use a
slideshow paper over two screens, yes?)
so .. here's my laptop's current uptime (for which time it's been constantly
logged into a kde4 session):
12:42am up 3 days 22:09, 23 users, load average: 0.41, 0.35, 0.37
and the [heap] entry from plasma's smaps is:
08055000-09729000 rw-p 08055000 00:00 0 [heap]
Size: 23376 kB
Rss: 23096 kB
Pss: 22984 kB
Shared_Clean: 0 kB
but then right now on this machine i'm only running one panel, one screen with
a single image wallpaper, tasks, kickoff, device notifier, system tray,
battery, digital clock weather and translation widgets.
a good chunk of that 23mb is likely to be the wallpaper i'm using (though
maybe that isn't permanently stored in the heap; i haven't looked yet) and the
rest will be various bits of windows and widgets and data structures.
nearly zero profiling has gone on for memory usage within plasma, and that
certainly shows. it could also be a lot worse.
> There are definitely memory leaks in some places. In other places, we need
> profiling to find out why we're wasting so much memory.
yep.
> However, I also know that we are using more memory for caching things,
> pre-rendered pixmaps for example. We use more memory to make the system
> faster. So I don't expect KDE 4 to reach KDE 3 levels again.
quite true ... there are probably places we do things unnecessarily.
> No. I expect KDE 4 to excel in other areas, like battery time. For
> example, right now, Plasma wakes up between 20 and 60 times per second due
> to timers. Killing Plasma makes my laptop's power consumption drop by 1 W
bugs get fixed as and when reported. this was probably the taskbar timers
issue i fixed before leaving for vancouver.
and really, it's kind of that simple. most of the things in this thread are
of the "huh, something's broken or not as good as it should be" type to which
the answer is simple:
* identify the problem specifically ("timers are firing" == not specific
enough; "i remove the taskbar and it goes quiet" == a great start)
* figure out a solution ("let's look at use of timers and QObject::connect in
the tasks widget and libtaskmanager")
* fix it
there really are no shortcuts. and as such, unless this kind of discussion is
accompanied with some of the above steps it's all just an exercise is
uselessness.
and getting real numbers, not just garbage from top-alikes, is pretty
important, too.
--
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA EE75 D6B7 2EB1 A7F1 DB43
KDE core developer sponsored by Qt Software
["signature.asc" (application/pgp-signature)]
>> 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