LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 03-07-2013, 10:35 PM   #1
HikoHaieto
LQ Newbie
 
Registered: Mar 2013
Posts: 3

Rep: Reputation: Disabled
Xorg using extremely high amounts of memory (memory leaks?)


After my computer's performance recently slowed to a crawl, I checked the output of free to find a drastic increase in memory usage:
Code:
             total       used       free     shared    buffers     cached
Mem:         16033      15798        234          0         23        112
-/+ buffers/cache:      15662        370
Swap:        16383      13187       3196
Since I wasn't running much that should be that memory intensive aside from firefox, I used ps to find the most memory intensive processes and discovered that Xorg was surprisingly using over 22 gigs of memory!
Code:
$ ps aux --sort rss | tail -1
root      1940 12.0 66.0 22723076 10846748 tty7 Ss+ Feb08 4717:13 /usr/bin/Xorg :0 -br -verbose -audit 0 -novtswitch -auth /var/run/gdm3/auth-for-Debian-gdm-kItIIs/database -nolisten tcp vt7
Furthermore, Xorg's /proc/pid/smaps info shows most of that memory being in the heap:
Code:
00992000-562329000 rw-p 00000000 00:00 0                                 [heap]
Size:           22570588 kB
Rss:            10833672 kB
Pss:            10833672 kB
Shared_Clean:          0 kB
Shared_Dirty:          0 kB
Private_Clean:         0 kB
Private_Dirty:  10833672 kB
Referenced:      5128364 kB
Anonymous:      10833672 kB
AnonHugePages:         0 kB
Swap:           11736648 kB
KernelPageSize:        4 kB
MMUPageSize:           4 kB
Locked:                0 kB
However, not much memory usage seems to show up in xrestop aside from firefox, which is an order of magnitude smaller than the heap size, and is mostly in pixmaps. In fact, it is showing the total memory usage across all monitored clients as being only slightly higher than firefox's usage, at ~1.7 gigs:
Code:
xrestop - Display: :0.0
          Monitoring 36 clients. XErrors: 0
          Pixmaps: 1698868K total, Other:     300K total, All: 1699169K total

res-base Wins  GCs Fnts Pxms Misc   Pxm mem  Other   Total   PID Identifier    
3200000   375   54    1 2951 3710   1674984K     98K 1675082K  8886 Problem loading page - Mozilla Firefox
3400000    20   28    1   18   73     6788K      3K   6792K  4481 <unknown>
1600000     9   41    1   13   40     5056K      3K   5059K  2327 x-nautilus-desktop
0000000     1    0    2    0  110     4800K      4K   4804K   ?   <unknown>
3600000     0    0    0    1    0     4800K      0B   4800K   ?   <unknown>
3c00000    23   28    1    7   65     1673K      3K   1677K 20161 <unknown>
1200000    49   32    1   19   87      256K      4K    260K  2430 hiko@votocon: ~/Desktop
4a00000     9   42    1   19   61      256K      3K    259K 24958 *Unsaved Document 3 - gedit
1400000    48   75    1   23  149      226K      7K    234K  2321 Panel
1000000    66   30    2   11 5380       14B    130K    130K  2314 metacity
0c00000     7   54    1   19  306       11K      9K     21K  2310 gnome-settings-daemon
2a00000     7   54    0    5   17        9K      1K     10K  2343 update-notifier
3800000    13   67    1   28   67        4K      4K      8K 29938 Pidgin
2800000     3   27    0    1  234        4B      6K      6K  2340 gnome-screensaver
2200000    14   41    0   19   49        1K      2K      4K  2351 Volume Applet
4400000     3   29    1   17   44       20B      2K      2K 22328 gksu
4600000     5   38    1    5   21        8B      2K      2K 22346
2600000     2    5    1   15   43       18B      2K      2K  2341 polkit-gnome-authentication-agent-1
4e00000     2    3    0    4   88        7B      2K      2K 19146 notification-daemon
2c00000     6   56    0    8   26       14B      2K      2K  2344 NetworkManager Applet
0e00000     4   28    0    2   20        8B      1K      1K  2306 gnome-power-manager
0200000     0    1    1    0    0        0B      1K      1K   ?   <unknown>
3000000     2    2    0    1    9        4B    312B    316B  2336 system-config-printer-applet
3a00000     1    3    0    0    9        0B    312B    312B 23459 MPlayer
0600000     2    3    0    1    7        4B    288B    292B  2248 seahorse-agent
0a00000     2    1    0    0    8        0B    264B    264B  2248 x-session-manager
2400000     2    1    0    1    7        4B    240B    244B  2339 kerneloops-applet
1e00000     2    1    0    1    7        4B    240B    244B  2334 Bluetooth Applet
1c00000     2    1    0    1    7        4B    240B    244B  2338 gdu-notification-daemon
2e00000     2    1    0    0    6        0B    216B    216B  2342 evolution-alarm-notify
1800000     2    1    0    0    6        0B    216B    216B  2155 polkit-gnome-authentication-agent-1
3e00000     1    1    0    0    0        0B     48B     48B   ?   xrestop
0400000     1    1    0    0    0        0B     48B     48B   ?   <unknown>
2000000     0    1    0    0    0        0B     24B     24B   ?   <unknown>
1a00000     0    1    0    0    0        0B     24B     24B   ?   <unknown>
0800000     0    1    0    0    0        0B     24B     24B   ?   <unknown>
I also didn't notice anything that looked like it might be responsible in my .xsession-errors file. I'm not quite sure how to continue debugging this, though I do feel pretty confident that I should not ever have Xorg consuming nearly this much memory - I'm almost up to using all 32 gigs of available memory after having closed almost everything but firefox! Does anybody know what might be going wrong and how to prevent it from happening again? Output of Xorg -version:
Code:
X.Org X Server 1.7.7
Release Date: 2010-05-04
X Protocol Version 11, Revision 0
Build Operating System: Linux 3.0.0-1-amd64 x86_64 Debian
Current Operating System: Linux votocon 3.2.0-0.bpo.4-amd64 #1 SMP Debian 3.2.35-2~bpo60+1 x86_64
Kernel command line: BOOT_IMAGE=/vmlinuz-3.2.0-0.bpo.4-amd64 root=UUID=ad6cd88c-f05c-4a2a-9a38-be793046f51a ro quiet
Build Date: 29 October 2011  06:58:14PM
xorg-server 2:1.7.7-14 (Julien Cristau <jcristau@debian.org>) 
Current version of pixman: 0.16.4
	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
Also, this is the contents of my xorg.conf file:
Code:
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 310.19  (buildmeister@swio-display-x86-rhel47-08.nvidia.com)  Thu Nov  8 02:09:12 PST 2012

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    HorizSync       28.0 - 33.0
    VertRefresh     43.0 - 72.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection
 
Old 04-06-2013, 09:46 PM   #2
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Hi:

Quote:
discovered that Xorg was surprisingly using over 22 gigs of memory!
That's a little crazy-

I'm not sure what is going on. We have members here that are very good with hardware and memory issue's.

You could run Memtest and see if the diagnostic utility finds something wrong.
http://www.memtest.org/

http://blog.thewebsitepeople.org/201...eak-detection/
http://www.cprogramming.com/debugging/valgrind.html
 
Old 04-07-2013, 02:04 AM   #3
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
I think it is Firefox using that RAM not Xorg.
 
  


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
Extremely sluggish system with newest kernels under high memory load Einars Linux - Kernel 5 03-11-2012 04:36 AM
high memory and cpu usage when copying large amounts, KSWAPD0 ouigkmy Linux - General 5 08-02-2011 06:32 AM
Memory leaks.. *** glibc detected *** ./SuffixTree: malloc(): memory corruption: 0x00 evansash Programming 12 03-21-2011 01:17 PM
why dmesg | grep Memory gives two different physical memory amounts? jstitch Linux - Hardware 1 10-20-2010 11:52 PM
Help!?! RH 8 Memory Mapping -High Memory-Virtural Memory issues.. Merlin53 Linux - Hardware 2 06-18-2003 04:48 PM

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

All times are GMT -5. The time now is 11:29 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