Bug 248278 - Xorg memory usage too high on a system with small video RAM
Xorg memory usage too high on a system with small video RAM
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: xorg-x11 (Show other bugs)
7
All Linux
low Severity low
: ---
: ---
Assigned To: Adam Jackson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-07-14 23:06 EDT by dann
Modified: 2007-11-30 17:12 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-08-24 01:19:42 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Xorg.0.log (49.27 KB, text/plain)
2007-08-23 01:17 EDT, dann
no flags Details

  None (edit)
Description dann 2007-07-14 23:06:13 EDT
I just installed F7 on an older box and then run yum update. 
Looking at the output of top right after startin X11:

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND           
                     
 2249 root      15   0  150m  15m 5880 S  2.6  4.2   0:50.59 Xorg              
                      

Xorg uses too much memory. The graphics card on the system is 
S3 Inc. Savage 4 with (I think) 8MB video RAM, so all that memory is not the
framebuffer mmap.

pmap says this:

afd44000  131072       -       -       - rw-s-  mem
b7d44000     512       -       -       - rw-s-  mem
b7dc4000     256       -       -       - rw-s-  mem
b7e04000     128       -       -       - rw-s-  mem
b7e24000     980       -       -       - rw---    [ anon ]
bfe2a000      84       -       -       - rw---    [ stack ]

Version-Release number of selected component (if applicable):

I don't have F7 installed on another system, so I cannot compare the size of
Xorg on a different machine.

Please let me know if you need further details.
Comment 1 Adam Jackson 2007-07-27 17:21:49 EDT
Check what xrestop reports your clients are using.
Comment 2 dann 2007-07-27 22:54:59 EDT
(In reply to comment #1)
> Check what xrestop reports your clients are using.

Nothing interesting there:

xrestop - Display: localhost:0
          Monitoring 9 clients. XErrors: 0
          Pixmaps:      87K total, Other:      29K total, All:     117K total

res-base Wins  GCs Fnts Pxms Misc   Pxm mem  Other   Total   PID Identifier    
0800000    40   26    3    3  238       87K     10K     97K   ?   FVWM
0a00000     3   11    5    1   58        0B      6K      6K  2384 xterm
0600000     3    7    5    1   58        0B      6K      6K  2372 CONSOLE
1200000    14    8    2    0    8        0B      2K      2K   ?   Desktop
1000000     1   17    1    0    4        0B      1K      1K   ?   FvwmWinList
0c00000     1    3    1    0    2        0B      1K      1K   ?   FvwmButtons
0200000     0    1    1    0    0        0B      1K      1K   ?   <unknown>
0e00000     1    1    0    0    0        0B     48B     48B   ?   xrestop
0400000     0    1    0    0    0        0B     24B     24B   ?   <unknown>

Comment 3 Adam Jackson 2007-08-06 13:53:10 EDT
Hmm.  What does 'pmap `pidof Xorg`' report?
Comment 4 dann 2007-08-06 14:02:55 EDT
(In reply to comment #3)
> Hmm.  What does 'pmap `pidof Xorg`' report?

See that in the original bug report. It's not the whole pmap output, just the
interesting part (nothing special there). 

In case you want the full output, I can send that later today.
Comment 5 dann 2007-08-22 23:33:47 EDT
pmap output:

2222:   /usr/bin/Xorg :0 -br -audit 0 -auth /var/gdm/:0.Xauth -nolisten tcp vt7
Address   Kbytes     RSS    Anon  Locked Mode   Mapping
00110000      40       -       -       - r-x--  libdrm.so.2.3.0
0011a000       4       -       -       - rwx--  libdrm.so.2.3.0
0011b000     136       -       -       - r-x--  savage_drv.so
0013d000       8       -       -       - rwx--  savage_drv.so
0013f000     328       -       -       - r-x--  libxaa.so
00191000       8       -       -       - rwx--  libxaa.so
00203000     240       -       -       - r-x--  libfb.so
0023f000       4       -       -       - rwx--  libfb.so
002ff000       4       -       -       - r-x--  libfreetype.so
00300000       4       -       -       - rwx--  libfreetype.so
004a2000      24       -       -       - r-x--  librecord.so
004a8000       4       -       -       - rwx--  librecord.so
004df000      16       -       -       - r-x--  libdbe.so
004e3000       4       -       -       - rwx--  libdbe.so
006f9000     140       -       -       - r-x--  libint10.so
0071c000       4       -       -       - rwx--  libint10.so
0071d000       4       -       -       - rwx--    [ anon ]
007f3000     264       -       -       - r-x--  libpcidata.so
00835000     108       -       -       - rwx--  libpcidata.so
0087a000     396       -       -       - r-x--  libglx.so
008dd000      16       -       -       - rwx--  libglx.so
008e1000       4       -       -       - rwx--    [ anon ]
00922000      24       -       -       - r-x--  libvgahw.so
00928000       4       -       -       - rwx--  libvgahw.so
00aa0000     128       -       -       - r-x--  libextmod.so
00ac0000       4       -       -       - rwx--  libextmod.so
00be4000       4       -       -       - r-x--    [ anon ]
00d82000      40       -       -       - r-x--  libnss_files-2.6.so
00d8c000       4       -       -       - r-x--  libnss_files-2.6.so
00d8d000       4       -       -       - rwx--  libnss_files-2.6.so
00df2000      40       -       -       - r-x--  mouse_drv.so
00dfc000       4       -       -       - rwx--  mouse_drv.so
00e60000      12       -       -       - r-x--  kbd_drv.so
00e63000       4       -       -       - rwx--  kbd_drv.so
00eaf000       4       -       -       - r-x--  libtype1.so
00eb0000       4       -       -       - rwx--  libtype1.so
00efd000      32       -       -       - r-x--  libdri.so
00f05000       4       -       -       - rwx--  libdri.so
00f5a000      20       -       -       - r-x--  libvbe.so
00f5f000       4       -       -       - rwx--  libvbe.so
00f60000    2284       -       -       - r-x--  libGLcore.so
0119b000      76       -       -       - rwx--  libGLcore.so
011ae000      44       -       -       - rwx--    [ anon ]
08047000    1808       -       -       - r-x--  Xorg
0820b000      68       -       -       - rwx--  Xorg
0821c000      60       -       -       - rwx--    [ anon ]
08842000    2444       -       -       - rwx--    [ anon ]
446c2000     108       -       -       - r-x--  ld-2.6.so
446dd000       4       -       -       - r-x--  ld-2.6.so
446de000       4       -       -       - rwx--  ld-2.6.so
446e1000    1336       -       -       - r-x--  libc-2.6.so
4482f000       8       -       -       - r-x--  libc-2.6.so
44831000       4       -       -       - rwx--  libc-2.6.so
44832000      12       -       -       - rwx--    [ anon ]
44837000     156       -       -       - r-x--  libm-2.6.so
4485e000       4       -       -       - r-x--  libm-2.6.so
4485f000       4       -       -       - rwx--  libm-2.6.so
44862000      12       -       -       - r-x--  libdl-2.6.so
44865000       4       -       -       - r-x--  libdl-2.6.so
44866000       4       -       -       - rwx--  libdl-2.6.so
44869000      72       -       -       - r-x--  libz.so.1.2.3
4487b000       4       -       -       - rwx--  libz.so.1.2.3
4487e000      20       -       -       - r-x--  libfontenc.so.1.0.0
44883000       4       -       -       - rwx--  libfontenc.so.1.0.0
44886000     376       -       -       - r-x--  libXfont.so.1.4.1
448e4000      24       -       -       - rwx--  libXfont.so.1.4.1
448ea000      28       -       -       - rwx--    [ anon ]
44a23000       8       -       -       - r-x--  libXau.so.6.0.0
44a25000       4       -       -       - rwx--  libXau.so.6.0.0
44a28000      20       -       -       - r-x--  libXdmcp.so.6.0.0
44a2d000       4       -       -       - rwx--  libXdmcp.so.6.0.0
44ac5000     536       -       -       - r-x--  libfreetype.so.6.3.15
44b4b000      16       -       -       - rwx--  libfreetype.so.6.3.15
45147000      88       -       -       - r-x--  libselinux.so.1
4515d000       8       -       -       - rwx--  libselinux.so.1
45161000     236       -       -       - r-x--  libsepol.so.1
4519c000       4       -       -       - rwx--  libsepol.so.1
4519d000      40       -       -       - rwx--    [ anon ]
4569f000      44       -       -       - r-x--  libgcc_s-4.1.2-20070503.so.1
456aa000       4       -       -       - rwx--  libgcc_s-4.1.2-20070503.so.1
af4a7000     772       -       -       - rw-s-    [ shmid=0x26d0 ]
af568000    2052       -       -       - rw---    [ anon ]
af769000     772       -       -       - rw-s-    [ shmid=0x26cf ]
af82a000    2052       -       -       - rw---    [ anon ]
afa2b000     772       -       -       - rw-s-    [ shmid=0x26ce ]
afaec000    2088       -       -       - rw---    [ anon ]
afdae000  131072       -       -       - rw-s-  mem
b7dae000     512       -       -       - rw-s-  mem
b7e2e000     256       -       -       - rw-s-  mem
b7e6e000     128       -       -       - rw-s-  mem
b7e8e000     980       -       -       - rw---    [ anon ]
bfa78000      88       -       -       - rw---    [ stack ]
-------- ------- ------- ------- -------
total kB  153628       -       -       -



Comment 6 Dave Airlie 2007-08-22 23:46:04 EDT
For some reason its doing a 128MB /dev/mem mapping can you attach an Xorg.0.log?
Comment 7 dann 2007-08-23 01:17:07 EDT
Created attachment 166812 [details]
Xorg.0.log

Xorg.0.log as requested.
Comment 8 Adam Jackson 2007-08-23 15:19:58 EDT
Hmm.  There's a 128M aperture of... something... at 0x48000000, according to the
PCI scan, but I can't tell what it belongs to.  Can you attach the contents of
/proc/iomem please?
Comment 9 dann 2007-08-23 23:00:46 EDT
cat /proc/iomem 
00000000-0009fbff : System RAM
  00000000-00000000 : Crash kernel
0009fc00-0009ffff : reserved
000a0000-000bffff : Video RAM area
000c0000-000cffff : Video ROM
000f0000-000fffff : System ROM
00100000-17ffffff : System RAM
  00400000-00604bc1 : Kernel code
  00604bc2-00715cb3 : Kernel data
20000000-2001ffff : 0000:00:06.0
40000000-400fffff : PCI Bus #01
  40000000-4007ffff : 0000:01:00.0
  40080000-4008ffff : 0000:01:00.0
40100000-4010ffff : 0000:00:03.0
40200000-40203fff : 0000:00:0c.0
40300000-403007ff : 0000:00:0c.0
  40300000-403007ff : fw_ohci
40400000-404003ff : 0000:00:06.0
  40400000-404003ff : tulip
48000000-4fffffff : PCI Bus #01
  48000000-4fffffff : 0000:01:00.0
50000000-53ffffff : 0000:00:00.0
fffe0000-ffffffff : reserved

/sbin/lspci
00:00.0 Host bridge: VIA Technologies, Inc. VT82C693A/694x [Apollo PRO133x] (rev 22)
00:01.0 PCI bridge: VIA Technologies, Inc. VT82C598/694x [Apollo MVP3/Pro133x AGP]
00:03.0 Communication controller: Conexant HCF 56k Data/Fax Modem (rev 08)
00:06.0 Ethernet controller: ADMtek NC100 Network Everywhere Fast Ethernet
10/100 (rev 11)
00:0a.0 Multimedia audio controller: ESS Technology ES1969 Solo-1 Audiodrive
(rev 01)
00:0c.0 FireWire (IEEE 1394): Texas Instruments TSB12LV23 IEEE-1394 Controller
00:14.0 ISA bridge: VIA Technologies, Inc. VT82C686 [Apollo Super South] (rev 13)
00:14.1 IDE interface: VIA Technologies, Inc.
VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 06)
00:14.2 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller
(rev 02)
00:14.3 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller
(rev 02)
00:14.4 Bridge: VIA Technologies, Inc. VT82C686 [Apollo Super ACPI] (rev 10)
01:00.0 VGA compatible controller: S3 Inc. Savage 4 (rev 02)
Comment 10 Dave Airlie 2007-08-24 00:05:26 EDT
so its just the AGP aperture, nothing to worry about as it isn't backed by
actual memory.
Comment 11 dann 2007-08-24 00:12:30 EDT
(In reply to comment #10)
> so its just the AGP aperture, nothing to worry about as it isn't backed by
> actual memory.

Aren't there page table entries created for that area? Doesn't that add to the
kernel memory usage?
Comment 12 Dave Airlie 2007-08-24 01:19:42 EDT
I don't think there should be anything allocated by the kernel to back that area
until something is actually page faulted in or put there so I don't think there
should be page table entries covering it, just a vma for the mapping from X, so
I'm going to go with no, btw  if you can decrease the AGP aperture in your BIOS
you might try that and compare the memory usage somehow, but this isn't
something we are really going to go fixing. If it is wasting memory it is
wasting a small amount of it relative to the amount of work needed to fix it in
the drivers....

Note You need to log in before you can comment on or make changes to this bug.