maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   Xorg Memory Leak (https://talk.maemo.org/showthread.php?t=67052)

AndrewX192 2010-12-16 06:55

Xorg Memory Leak
 
Hello,

Xorg is currently sitting at 11% memory use on my N900; not exactly a great thing. I tried killing Xorg the other day, to see if it would restart the process, but instead my phone decided it was time to reboot (reloaded the entire kernel). Is there a way to restart Xorg without completely rebooting the phone?

slender 2010-12-16 07:01

Re: Xorg Memory Leak
 
Before going to details I would like to ask you that:
Do you know what Xorg is?
Do you know what memory leak is?

AndrewX192 2010-12-16 07:17

Re: Xorg Memory Leak
 
Quote:

Originally Posted by slender (Post 897895)
Before going to details I would like to ask you that:
Do you know what Xorg is?
Do you know what memory leak is?

Yes, Xorg is the graphics server for any standard Linux distribution.

A memory leak can be noticed when an application continually uses more memory and does not release it properly.

In my case, Xorg uses more and more memory as time goes by, and becomes slower and slower. I have restarted hildon-desktop quite a few times, but Xorg has not released any memory.

I have the same problem on my Linux workstations, and I have to restart Xorg every 25-30 days because it ends up using 340+ MB of ram (from the 70-80MB of ram it starts at), despite restarting my window manager.

dchky 2010-12-16 11:58

Re: Xorg Memory Leak
 
What are you using to obtain Xorg memory statistics?

I have a few machines with 100+ days uptime running Xorg, memory usage is not even 50% of the values you have.

Applications can reserve as much memory as they want, this doesn't mean they are actually using it or wont release it if the need arises.

AndrewX192 2010-12-16 15:45

Re: Xorg Memory Leak
 
Quote:

Originally Posted by dchky (Post 898031)
What are you using to obtain Xorg memory statistics?

I have a few machines with 100+ days uptime running Xorg, memory usage is not even 50% of the values you have.

Applications can reserve as much memory as they want, this doesn't mean they are actually using it or wont release it if the need arises.

So far I have just been looking at conky and htop to see how much memory Xorg has been using.

Right now my phone is barely responding, the UI is barely responsive, I will need to restart my phone soon, as that clears up this issue every time.

slender 2010-12-17 07:39

Re: Xorg Memory Leak
 
Quote:

Originally Posted by AndrewX192 (Post 898134)
So far I have just been looking at conky and htop to see how much memory Xorg has been using.

Right now my phone is barely responding, the UI is barely responsive, I will need to restart my phone soon, as that clears up this issue every time.

What have you installed?
maemo-list-user-packages
Lists all packages installed by you. You can put list e.g. here: http://pastebin.com/

Have you done any tweaking?
Have you replaced system files/services like hildon-desktop?

AndrewX192 2010-12-19 08:34

Re: Xorg Memory Leak
 
It seems to be strongly related to the themes used with hildon, switching themes causes Xorg's memory usage to skyrocket.

slender 2010-12-19 09:23

Re: Xorg Memory Leak
 
Quote:

Originally Posted by AndrewX192 (Post 899832)
It seems to be strongly related to the themes used with hildon, switching themes causes Xorg's memory usage to skyrocket.

If you have time then could you document this to here:
https://bugs.maemo.org/

pycage 2010-12-19 11:01

Re: Xorg Memory Leak
 
Xorg most probably does not leak by itself, but applications leak into Xorg.
If applications use server-side pixmaps to store graphics, they appear in Xorg's memory statistics, instead of the application's.
So it's not Xorg to kill, but the misbehaving application.

AndrewX192 2010-12-20 04:44

Re: Xorg Memory Leak
 
Quote:

Originally Posted by slender (Post 899843)
If you have time then could you document this to here:
https://bugs.maemo.org/

Would it really be worth my time finding the exact situation where this issue can be reproduced? I thought future maemo development was dead.

Quote:

Originally Posted by pycage (Post 899901)
Xorg most probably does not leak by itself, but applications leak into Xorg.
If applications use server-side pixmaps to store graphics, they appear in Xorg's memory statistics, instead of the application's.
So it's not Xorg to kill, but the misbehaving application.

So, in theory, closing all my applications and killing hildon should resolve the issue, but I tried this, and ended up with higher Xorg memory usage after restarting hildon. It seems to be that Xorg is holding on to the memory it had reserved for use.


All times are GMT. The time now is 07:19.

vBulletin® Version 3.8.8