Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux

Newegg Daily Deals

Reply
 
Thread Tools
Old 07-14-08, 07:38 AM   #1
uOpt
FreeBSD cheering section
 
uOpt's Avatar
 
Join Date: Nov 2004
Location: Boston, MA, USA
Posts: 609
Default X11 server very bloated (RSS), won't shrink even when killing shmen etc, seems locked

Not sure whether this is NVidia or Xorg, maybe somebody can shed some light?

My X11 server (Linux amd64, Xorg 7.1.1, NVidia 169.12) has grown to 5.7 GB virtual, but worse to 1.9 GB resident memory. That's half of my total 4 GB of memory. This is after I sorted through several years of full-resolution digicam pictures, so I bet 45 cookies it's somehow related to pixmap storage.

It won't shrink. I went through all shmem segments (`ipcs` etc.) and there were no huge takers. I killed all firefoxes and gimps and now the last takers are GNOME-related and small, for a total of 5 MB in `ipcs`. I issued a /proc/sys/vm/drop_caches, but still to no avail. The resident size is still 1.9 GB. In fact it has been 12 hours since the cleanup and it is still that big and growing (started a firefox).

I went on and started unrelated huge memory wasting programs to make some of the X11 server give way, but to no avail. RSS of the X11 server doesn't shrink by a single byte. So I figure this sucker has actually locked it's pages in memory. All I get from other memory demands is more swapspace taken

Concrete questions:
  • any ideas how to tell this thing to "gc" it's pixmap storage?
  • why is this memory not getting paged out?
  • does the X11 server lock pages in memory and can I make it stop doing that?

(memory map appended)
Attached Files
File Type: txt l.txt (19.6 KB, 153 views)
__________________

My Unix benchmark results
uOpt is offline   Reply With Quote
Old 07-14-08, 09:51 PM   #2
DHowett
Registered User
 
Join Date: Apr 2006
Posts: 7
Default Re: X11 server very bloated (RSS), won't shrink even when killing shmen etc, seems lo

There was a libpixman update (0.11.4) which did not free the pixmaps it operated on, causing X to EXPLODE with memory usage. I'm not sure if this is your problem, but it is worth looking into.
DHowett is offline   Reply With Quote
Old 07-15-08, 06:16 PM   #3
uOpt
FreeBSD cheering section
 
uOpt's Avatar
 
Join Date: Nov 2004
Location: Boston, MA, USA
Posts: 609
Default Re: X11 server very bloated (RSS), won't shrink even when killing shmen etc, seems lo

Oh well. Now I have to figure out how that translates to the Debian version number which is 0.1.6 on that box.

I pulled the plug and restarted the X11 server, but it was right back up at 1 GB RSS again, after about 5 minutes.

I'm going to update the NVidia drivers now. Everything else is up-to-date.
__________________

My Unix benchmark results
uOpt is offline   Reply With Quote
Old 10-26-08, 08:51 PM   #4
uOpt
FreeBSD cheering section
 
uOpt's Avatar
 
Join Date: Nov 2004
Location: Boston, MA, USA
Posts: 609
Default Re: X11 server very bloated (RSS), won't shrink even when killing shmen etc, seems lo

I'd like to bump this.

Still having this problem with new versions of everything. Still having the problem that the X11 server locks in that much memory (after e.g. visiting the game screenshots thread) and doesn't give it up. Problem is there if I run GNOME or not. Memory in the X11 server is not released when I exit all X11 clients, and checked with ipcs that there isn't anything left.

But only on the X11 server with NVidia cards.

On my notebook with ATI card and default X11 drivers, with roughly the same X11 server version (1.3), I visit basically the same websites and it does not show this phenomenon. It's growing to about 300 MB and stays there. The NVidia equipped server raises to 1.6-1.8 GB quickly and stays there. And it never shrinks even if I get rid of all clients but the session-holding xterm.
__________________

My Unix benchmark results
uOpt is offline   Reply With Quote
Old 10-27-08, 01:35 PM   #5
rtcm
Registered User
 
Join Date: Oct 2007
Posts: 51
Default Re: X11 server very bloated (RSS), won't shrink even when killing shmen etc, seems lo

You should post an nvidia-bug-report file. http://www.nvnews.net/vbulletin/showthread.php?t=46678
rtcm is offline   Reply With Quote
Old 10-27-08, 03:40 PM   #6
uOpt
FreeBSD cheering section
 
uOpt's Avatar
 
Join Date: Nov 2004
Location: Boston, MA, USA
Posts: 609
Default Re: X11 server very bloated (RSS), won't shrink even when killing shmen etc, seems lo

Bug report log attached.

So, I wonder whether any of the X11 config items can have to do with this.

Going through the NVIDIA README I see:

1)

Q. Why does X use so much memory?
[...]

This isn't it, it talks about virtual memory, I have a physical memory problem (RSS) and to make things worse the mappings seem to be locked into memory. Also, this section doesn't apply because closing all applications doesn't deallocate the memory.


2)

Composite extension.

I don't have this on. Also, I think this concerns video memory only.

3)

PixmapCacheSize.

I have this off. Also, I think it talks video memory.

%%

That's it as far as pixmap options are concerned.

Any other ideas?
Attached Files
File Type: gz nvidia-bug-report.log.gz (37.4 KB, 108 views)
__________________

My Unix benchmark results
uOpt is offline   Reply With Quote
Old 10-27-08, 04:16 PM   #7
AaronP
NVIDIA Corporation
 
AaronP's Avatar
 
Join Date: Mar 2005
Posts: 2,487
Default Re: X11 server very bloated (RSS), won't shrink even when killing shmen etc, seems lo

Your X server is pretty old. I don't remember which servers are affected, but could you please try the test app attached to https://bugs.freedesktop.org/show_bug.cgi?id=10009 ? Does the problem reproduce with a newer X server?
AaronP is offline   Reply With Quote
Old 10-27-08, 04:52 PM   #8
uOpt
FreeBSD cheering section
 
uOpt's Avatar
 
Join Date: Nov 2004
Location: Boston, MA, USA
Posts: 609
Default Re: X11 server very bloated (RSS), won't shrink even when killing shmen etc, seems lo

Thanks, Aaron. I don't seem to be affected, this is `ps alx` from before and after 50,000 connects with your test program:


| F UID PID PPID PRI NI VSZ RSS WCHAN STAT TTY TIME COMMAND
< 4 0 29590 29588 20 0 2821460 1336992 - SLs+ tty7 27:36 X :0
---
> 4 0 29590 29588 20 0 2821460 1336992 - SLs+ tty7 27:46 X :0

The server "looks" old, but it is the currently maintained Debian stable server (etch). In connection.c it has the lines from the bugfix at lines 1053 and 1044:
1052: CloseDownFileDescriptor(oc);
1053: FreeOsBuffers(oc);
1054: xfree(client->osPrivate);
1055: client->osPrivate = (pointer)NULL;
__________________

My Unix benchmark results
uOpt is offline   Reply With Quote

Old 10-29-08, 04:49 PM   #9
uOpt
FreeBSD cheering section
 
uOpt's Avatar
 
Join Date: Nov 2004
Location: Boston, MA, USA
Posts: 609
Default Re: X11 server very bloated (RSS), won't shrink even when killing shmen etc, seems lo

Looking for more data, I see that another workstation I use also goes to pretty much exactly the same RSS limit and stays there, roughly 2 GB. No amount of firefox-killing gets the memory back.

That machine is running a newer X11 server (1.4.0.90 aka xorg-7.3) and is i386. It has a dual-head NVidia configuration, just as the other installation affected (which was amd64). This one has 12 GB of memory with PAE. And still, it locks down exactly at 2 GB just as the 4 GB physical memory AMD64 install does.

All I can say is that this looks very much like the NVidia driver buffering pixmaps (or some other image cache) and probably even locking the pages in memory, with what looks like a hardcoded limit of 2 GB independently of RAM installed. I need to bring this down somehow, I can't give up 2 of my 4 GB.

The other machine with about the same graphical load with ATI graphics running the Xorg DRI driver (with 3D) does not only max out much earlier in X server RSS, it also shrinks when you exit firefox. The NVidia equipped server never shrink a single byte even when killing all clients except one xterm.
__________________

My Unix benchmark results
uOpt is offline   Reply With Quote
Old 11-19-08, 12:50 PM   #10
uOpt
FreeBSD cheering section
 
uOpt's Avatar
 
Join Date: Nov 2004
Location: Boston, MA, USA
Posts: 609
Default Re: X11 server very bloated (RSS), won't shrink even when killing shmen etc, seems lo

Bump.

Am I the only one thinking this is a "big" problem?
__________________

My Unix benchmark results

Last edited by uOpt; 11-28-08 at 11:12 AM.
uOpt is offline   Reply With Quote
Old 11-28-08, 11:09 AM   #11
uOpt
FreeBSD cheering section
 
uOpt's Avatar
 
Join Date: Nov 2004
Location: Boston, MA, USA
Posts: 609
Default Re: X11 server very bloated (RSS), won't shrink even when killing shmen etc, seems lo

I have upgraded the whole platform to socket 775 with 8 GB RAM.

Now X11 with the NVidia drivers quickly grows to 4.6 GB resident(!), which means it now takes up more than 50% of my RAM. All it takes is open a couple pages in the games screenshots threads in firefox tabs.

The memory is not given back when firefox closes. The memory is hard locked into RAM, no amount of memory demands from other applications. The idiot driver doesn't only allocate 4.6 GB, it seems to mlock(2) it in. There is no GNOME or any kind of demon running that could hold the pictures from the screenshots between firefox sessions. I can kill all X11 clients and it won't shrink. Only killing the X11 server gets me my memory back.

`nvidia-settings -a GlyphCache=0` didn't change this behavior.

All the while my ATI equipped machines hover around 50-150 MB.

This pisses me off no end.
__________________

My Unix benchmark results
uOpt is offline   Reply With Quote
Old 12-01-08, 01:29 PM   #12
konst
Registered User
 
Join Date: May 2006
Posts: 57
Default Re: X11 server very bloated (RSS), won't shrink even when killing shmen etc, seems lo

Quote:
Originally Posted by uOpt View Post
I have upgraded the whole platform to socket 775 with 8 GB RAM.

Now X11 with the NVidia drivers quickly grows to 4.6 GB resident(!), which means it now takes up more than 50% of my RAM. All it takes is open a couple pages in the games screenshots threads in firefox tabs.

The memory is not given back when firefox closes. The memory is hard locked into RAM, no amount of memory demands from other applications. The idiot driver doesn't only allocate 4.6 GB, it seems to mlock(2) it in. There is no GNOME or any kind of demon running that could hold the pictures from the screenshots between firefox sessions. I can kill all X11 clients and it won't shrink. Only killing the X11 server gets me my memory back.

`nvidia-settings -a GlyphCache=0` didn't change this behavior.

All the while my ATI equipped machines hover around 50-150 MB.

This pisses me off no end.
You're not the only one. I experience this all the time and I used to think it's Firefox's fault until I read this. I should've known better. I used to read about people who say Firefox 3 has such low memory usage now and think what the hell are they taling about. Like your situation the memory on my X server is not released until I restart X. I have given up hope on this company for new purchases although I wish they would fix these issues for us current owners of Nvidia cards.
konst is offline   Reply With Quote
Reply


Thread Tools

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 On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 09:44 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.