<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:admin="http://webns.net/mvcb/"
     xmlns:content="http://purl.org/rss/1.0/modules/content/"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
	<channel> 

      <title>Comments on: X11 leaking?</title>
      <link>http://ask.metafilter.com/93135/X11-leaking/</link>
      <description>Comments on Ask MetaFilter post X11 leaking?</description>
	  	  <pubDate>Tue, 03 Jun 2008 15:30:25 -0800</pubDate>
      <lastBuildDate>Tue, 03 Jun 2008 15:30:25 -0800</lastBuildDate>
      <language>en-us</language>
	  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
	  <ttl>60</ttl>

<item>
  	<title>Question: X11 leaking?</title>
  	<link>http://ask.metafilter.com/93135/X11-leaking</link>	
  	<description>Does my X11 server have a memory leak? &lt;br /&gt;&lt;br /&gt; My office workstation is a Dell Precision 390, which has a dual-core Core 2 Duo in it, with 4 GB of RAM. The workstation is running Red Hat Enterprise Linux 4:&lt;br&gt;
&lt;br&gt;
&lt;code&gt;$ uname -a&lt;br&gt;
Linux ... 2.6.9-67.0.7.ELsmp #1 SMP Wed Feb 27 04:47:23 EST 2008 x86_64 x86_64 x86_64 GNU/Linux&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
Here&apos;s the version of X11 this workstation is running:&lt;br&gt;
&lt;br&gt;
&lt;code&gt;$ xterm -v&lt;br&gt;
X.Org 6.8.2(192)&lt;br&gt;
$ rpm -qa xorg-x11&lt;br&gt;
xorg-x11-6.8.2-1.EL.33.0.2&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
Running system monitor, one monitor (GNU System Monitor 2.8) claims I have 100% of the memory in use, of which 37% is cached. Another monitor (System Monitor 2.7) suggests 2.2 GiB of 3.6 GiB is in use.&lt;br&gt;
&lt;br&gt;
If I run &lt;code&gt;top&lt;/code&gt;, the process &lt;code&gt;X&lt;/code&gt; (or, &lt;code&gt;/usr/X11R6/bin/X&lt;/code&gt;) takes up the most memory and CPU, and reports a different value from the other two monitors:&lt;br&gt;
&lt;br&gt;
&lt;code&gt;  PID USER      PR  NI %CPU    TIME+  %MEM  VIRT  RES  SHR S COMMAND&lt;br&gt;
 5508 root      15   0    6  29:24.93 45.4 2503m 1.6g 9600 S X&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
Is it normal for the X11 server to use this much memory? What can I do to improve this?&lt;br&gt;
&lt;br&gt;
I&apos;m running GNOME 2.8 as the desktop manager.&lt;br&gt;
&lt;br&gt;
My workstation has frequent &quot;pauses&quot; where, for example, I try to do work and the computer freezes for a moment or two, then keeps working. The IT guy already replaced RHEL 5 with RHEL 4 and that helped a lot, but my computer is still slow. Using KDE instead of GNOME hasn&apos;t helped much.&lt;br&gt;
&lt;br&gt;
I can&apos;t really do much to change workstation settings as it is locked down. If there&apos;s a memory leak or other technical problem, I&apos;d like to go to my IT guy with as much info as possible to save his time (and mine). I&apos;m running some intensive work and need as much CPU and memory as I can get.&lt;br&gt;
&lt;br&gt;
Thanks for any advice.</description>
  	<guid isPermaLink="false">post:ask.metafilter.com,2008:site.93135</guid>
  	<pubDate>Tue, 03 Jun 2008 15:24:40 -0800</pubDate>
  	<dc:creator>Blazecock Pileon</dc:creator>
	
	<category>x11</category>
	
	<category>linux</category>
	
	<category>rhl</category>
	
	<category>rhel</category>
	
	<category>rhel4</category>
	
	<category>x</category>
	
	<category>display</category>
	
	<category>memory</category>
	
	<category>leak</category>
	
	<category>kernel</category>
	
</item>
<item>
  	<title>By: GuyZero</title>
  	<link>http://ask.metafilter.com/93135/X11-leaking#1363040</link>	
  	<description>I&apos;m unsure why you think the symptoms you&apos;re reporting indicate a memory leak in the X server. X is pretty widely used, so if it was leaky you wouldn&apos;t be the only person to notice. As for memory usage, X may be memory-mapping files and video buffers in causing its virtual memory footprint to be much larger than its actual memory usage.&lt;br&gt;
&lt;br&gt;
There could be other causes to the problem - a slow disk? Mapped network folders which contain important system files that are slow to access? I assume you have several NFS shares mounted - any of them have stuff you&apos;re using heavily that you can move locally?</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.93135-1363040</guid>
  	<pubDate>Tue, 03 Jun 2008 15:30:25 -0800</pubDate>
  	<dc:creator>GuyZero</dc:creator>
</item>
<item>
  	<title>By: Blazecock Pileon</title>
  	<link>http://ask.metafilter.com/93135/X11-leaking#1363059</link>	
  	<description>&lt;em&gt;I&apos;m unsure why you think the symptoms you&apos;re reporting indicate a memory leak in the X server.&lt;/em&gt;&lt;br&gt;
&lt;br&gt;
From the tools I am using to report usage, it appears to be using between 50-100% of 4 GB of system memory. Granted, those values are not consistent between monitors, but they do seem consistent within the monitor used.&lt;br&gt;
&lt;br&gt;
&lt;em&gt;X is pretty widely used, so if it was leaky you wouldn&apos;t be the only person to notice.&lt;/em&gt;&lt;br&gt;
&lt;br&gt;
Perhaps it might be interaction of that version of X with this version of whatever, that &amp;quot;whatever&amp;quot; being some other system component, video card, kernel, etc. which may not necessarily be reproduced by (many) other setups.&lt;br&gt;
&lt;br&gt;
&lt;em&gt;I assume you have several NFS shares mounted - any of them have stuff you&apos;re using heavily that you can move locally?&lt;/em&gt;&lt;br&gt;
&lt;br&gt;
I run Firefox, Thunderbird and Terminal. Occasionally I run &lt;code&gt;ggv&lt;/code&gt; to view PDFs. All of these apps are running locally. Terminal may access an NFS share when I run &amp;quot;ls -al&amp;quot;, etc. in NFS&apos;ed directories, but Firefox and Thunderbird should be doing the bulk of their work on the local drive.</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.93135-1363059</guid>
  	<pubDate>Tue, 03 Jun 2008 15:43:44 -0800</pubDate>
  	<dc:creator>Blazecock Pileon</dc:creator>
</item>
<item>
  	<title>By: qxntpqbbbqxl</title>
  	<link>http://ask.metafilter.com/93135/X11-leaking#1363069</link>	
  	<description>It&apos;s unusual for X to use that much memory.  It may well be a memory leak.  &lt;br&gt;
&lt;br&gt;
You might try switching to different video drivers (i.e. vesa) and window managers to isolate the problem.   Or just restarting X periodically if you can live with it... how long has it been running?</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.93135-1363069</guid>
  	<pubDate>Tue, 03 Jun 2008 15:50:55 -0800</pubDate>
  	<dc:creator>qxntpqbbbqxl</dc:creator>
</item>
<item>
  	<title>By: Nelson</title>
  	<link>http://ask.metafilter.com/93135/X11-leaking#1363107</link>	
  	<description>The most useful thing you can do is to take regular snapshots of how much memory your X server is running. Maybe also with vmstat reports to show swapping activity.&lt;br&gt;
&lt;br&gt;
There&apos;s no way an X server should take 1.5 gigs fo RAM. Either it&apos;s leaking memory itself or, more likely, some application is creating resources on the X server and they&apos;re not getting properly freed. Does the memory consumption go down if you log out and exit all of your applications? What about if you restart the whole X server via Ctrl-\ or similar means?</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.93135-1363107</guid>
  	<pubDate>Tue, 03 Jun 2008 16:34:38 -0800</pubDate>
  	<dc:creator>Nelson</dc:creator>
</item>
<item>
  	<title>By: Loudmax</title>
  	<link>http://ask.metafilter.com/93135/X11-leaking#1363132</link>	
  	<description>Does X still use all those CPU cycles if you aren&apos;t running any applications?  Try shutting down as much as you can in Gnome and see if shutting down any one application makes a difference for X&apos;s usage.&lt;br&gt;
&lt;br&gt;
In /etc/X11/xorg.conf, there should be a section labeled &amp;quot;Device&amp;quot; that tells X what driver to load.  Does the configured driver match your hardware?</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.93135-1363132</guid>
  	<pubDate>Tue, 03 Jun 2008 16:54:36 -0800</pubDate>
  	<dc:creator>Loudmax</dc:creator>
</item>
<item>
  	<title>By: Zach!</title>
  	<link>http://ask.metafilter.com/93135/X11-leaking#1363134</link>	
  	<description>I&apos;m not convinced that your memory usage measurements really disagree with each other, but that&apos;s kind of irrelevant since X shouldn&apos;t be using so much memory by any metric.&lt;br&gt;
&lt;br&gt;
I agree with Nelson; I&apos;ve definitely seen Firefox make X use lots of memory, for example.</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.93135-1363134</guid>
  	<pubDate>Tue, 03 Jun 2008 16:56:42 -0800</pubDate>
  	<dc:creator>Zach!</dc:creator>
</item>
<item>
  	<title>By: polyglot</title>
  	<link>http://ask.metafilter.com/93135/X11-leaking#1363246</link>	
  	<description>I find X to be leaky too, but it generally takes about 3 months of uptime before it becomes a problem and an X-restart (log out then in again) solves it.  It doesn&apos;t CPU-hog.&lt;br&gt;
&lt;br&gt;
I find that Mozilla use is the biggest cause of X memory allocation blowing out and that restarting it can cause X to release a LOT of memory.  I think moz is allocating loads and loads of pixmaps for displaying stuff, which causes X to bloat.  If you&apos;re running some graphics-heavy application, that could be the cause even if X itself is not buggy.&lt;br&gt;
&lt;br&gt;
X will use CPU if you have actively-changing graphics on-screen - like animations in a browser.</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.93135-1363246</guid>
  	<pubDate>Tue, 03 Jun 2008 18:30:07 -0800</pubDate>
  	<dc:creator>polyglot</dc:creator>
</item>

    </channel>
</rss>
