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

Newegg Daily Deals

Reply
 
Thread Tools
Old 12-30-08, 12:32 PM   #25
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

OK.

Is it dynamically loaded? Doesn't seem to be linked in.

Code:
usr/lib(wavehh)177% ldd `which Xorg`
        libdl.so.2 => /lib/libdl.so.2 (0x00007fbaf69f5000)
        libXfont.so.1 => /usr/lib/libXfont.so.1 (0x00007fbaf686d000)
        libXau.so.6 => /usr/lib/libXau.so.6 (0x00007fbaf676b000)
        libfontenc.so.1 => /usr/lib/libfontenc.so.1 (0x00007fbaf6664000)
        libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007fbaf655f000)
        libz.so.1 => /usr/lib/libz.so.1 (0x00007fbaf6449000)
        libm.so.6 => /lib/libm.so.6 (0x00007fbaf62c7000)
        libc.so.6 => /lib/libc.so.6 (0x00007fbaf608a000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fbaf6af8000)
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x00007fbaf5f12000)


xorg/modules(wavehh)185% ldd /usr/lib/xorg/modules/*.so | grep -i pixman
xorg/modules(wavehh)186%
Xorg.0.log doesn't have a message about loading it either.
__________________

My Unix benchmark results
uOpt is offline   Reply With Quote
Old 12-30-08, 12:35 PM   #26
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

OK, so here's something I can do since there's some interest today.

I have an unused machine that I want to change video cards in anyway.

If somebody can tell me that un-installing the NVidia binary drivers properly reverts all the libGL.so and everything else so that I don't hose an OS install I can plug in an NVidia card and an ATI card and directly compare memory usage after loading a couple game screenshot pages in firefox.

Anybody knows for sure whether the NVidia drivers clean up after themselves?
__________________

My Unix benchmark results
uOpt is offline   Reply With Quote
Old 12-30-08, 12:57 PM   #27
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

Your server is too old. libpixman was once code that was in a directory of the server source tree. But it was separated to be used by cairo (thus what I said above isn't technically true, i.e. pixman is also used client side but that use surely isn't going to create memory leaks on the server process).

Actually your server being old is quite probably your problem, the first thing I would try would be a new, modern OS with a less than 1 year old X server.

About your last question, even if the nvidia installer doesn't clean up after itself you can alway uninstall it and reinstall whatever package installed your original libGL.so (probably a mesa package). That should leave you with a "clean" system.

Last edited by rtcm; 12-30-08 at 12:59 PM. Reason: typos
rtcm is offline   Reply With Quote
Old 12-30-08, 04:39 PM   #28
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

Quote:
Originally Posted by rtcm View Post
Your server is too old. libpixman was once code that was in a directory of the server source tree. But it was separated to be used by cairo (thus what I said above isn't technically true, i.e. pixman is also used client side but that use surely isn't going to create memory leaks on the server process).
I don't think this is a memory leak as such. If so, why would it stop, every time, precisely, at 1/2 of my RAM? It even showed that behavior when I upgraded from 4 to 8 GB, suddenly the limit that it maxed out was bumped from 2 to 4 GB, on the same day. It quickly rises to 1/2 RAM and then stays there. What a coincidence.

Why isn't the X11 server ever driven into a crash if it's a memory leak? Why does it stop to grow, very suddenly?

Why is the memory (apparently) locked, why isn't is pageable?

I don't know what that means to you, but to me it means we are dealing with a deliberate cache of some kind here, not a memory leak.

Quote:
Originally Posted by rtcm View Post
Actually your server being old is quite probably your problem, the first thing I would try would be a new, modern OS with a less than 1 year old X server.
For the 393933th time, I have the same X server version in that machine with ATI video chip and DRI/Xorg 3D drivers and it does not show this behavior.

Quote:
Originally Posted by rtcm View Post
About your last question, even if the nvidia installer doesn't clean up after itself you can alway uninstall it and reinstall whatever package installed your original libGL.so (probably a mesa package). That should leave you with a "clean" system.
Yeah except I don't know what else gets nuked. We are not talking just one library here. If it wasn't for that, I am kind of smart enough to, gasp, even copy libGL.so.* and restore it, thank you.

%%

Why don't we start by actually looking at the source. Can you tell me which pixman versions exactly are supposed to have the leak and where it got fixed? I'll then look it up in the sources for this X11 server.

This is not some random stale thing that I'm running here. It is an up-to-date Debian-stable. Normally they backport fixes to problems like these.
__________________

My Unix benchmark results
uOpt is offline   Reply With Quote
Old 12-30-08, 05:44 PM   #29
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

Almost forgot, my Ubuntu LTS 32 bit machine shows the same problem, with X.Org X Server 1.4.0.90.

This X11 server is linked against libpixman-1.so.0.10.0 in an up-to-date Ubuntu 8.04 LTS.
__________________

My Unix benchmark results
uOpt is offline   Reply With Quote
Old 07-06-09, 03:08 PM   #30
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 came across this when I hacked up the 177 drivers for newer kernels:
Code:
RM_STATUS NV_API_CALL os_set_mlock_capability()
{
    /*
     * The NVIDIA driver may require the ability to lock down user
     * memory with the mlock(2) system call, which is normally only
     * available to privileged processes. The code below enables
     * mlock(2) for the current process and adjusts the lock limit
     * to 'unlimited'.
     *
     * If you prefer to manually grant the necessary capability and
     * adjust the resource limit, disable the lines below.
     */
So this allows a non-root userlevel process to mlock memory than it was supposed to be able to mlock, according to the comment.

I cannot check how exactly this is called since the calls to this function are in parts of the driver that doesn't come with source code, but what can I say. If that isn't a bad idea and can lead to the problems I have seen I don't know what is.
__________________

My Unix benchmark results
uOpt is offline   Reply With Quote
Old 07-06-09, 03:33 PM   #31
zander
NVIDIA Corporation
 
zander's Avatar
 
Join Date: Aug 2002
Posts: 3,740
Default Re: X11 server very bloated (RSS), won't shrink even when killing shmen etc, seems lo

@uOpt: that particular function wasn't used by the X driver and tied to a few specific driver paths. It no longer exists in current driver releases.
zander is offline   Reply With Quote
Old 07-06-09, 04:18 PM   #32
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

Hmmm, OK.

But did something else related go away around that timeframe? I stopped seeing the problem sometime in between, e.g. right now the X11 server is at 339M VIRT and 148M RES. It's pretty fresh but it has seen some web usage. These numbers are also very compatible with what I have seen with ATI and DRI/Xorg all along for similar usage.
__________________

My Unix benchmark results
uOpt 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 07:54 PM.


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