Xorg (X process) heap allocation drives me mad..

I’m observing a curious case for a while now but still cannot fix the issue… Let me explain by order :slight_smile:

From some time ago I’ve noticed that my X session takes slightly more time on startup (I’m always starting it from console via “startx”, so all kdm/xdm/etc issues may skipped)… Looking more in detail, I’ve discovered my X process allocating in heap ~120MB on startup (while if I login on my laptop with another account it’ll allocate only ~11MB)… - I did not worry too much about 120MB as it was still few comparing to the amount of free RAM. The real problem is that this heap allocation become bigger and bigger with a time on X startup! Currently it already out-passed 400MB and I’m urgently looking for a solution to fix it! :slight_smile:

From my observations:

  • this heap memory is not really used because after 2-4 hours after startup I see it migrated to the swap…

  • this is not related to the intel video driver because I’ve reproduced the same problem with vesa too

  • it seems to be related to the KDE4 settings/other, because I don’t observe any huge heap allocation if I start XFCE4 session

  • it’s not related to the desktop effects, because when they are disabled the issue remains…

For the moment I’m planning to backup my home and migrate kde4 settings by settings expecting to find from where the problem is coming… But if anybody have any idea from where it may come - I’ll be very recognized and it’ll save me a lot of time :-))

Thanks in advance!

Rgds,
-Dimitri

dim7 wrote:
> my X process allocating in heap ~120MB on startup … Currently it already
> out-passed 400MB

where are you looking to see these numbers?

do you understand the difference between how the Linux kernel uses RAM
and how other systems you might be familiar with do?


palladium

Yes, forgot the say the heap I see via “pmap”.

Normal case:

2790: X
START SIZE RSS PSS DIRTY SWAP PERM MAPPING
08048000 1828K 1364K 1364K 0K 0K r-xp /usr/bin/Xorg
08211000 4K 4K 4K 4K 0K r–p /usr/bin/Xorg
08212000 32K 32K 32K 32K 0K rw-p /usr/bin/Xorg
0821a000 16840K 11848K 11848K 11832K 468K rw-p [heap]

Abnormal case:
10630: X
START SIZE RSS PSS DIRTY SWAP PERM MAPPING
08048000 1828K 1340K 1340K 0K 0K r-xp /usr/bin/Xorg
08211000 4K 4K 4K 4K 0K r–p /usr/bin/Xorg
08212000 32K 32K 32K 32K 0K rw-p /usr/bin/Xorg
0821a000 397828K 393376K 393376K 393376K 0K rw-p [heap]

And I repeat, this heap allocation is happening on startup (when yet no one or very few applications are running (only konsole, kmix, and few others not consuming something huge in RAM)…

Rgds,
-Dimitri

dim7 wrote:
> Yes, forgot the say the heap I see via “pmap”.

ok…nevermind…i will fall silent…i was afraid you were a newbie
(who had learned the word ‘heap’ maybe) looking at top and ready to
reinstall hoping to make his RAM use fall down to where it “should be”
(if he were running Redmond again, like he did yesterday…we get’em
everyday…and they sometimes hard to spot…sorry…hmmmmm, should’a
looked at your profile…)…

(sorry i can help with your problem…)


palladium

Finally found - the problem came from plasma…
Once moved all ~/.kde4/share/config/plasm* files to another place the issue is gone! - And on startup X process allocating only 15MB to the heap now!

Analyzing the plasma files I’ve found the contents of one to be strange: file “plasma-desktop-appletsrc” contains for unknown to me reasons 619(!) sections referencing “view-pim-calendar” - smells like a bug :slight_smile: but have no idea how to reproduce it :-))

Anyway, nice to know the problem was there, and it’s solved now.
(I’m using KDE-4.3.5-3.1 version).

Rgds,
-Dimitri