Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

X eats all my ram, and things die horribly.

  • 14-02-2004 4:36pm
    #1
    Registered Users, Registered Users 2 Posts: 1,842 ✭✭✭


    Linux 2.4.23, redhat 9, 1GB ram, p4 2.5g, 2gb swap.

    I can't keep an uptime of more than three days. I had almost four until a few minutes ago. X was using 80% of my RAM and then I started swapping heavily on any sort of activity, which brought the system to it's knees, and it eventually froze.

    I've noticed how my ram usage increases slowly the longer it's up, but it never seems to release it again.

    Whats the deal?


Comments

  • Registered Users, Registered Users 2 Posts: 811 ✭✭✭Rambo


    TO SAVE MEMORY::
    Turn off all services you do not use maybe sendmail or apache samba

    It is normal for RH 9 to use up memory the ways it does
    remember linux works best in memory makes it faster instead of hard disk access

    FREEZING::
    If the linux box froze it is most likely a driver problem.
    one of my linux box froze because it was using a wrong driver for network card.

    check the log files /var/log/messages
    do a lsmod and check that you using the correct drivers

    modinfo <name of mod> for driver info


  • Registered Users, Registered Users 2 Posts: 1,842 ✭✭✭phaxx


    Em, no, none of the above. Thats a little basic... :)

    Ta though.


  • Registered Users, Registered Users 2 Posts: 2,755 ✭✭✭niallb


    Have you tested it with any other kernels?
    Build a fresh kernel from 2.4.24 sources,
    or at least try any older kernels you might have on disk.
    Have you any other exotic hardware?
    Do you have a VIA chipset ( via network card in particular?)

    You feel the problem is caused by X - can you do without X for a few days :-)
    What graphics card are you using? What module?
    Try turning off all hardware acceleration for a few days
    and using just a VESA or a FrameBuffer X driver.
    If this changes things, maybe take a closer look at your
    graphics card setup, see if there's a newer driver available.
    In the case of nVidia, I upgraded one machine's driver to a new version
    and display stopped working reliably until I reverted.
    That said, nvidia have since brought out a newer version that works for me without problems (release 5328 with a GeForce 2 MX 400 ).

    I agree with rambo that this sounds like a possible driver problem.
    Any details from logfiles just before the system freezes would be useful.

    NiallB


  • Closed Accounts Posts: 117 ✭✭Baud


    Check how much is in use by each program..

    there's a program at http://www.freedesktop.org/Software/xrestop
    which is quite handy for figuring it out.

    I find mozilla/firebird/galeon/other gecko browsers
    are awful for leaking memory.

    L.


  • Registered Users, Registered Users 2 Posts: 1,842 ✭✭✭phaxx


    xrestop - Display: localhost:0
              Monitoring 23 clients. XErrors: 0
              Pixmaps:  944668K total, Other:     176K total, All:  944845K total
    
    res-base Wins  GCs Fnts Pxms Misc   Pxm mem  Other   Total   PID Identifier    
    0a00000   241   18    1 15417  579   897714K     20K 897735K   ?   <unknown>
    2600000    91   76   84 1169   49    21059K     89K  21148K   ?   firefox-bin
    0400000     0    2    1    3   41    18000K	 2K  18002K   ?   <unknown>
    2800000     4   36    3   97    5     4280K	 4K   4284K   ?   XMMS Equalizer
    0600000    32   44    3  268   58     1382K	 6K   1388K  1701 gkrellm
    1c00000    26   44    3  220   56     1190K	 5K   1196K  1764 gkrellm
    0c00000    97   63    6 1397   19      928K     10K    939K   ?   multi-gnome-terminal
    2400000    23   39    1   96  113	68K	 5K     74K   580 gaim
    2200000     8   40    3   40   26	42K	 4K     47K  1718 klipper
    0800000     1    2    1    0  530        0B     13K     13K   ?   screensaver
    2a00000     0    5    5    0   12        0B	 5K	 5K   ?   <unknown>
    0200000     0    1    1    0   38        0B	 1K	 1K   ?   <unknown>
    1e00000     1    1    1    0    4        0B	 1K	 1K  1778 kded
    1a00000     0    2    1    0    2        0B	 1K	 1K   ?   <unknown>
    1800000     0    2    1    0    2        0B	 1K	 1K   ?   <unknown>
    1600000     0    2    1    0    2        0B	 1K	 1K   ?   <unknown>
    1400000     0    2    1    0    2        0B	 1K	 1K   ?   <unknown>
    1200000     0    2    1    0    2        0B	 1K	 1K   ?   <unknown>
    1000000     0    2    1    0    2        0B	 1K	 1K   ?   <unknown>
    2c00000     1    1    0    0    0        0B     48B     48B   ?   xrestop
    2000000     1    1    0    0    0        0B     48B     48B   ?   <unknown>
    0e00000     1    1    0    0    0        0B     48B     48B   ?   <unknown>
    2e00000     1    0    0    0    0        0B     24B     24B   ?   <unknown>
    
    

    From top:
    86 processes: 83 sleeping, 2 running, 1 zombie, 0 stopped
    CPU states:   0.7% user   1.1% system   0.0% nice   0.0% iowait  98.1% idle
    Mem:  1032340k av,  956928k used,   75412k free,       0k shrd,  133872k buff
           290392k active,             632804k inactive
    Swap: 1542200k av,  416976k used, 1125224k free                  130872k cached
    
      PID USER     PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME CPU COMMAND
     1635 root      19   0 1020M 509M  7208 R     0.7 50.5  37:16   0 X
     1547 root       9   0 72208  70M  1196 S     0.0  6.9   0:00   0 winbindd
     1718 phaxx      9   0 30924  25M  9104 S     0.0  2.5   0:02   0 klipper
     1699 phaxx      9   0 13804  13M  4776 S     0.0  1.3   3:01   0 multi-gnome-ter
      580 phaxx      9   0 12048  11M  8144 S     0.0  1.1   0:30   0 gaim
    


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 1,842 ✭✭✭phaxx


    So whats that using over 800mb?

    Uptime is 2d 18:30 at the moment, so I susect I'll be rebooting this evening before things get hairy.

    I can probably live without the NVidia drivers for a while, but it's a bit of a pain in the ass...

    X is definately the problem, and while I could live in console for a few days, it wouldn't be the most pleasant computing experience :P

    I'm not using the latest NV drivers, DPMS is broken in those (for my setup, anyway) so I have to use the previous release. (4xxx)

    There's nothing interesting in any logs I've seen about it, it's just grinding slowly to a halt...

    The hardware is a Dell Inspiron 8500, so some hardware is undoubtedly "exotic", but everything I need works perfectly.

    I believe the chipset is an intel: agpgart: Detected Intel i845 chipset

    I have the rh9 stock kernel there, but thats unusable :) Have 2.6.0 here too, so I suppose I can give that a whirl, but it's a fair bit of work setting everything up again and making it all play nicely together, when I'm quite happy as it is...

    I suppose I'll grab 2.4.24?

    Any other ideas?


  • Registered Users, Registered Users 2 Posts: 2,755 ✭✭✭niallb


    What's that zombie process?
    86 processes: 83 sleeping, 2 running, 1 zombie, 0 stopped
    Might be nothing, but should be checked first.
    Run top and look for the Z, or ps aux and search for defunct. It might be relevant.

    How much memory is on the card?
    That may be included in the total.
    In addition AGP may be artificially adding allocations.

    Have you tried the AGP alternatives?
    Option "NvAGP" "1" in /etc/X11/XF86Config-4

    Does swapping between the nv and nvidia drivers make any difference.

    Pixmaps and fonts in memory also add up.
    Try moving to a lighter window manager for at least a few days.
    I'd recommend ratpoison, well maybe not if you don't like console :-)
    Try either xfce or icewm for a few days to see if your problem lessens.

    If you have a lot of true type fonts,
    try doing without the font server for a few days.
    If your only fontpath entry is for the font server,
    copy in some of the stanza from the font servers config file.

    This might give you a clue: cat /proc/`ps aux | grep \/[X]\ | awk ' { print $2 } '`/maps
    (paste the bold text, it might even work)

    All it does is find the pid of your X server
    and cat /proc/$pid-of-X/maps

    This may give you more information than "unknown".

    Good luck,
    NiallB


  • Registered Users, Registered Users 2 Posts: 1,842 ✭✭✭phaxx


     1699 phaxx      8   0     0    0     0 Z     0.0  0.0   3:07   0 multi-gnome-ter <defunct>
    

    1024 mb ram, 64mb on the graphics card (nv gf 4 ti 4200 go)

    I'll move back to the nv driver now, I'm not gaming very much as it is.

    I'm using Fluxbox, so the window manager isn't a problem :)

    I do have a few more fonts installed, but I can't live without those, I may as well be in a console because it looks so nasty.

    From /proc/.../maps (full thing)
    48bcf000-48bea000 rw-s 00000000 00:04 77168644   /SYSV00000000 (deleted)
    

    I'm guessing the fifth field there is the size. There are quite a few of those entries...

    I've dropped the NvAGP option in, so I'll be running with that next time.


  • Closed Accounts Posts: 5,564 ✭✭✭Typedef


    You should just be able to restart X, to release the used up RAM, before starting the X server again, instead of rebooting.


  • Registered Users, Registered Users 2 Posts: 2,755 ✭✭✭niallb


    Restarting X should indeed be all that's needed.
    How often do you login/logout?
    A good old CTRL-ALT-BackSpace every now and then is what you need.
    If it doesn't seem to work, try restarting your display manager.

    NiallB


  • Advertisement
  • Closed Accounts Posts: 484 ✭✭ssh


    Cept of course if the driver is leaking the memory. If the kernel or something equally privileged is the one doing the leak, that memory can't be allocated until the system is rebooted.

    afaik anyway.


  • Registered Users, Registered Users 2 Posts: 811 ✭✭✭Rambo


    X looks like to be your problem I would Format ,reinstall
    RH9 with standed Kernel from cd and see how that goes
    remember to back up your own files

    I think you may have some wrong version of .so files or lib files which has corrupted you x


  • Registered Users, Registered Users 2 Posts: 1,842 ✭✭✭phaxx


    Originally posted by niallb
    How often do you login/logout?

    As little as possible, only when I'm moving the laptop and it won't be used for more than 30 minutes or something, or if it's going in my bag.

    It's not an urgent problem, and I'm quite curious, so I'll just take it a few days at a time and try different things until it goes away...

    Rambo, thanks for your suggestions, but I'm trying to avoid that. Besides, the stock kernel is unusable for anything but compiling a different kernel :) - the IDE drivers in 2.4.20-8 are dodgy and chug horribly on most activity.


  • Registered Users, Registered Users 2 Posts: 2,755 ✭✭✭niallb


    Originally posted by phaxx

    It's not an urgent problem, and I'm quite curious, so I'll just take it a few days at a time and try different things until it goes away...

    Keep us posted, and hope it goes well for you.
    You could try booting to runlevel 3 - just console
    for now, and starting X using startx instead
    of using a display manager.
    At least that way you know you're exiting X once a day or so.

    Good luck with it,
    NiallB


  • Registered Users, Registered Users 2 Posts: 3,284 ✭✭✭dubhthach


    It's amazing when you compare XFree86 to comercial X servers the difference in memory usage etc.
    I know on my Irix box Xsgi uses very little memory, then again it helps that i've got a gig of RAM in it :D
    Still compared to XFree86 under Linux i havn't seen XSGI use more then 20MB's of RAM


  • Registered Users, Registered Users 2 Posts: 1,419 ✭✭✭nadir


    wow, that really is an interesting one phaxx, definately x alright. I wonder maybe if you have a very small swap, have a look at .xsessionerrors too and maybe even kernel.log .But yea keep posted, there should definately be a solution to this one :)


  • Registered Users, Registered Users 2 Posts: 3,284 ✭✭✭dubhthach


    Well 2gb's of RAM should be fine for him tbh, it's recomended that you have at least twice the swap space (Compared to RAM)
    On Irix it automatically generates a swap partition 2 and half times bigger then the ram you have installed.


  • Registered Users, Registered Users 2 Posts: 1,842 ✭✭✭phaxx


    1gb ram, 2gb swap.

    Anyway, I used the "nv" driver for a few days and saw the same ram usage, so I'm back on the nvidia binary driver.

    Not sure what I'm trying next - finding a replacement for each of my applications and using that for a few days?


  • Registered Users, Registered Users 2 Posts: 2,755 ✭✭✭niallb


    Hi,

    did you leave X running all the time while you were using the 'nv' module as well?

    What version of fluxbox are you using?
    Is it 0.9.7 by any chance?

    Try using a different window manager for a few days.
    If the problem disappears, upgrade fluxbox and see if that gets it.
    If not, as a next step I'd go for restarting X once a day and see what happens.

    On the bright side, looks like you can keep your nvidia module!

    Good luck,
    NiallB


  • Registered Users, Registered Users 2 Posts: 1,842 ✭✭✭phaxx


    Yup, X is always running, ran with the nv module for a few days and found the ram usage at ~700.
    Flux is 0.9.7, pulled it out of CVS.

    /me goes to get WindowMaker

    Thanks everyone, particularly niall, appreciate it.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 2,755 ✭✭✭niallb


    fluxbox is the problem.
    Unfortunately you checked out a bogey release.
    Upgrade to latest stable and you should be fine.
    http://fluxbox.sourceforge.net/

    Development release v0.9.8! / 2004.01.15-13:55 CET
    A new development release is available.
    This is primarily due to a fix for a nasty memory leak in 0.9.7 (uses up lots of X memory).
    A new feature is the transparent toolbar,
    along with a number of other bugfixes.

    NiallB


  • Registered Users, Registered Users 2 Posts: 1,842 ✭✭✭phaxx


    Heh, I think you meant the latest devel :) Latest stable is, um, quite old.

    Anyway, running with 0.9.8 now, thanks for all your help!


Advertisement