LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-19-2007, 09:02 PM   #1
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 116Reputation: 116
Xorg memory leak?


I'm running Xorg 7.2.0 on my Mandriva 2007.1 system, with beryl 0.2 and KDE 3.5.6.

This system has 2 Gigs of RAM and 1 Gig of swap. X has been up now for 5 days (since the last time I had the system shut down to add another cooling fan).

Presently, all the RAM and 662,500 KB of swap are in use.

At the present time, Xorg is occupying 1,220,530 KB of memory, and 599,108 KB of that is resident, with the balance being cache.

When I first start Xorg, it occupies under 200,000 KB of memory and over time it grows and grows and grows, though it seems to have topped out in the last day or so.

Now, this system is pretty busy. At this time, it is running VMWare with one instance of Windows 2000 up in it and Wordperfect 8. I have 7 firefox windows open, with a total of 19 tabs. I have 3 ssh sessions up, connected to 3 servers that are out there someplace. I have 3 konqueror windows open, two of them displaying PDF files. Gaim is running, as are two instances of kate, one of ncftp, one of kmplayer, gkrellm, kontact, and Apache. There are assorted other odds and ends of tools up and running as well, but I have listed all the biggies and most of the not so biggies. All this runs on a 1680x1050 10-face beryl "cube".

My video card is an nVidia 7800 GS with 256 Megs of RAM.

As busy as this system is, it strikes me as totally absurd that Xorg is occupying 1.2 gigs. I know it caches things, but this is ridiculous. I've googled and lots of people seem to have complaints about memory usage with Xorg 7.2.0, but I haven't found anything definitive about a leak.

Does anyone here have any idea how I can rein this beast in? Is there a leak? If not, is there some cache setting, or whatever, that'll bring this under control?

It is really quite annoying to have to shut down X every few days to clean things up; takes me awhile to get the system back up afterwards.
 
Old 07-20-2007, 08:57 AM   #2
unixpgmr
LQ Newbie
 
Registered: Jun 2007
Posts: 16

Rep: Reputation: 0
I would try to reign in your Firefox application first. 7 windows with a total of 19 tab? You really first need to see what each application is doing to X before you an say that X has a memory leak. I am betting that Firefox is cause quite a bit of it. Try this: 1. Start X. 2. Check memory use 3. Start Firefox: no extra windows, no extra tabs and check memory usage of both. 4. Open up your 7 windows and 19 tabs in Firefox and check memory usage It would even be better if you can just do your browsing in the single window of Firefox for the stated time and keep memory usage. Good luck. I am interested in what you find, so post a reply with your results.
 
Old 07-20-2007, 09:06 AM   #3
Mark Havel
Member
 
Registered: May 2004
Location: Lyon, France
Distribution: Slackware
Posts: 85

Rep: Reputation: 15
It seems Linux is keen to put as many stuff as it can in the RAM, so the real question is: Do you feel the system is constantly swapping and stressing the disk drive at every single action you try to do?

If yes, then your RAM is totally filled and you'll need to look if there were not an application running constantly on your machine which has a memory leak.
As unixpgmr said, Firefox is a good candidate but it would be pretty strange since it is supposed to be another thread and as far as I know, X does not handles the X application like Java (ie a Java process such as Eclipse or Azureus appears in the process list taking a ridiculously low amount of memory while the Java process takes hundreds of MB).
If not, well, why worrying at all?
 
Old 07-20-2007, 11:07 AM   #4
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Original Poster
Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by unixpgmr
I would try to reign in your Firefox application first. 7 windows with a total of 19 tab? You really first need to see what each application is doing to X before you an say that X has a memory leak. I am betting that Firefox is cause quite a bit of it. Try this: 1. Start X. 2. Check memory use 3. Start Firefox: no extra windows, no extra tabs and check memory usage of both. 4. Open up your 7 windows and 19 tabs in Firefox and check memory usage It would even be better if you can just do your browsing in the single window of Firefox for the stated time and keep memory usage. Good luck. I am interested in what you find, so post a reply with your results.
Been there, done that. Firefox isn't much of the problem. By itself, firefox is taking about 417 meg presently, and that doesn't seem to be growing with time but does increase/decrease as I open and close windows and tabs. When I stop firefox (which I do by killing it so that when it restarts it will want to restore to the same state; I actually do have ongoing use for all this stuff and frequently rotate through all those windows and tabs performing certain functions) it will knock out roughly 100 megs of the Xorg usage. That usage promptly returns when I restart firefox.
 
Old 07-20-2007, 09:20 PM   #5
studioj
Member
 
Registered: Oct 2006
Posts: 460

Rep: Reputation: 31
it is certainly within the range of posibilities x has a memory leak. when xfree first switched to modular design with xfree4 it came out with a huge memory leak. but the more likely scenario is just all kinds of junk gets attributed to x. all of video ram gets attributed to x. basically all images get attributed to x even if they are run in another program. it all adds up over time until kswapd decides enough and starts kicking stuff out then it appears to stabalize. if you are not experiencing performance problems then just flow with it. or you can try to adjust /proc/sys/vm/swappiness
 
Old 07-20-2007, 10:08 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,125

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Don't know if it still works, but maybe have a look at xrestop.
 
Old 07-21-2007, 11:14 PM   #7
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Original Poster
Rep: Reputation: 116Reputation: 116
xrestop does not appear to be on my system.

X is now up for 7 days and is claiming 1.446 Gigs. Swap is 911.6 Megs used, leaving me with with less than 100 megs free. System performance is deteriorating due to swapping. Guess I'll have to stop/restart X.
 
Old 07-21-2007, 11:40 PM   #8
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Original Poster
Rep: Reputation: 116Reputation: 116
Well, I just logged out, restarted X, logged back in, and restarted my entire environment. X is now taking 362 Megs.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Memory leak? habl Slackware 11 02-02-2007 03:44 PM
memory leak ? os2 Programming 1 05-19-2005 01:45 PM
what is memory leak blackzone Programming 6 11-05-2004 10:32 AM
Memory Leak don_dimo Linux - General 7 03-06-2004 06:51 PM
Memory Leak when using memory debugging C program on SuSE SLES8 babalina Linux - Distributions 0 10-06-2003 09:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration