FS#2176 - memory leak on arch linux?
Attached to Project:
Arch Linux
Opened by Eugenia Loli-Queru (Eugenia) - Thursday, 10 February 2005, 21:18 GMT
Opened by Eugenia Loli-Queru (Eugenia) - Thursday, 10 February 2005, 21:18 GMT
|
Details
There's seems to be a memory leak on Arch Linux on one of my
machines.
Gnome-system-monitor starts up consuming 180 MBs of RAM on an empty gnome desktop (even if other distros have an empty gnome for 110 MB, even NLD9 uses less than 140 MBs). Leaving the system running for a while, the memory usage goes up to 480 MBs (adds about 200 kb/sec). Sure, the point of unix is to use as much memory as possible, but I believe that it goes so high up because of a leak, not because of an architecture desicion. I don't know what app or apps are leaking but it doesn't look so good, because the memory was persisting being so high up even after killed X and its children and got to console. |
This task depends upon
Closed by Jan de Groot (JGC)
Friday, 11 February 2005, 12:17 GMT
Reason for closing: Not a bug
Additional comments about closing: this is normal linux 2.6 memory usage.
Friday, 11 February 2005, 12:17 GMT
Reason for closing: Not a bug
Additional comments about closing: this is normal linux 2.6 memory usage.
syslog-ng hotplug pcmcia network portmap fam netfs crond dbus mono hal alsamixer
Here are the kernel modules loaded:
Module Size Used by
radeon 136340 2
pcmcia 23300 2
ohci_hcd 23560 0
parport_pc 28996 0
parport 38600 1 parport_pc
eth1394 21640 0
pcspkr 4044 0
natsemi 29024 0
ohci1394 35716 0
ieee1394 111416 2 eth1394,ohci1394
yenta_socket 22400 0
pcmcia_core 60992 2 pcmcia,yenta_socket
snd_intel8x0m 19524 3
snd_intel8x0 34336 3
snd_ac97_codec 78176 2 snd_intel8x0m,snd_intel8x0
i2c_i801 8972 0
i2c_core 23296 1 i2c_i801
ehci_hcd 35332 0
usb_storage 71232 0
uhci_hcd 34576 0
pci_hotplug 34748 0
joydev 10560 0
tsdev 8128 0
evdev 9984 1
snd_pcm_oss 56612 0
snd_pcm 101252 4 snd_intel8x0m,snd_intel8x0,snd_ac97_codec,snd_pc m_oss
snd_timer 27140 1 snd_pcm
snd_page_alloc 10244 3 snd_intel8x0m,snd_intel8x0,snd_pcm
snd_mixer_oss 21120 5 snd_pcm_oss
snd 59108 11 snd_intel8x0m,snd_intel8x0,snd_ac97_codec,snd_p cm_oss,snd_pcm,snd_timer,snd_mixer_oss
soundcore 10848 5 snd
sn9c102 62748 0
usbcore 125560 6 ohci_hcd,ehci_hcd,usb_storage,uhci_hcd,sn9c102
videodev 10496 1 sn9c102
prism54 59656 0
rtc 13128 0
However, I think I identified the problem in the gnome stuff. Apparently, if I do a reboot and get to command line, it only uses about 60 MBs of RAM (still, quite a lot). When I login to X and blackbox, that's about 90 MBs and it's steady there, doesn't seem to leak anything big.
However, from the moment I go to gnome, the number goes to 200 MBs and as much time the machine runs, it eventnually leaks all the time. Killing gnome and X does not give you back the memory. You have to reobot to get it back.
will give you my "ps aux" when I reboot clean.
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 1.0 0.0 1388 504 ? S 15:24 0:01 init [3]
root 2 0.0 0.0 0 0 ? S 15:24 0:00 [migration/0]
root 3 0.0 0.0 0 0 ? SN 15:24 0:00 [ksoftirqd/0]
root 4 0.0 0.0 0 0 ? S< 15:24 0:00 [events/0]
root 5 0.0 0.0 0 0 ? S< 15:24 0:00 [khelper]
root 17 0.0 0.0 0 0 ? S< 15:24 0:00 [kacpid]
root 110 0.0 0.0 0 0 ? S< 15:24 0:00 [kblockd/0]
root 173 0.0 0.0 0 0 ? S 15:24 0:00 [pdflush]
root 174 0.0 0.0 0 0 ? S 15:24 0:00 [pdflush]
root 176 0.0 0.0 0 0 ? S< 15:24 0:00 [aio/0]
root 175 0.0 0.0 0 0 ? S 15:24 0:00 [kswapd0]
root 177 0.0 0.0 0 0 ? S 15:24 0:00 [jfsIO]
root 178 0.0 0.0 0 0 ? S 15:24 0:00 [jfsCommit]
root 179 0.0 0.0 0 0 ? S 15:24 0:00 [jfsSync]
root 180 0.0 0.0 0 0 ? S< 15:24 0:00 [xfslogd/0]
root 181 0.0 0.0 0 0 ? S< 15:24 0:00 [xfsdatad/0]
root 182 0.0 0.0 0 0 ? S 15:24 0:00 [xfsbufd]
root 783 0.0 0.0 0 0 ? S 15:24 0:00 [kseriod]
root 868 0.0 0.0 0 0 ? S< 15:24 0:00 [ata/0]
root 889 0.0 0.0 0 0 ? S< 15:24 0:00 [kcryptd/0]
root 890 0.0 0.0 0 0 ? S< 15:24 0:00 [kmirrord/0]
root 893 0.0 0.0 0 0 ? S< 15:24 0:00 [reiserfs/0]
root 939 0.0 0.0 1368 384 ? S< s 15:24 0:00 udevd
root 1075 0.0 0.1 1476 848 ? Ss 15:24 0:00 /sbin/devfsd /dev
root 1264 0.3 0.0 0 0 ? S 15:24 0:00 [khubd]
root 1602 0.0 0.1 1628 732 ? Ss 15:24 0:00 /usr/sbin/syslog-ng
root 2604 0.0 0.0 0 0 ? S 15:25 0:00 [scsi_eh_1]
root 2605 0.0 0.0 0 0 ? S 15:25 0:00 [usb-storage]
root 3355 0.0 0.0 0 0 ? S 15:25 0:00 [pccardd]
root 3422 0.0 0.0 0 0 ? S 15:25 0:00 [khpsbpkt]
root 3529 0.0 0.0 0 0 ? S 15:25 0:00 [knodemgrd_0]
root 4622 0.0 0.1 1540 724 ? Ss 15:25 0:00 /sbin/cardmgr
bin 4670 0.0 0.0 1472 436 ? Ss 15:26 0:00 /sbin/portmap
root 4682 0.0 0.1 2552 972 ? Ss 15:26 0:00 /usr/sbin/famd
root 4704 0.0 0.1 1548 544 ? S 15:26 0:00 /usr/sbin/crond
nobody 4715 0.0 0.2 1940 1028 ? Ss 15:26 0:00 /usr/bin/dbus-daemon-1 --system
root 4738 1.7 0.9 6388 4956 ? Ss 15:26 0:00 /usr/sbin/hald
root 4904 0.1 0.3 4616 1720 tty1 Ss 15:26 0:00 -bash
root 4912 0.0 0.0 1384 480 tty2 Ss+ 15:26 0:00 /sbin/agetty 38400 vc/2 linux
root 4913 0.0 0.0 1384 480 tty3 Ss+ 15:26 0:00 /sbin/agetty 38400 vc/3 linux
root 4914 0.0 0.0 1384 480 tty4 Ss+ 15:26 0:00 /sbin/agetty 38400 vc/4 linux
root 4915 0.0 0.0 1384 480 tty5 Ss+ 15:26 0:00 /sbin/agetty 38400 vc/5 linux
root 4916 0.0 0.0 1384 480 tty6 Ss+ 15:26 0:00 /sbin/agetty 38400 vc/6 linux
root 5048 0.0 0.1 4404 836 tty1 R+ 15:26 0:00 ps aux
With Gnome:
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.3 0.0 1388 504 ? S 15:24 0:01 init [3]
root 2 0.0 0.0 0 0 ? S 15:24 0:00 [migration/0]
root 3 0.0 0.0 0 0 ? SN 15:24 0:00 [ksoftirqd/0]
root 4 0.0 0.0 0 0 ? S< 15:24 0:00 [events/0]
root 5 0.0 0.0 0 0 ? S< 15:24 0:00 [khelper]
root 17 0.0 0.0 0 0 ? S< 15:24 0:00 [kacpid]
root 110 0.0 0.0 0 0 ? S< 15:24 0:00 [kblockd/0]
root 173 0.0 0.0 0 0 ? S 15:24 0:00 [pdflush]
root 174 0.0 0.0 0 0 ? S 15:24 0:00 [pdflush]
root 176 0.0 0.0 0 0 ? S< 15:24 0:00 [aio/0]
root 175 0.0 0.0 0 0 ? S 15:24 0:00 [kswapd0]
root 177 0.0 0.0 0 0 ? S 15:24 0:00 [jfsIO]
root 178 0.0 0.0 0 0 ? S 15:24 0:00 [jfsCommit]
root 179 0.0 0.0 0 0 ? S 15:24 0:00 [jfsSync]
root 180 0.0 0.0 0 0 ? S< 15:24 0:00 [xfslogd/0]
root 181 0.0 0.0 0 0 ? S< 15:24 0:00 [xfsdatad/0]
root 182 0.0 0.0 0 0 ? S 15:24 0:00 [xfsbufd]
root 783 0.0 0.0 0 0 ? S 15:24 0:00 [kseriod]
root 868 0.0 0.0 0 0 ? S< 15:24 0:00 [ata/0]
root 889 0.0 0.0 0 0 ? S< 15:24 0:00 [kcryptd/0]
root 890 0.0 0.0 0 0 ? S< 15:24 0:00 [kmirrord/0]
root 893 0.0 0.0 0 0 ? S< 15:24 0:00 [reiserfs/0]
root 939 0.0 0.0 1368 384 ? S<s 15:24 0:00 udevd
root 1075 0.0 0.1 1476 848 ? Ss 15:24 0:00 /sbin/devfsd /dev
root 1264 0.0 0.0 0 0 ? S 15:24 0:00 [khubd]
root 1602 0.0 0.1 1628 732 ? Ss 15:24 0:00 /usr/sbin/syslog-ng
root 2604 0.0 0.0 0 0 ? S 15:25 0:00 [scsi_eh_1]
root 2605 0.0 0.0 0 0 ? S 15:25 0:00 [usb-storage]
root 3355 0.0 0.0 0 0 ? S 15:25 0:00 [pccardd]
root 3422 0.0 0.0 0 0 ? S 15:25 0:00 [khpsbpkt]
root 3529 0.0 0.0 0 0 ? S 15:25 0:00 [knodemgrd_0]
root 4622 0.0 0.1 1540 724 ? Ss 15:25 0:00 /sbin/cardmgr
bin 4670 0.0 0.0 1472 440 ? Ss 15:26 0:00 /sbin/portmap
eugenia 4682 0.0 0.2 2688 1248 ? Ss 15:26 0:00 /usr/sbin/famd
root 4704 0.0 0.1 1548 544 ? S 15:26 0:00 /usr/sbin/crond
nobody 4715 0.0 0.2 1940 1032 ? Ss 15:26 0:00 /usr/bin/dbus-daemon-1 --system
root 4738 0.1 0.9 6388 4960 ? Ss 15:26 0:00 /usr/sbin/hald
root 4912 0.0 0.0 1384 480 tty2 Ss+ 15:26 0:00 /sbin/agetty 38400 vc/2 linux
root 4913 0.0 0.0 1384 480 tty3 Ss+ 15:26 0:00 /sbin/agetty 38400 vc/3 linux
root 4914 0.0 0.0 1384 480 tty4 Ss+ 15:26 0:00 /sbin/agetty 38400 vc/4 linux
root 4915 0.0 0.0 1384 480 tty5 Ss+ 15:26 0:00 /sbin/agetty 38400 vc/5 linux
root 4916 0.0 0.0 1384 480 tty6 Ss+ 15:26 0:00 /sbin/agetty 38400 vc/6 linux
root 5096 0.0 0.0 1408 488 ? Ss 15:27 0:00 /usr/sbin/dhcpcd -t 30 -h lc2430 eth0
eugenia 5128 0.0 0.3 5112 1956 tty1 Ss 15:28 0:00 -bash
eugenia 5201 0.0 0.3 4908 1572 tty1 S+ 15:28 0:00 /bin/sh /usr/X11R6/bin/startx
eugenia 5212 0.0 0.1 2204 644 tty1 S+ 15:28 0:00 xinit /home/eugenia/.xinitrc --
root 5213 1.8 4.0 24220 20648 ? S 15:28 0:01 X :0
eugenia 5305 0.3 1.8 20796 9460 tty1 S 15:28 0:00 gnome-session
eugenia 5306 0.0 0.0 0 0 tty1 Z 15:28 0:00 [xsetroot] <defunct>
eugenia 5310 0.0 0.1 1900 768 ? Ss 15:28 0:00 dbus-daemon-1 --fork --print-pid 8 --print-address 6 --session
eugenia 5312 0.5 1.2 9740 6532 tty1 S 15:28 0:00 /opt/gnome/libexec/gconfd-2 5
eugenia 5315 0.0 0.1 2000 944 tty1 S 15:28 0:00 /opt/gnome/bin/gnome-keyring-daemon
eugenia 5317 0.0 0.5 4264 2916 ? Ss 15:28 0:00 /usr/bin/esd -terminate -nobeeps -as 2 -d default -spawnfd 17
eugenia 5321 0.1 0.5 6856 2840 ? Ss 15:28 0:00 /opt/gnome/libexec/bonobo-activation-server --ac-activate --ior-output-fd=19
eugenia 5323 0.0 0.5 10016 3008 ? Ss 15:28 0:00 gnome-smproxy --sm-client-id default0
eugenia 5325 0.4 2.0 23480 10592 ? S 15:28 0:00 /opt/gnome/libexec/gnome-settings-daemon --oaf-activate-iid=OAFIID:GNOME_SettingsDaemon --oaf-ior-fd=22
eugenia 5370 0.0 0.3 3644 1980 ? S 15:28 0:00 xscreensaver -nosplash
eugenia 5394 0.2 1.4 13760 7212 ? Ss 15:28 0:00 /opt/gnome/bin/metacity --sm-client-id=default1
eugenia 5398 0.5 2.3 22412 11840 ? Ss 15:28 0:00 gnome-panel --sm-client-id default2
eugenia 5400 0.8 3.8 43076 19708 ? Ssl 15:28 0:00 nautilus --no-default-window --sm-client-id default3
eugenia 5403 0.0 0.7 19320 4072 ? Sl 15:28 0:00 /opt/gnome/libexec/gnome-vfs-daemon --oaf-activate-iid=OAFIID:GNOME_VFS_Daemon_Factory --oaf-ior-fd=28
eugenia 5409 0.0 0.1 1932 680 ? S 15:28 0:00 /opt/gnome/libexec/mapping-daemon
eugenia 5416 0.2 1.6 19724 8704 ? S 15:28 0:00 /opt/gnome/libexec/mini_commander_applet --oaf-activate-iid=OAFIID:GNOME_MiniCommanderApplet_Factory --oaf-ior-fd=30
eugenia 5418 0.3 1.7 19968 9044 ? S 15:28 0:00 /opt/gnome/libexec/wnck-applet --oaf-activate-iid=OAFIID:GNOME_Wncklet_Factory --oaf-ior-fd=32
root 5422 0.0 1.1 10088 5676 ? S 15:28 0:00 xterm -bg black -fg green -cr red -sl 3000 -g 100x76+1+1
eugenia 5424 0.1 1.3 18636 7128 ? S 15:28 0:00 /opt/gnome/libexec/notification-area-applet --oaf-activate-iid=OAFIID:GNOME_NotificationAreaApplet_Factory --oaf-ior-fd=34
eugenia 5426 0.5 2.0 22740 10516 ? S 15:28 0:00 /opt/gnome/libexec/mixer_applet2 --oaf-activate-iid=OAFIID:GNOME_MixerApplet_Factory --oaf-ior-fd=36
eugenia 5427 0.0 0.3 5100 1932 pts/0 Ss 15:28 0:00 bash
eugenia 5519 0.1 1.5 19332 8028 ? S 15:28 0:00 /opt/gnome/libexec/battstat-applet-2 --oaf-activate-iid=OAFIID:GNOME_BattstatApplet_Factory --oaf-ior-fd=38
eugenia 5521 0.1 1.5 19256 7924 ? S 15:28 0:00 /opt/gnome/libexec/wireless-applet --oaf-activate-iid=OAFIID:GNOME_Panel_WirelessApplet_Factory --oaf-ior-fd=40
eugenia 5523 0.2 1.6 20604 8640 ? S 15:28 0:00 /opt/gnome/libexec/clock-applet --oaf-activate-iid=OAFIID:GNOME_ClockApplet_Factory --oaf-ior-fd=42
eugenia 5529 0.0 0.3 4928 1624 ? S 15:28 0:00 /bin/sh /opt/mozilla/bin/firefox
eugenia 5541 0.0 0.3 4968 1640 ? S 15:28 0:00 /bin/sh /opt/mozilla/lib/firefox-1.0/run-mozilla.sh /opt/mozilla/lib/firefox-1.0/firefox-bin
eugenia 5546 5.3 6.2 104688 31988 ? Sl 15:28 0:02 /opt/mozilla/lib/firefox-1.0/firefox-bin
eugenia 5553 0.0 0.0 0 0 ? Z 15:29 0:00 [netstat] <defunct>
eugenia 5558 0.0 0.1 4404 840 pts/0 R+ 15:29 0:00 ps aux
1. Why Arch needs 25 MBs more memory than Ubuntu when Gnome is loaded, on a similar configuration?
2. And why on my other laptop, Gnome (or a gnome app), is leaking so much?
Could you run top and press shift+M to sort on memory usage and post the top of them?
Also, does your system use any swap when in gnome?
http://gnomefiles.org/shots/mem.png
>Also, does your system use any swap when in gnome?
No, it doesn't seem to go above 497 MBs (out of my 512 MBs on this laptop).
BTW, a few things compared to Ubuntu on a similar configuration:
Ubuntu with Fluxbox: 48 MB
Arch with Fluxbox: 61 MB
Ubuntu with Gnome: 90 MB
Arch with Gnome: starts at 190 MBs and goes all the way up to 497 MB.
Also, you have your panel loaded with quite a few applets. I don't know the options Ubuntu uses, but some of our applets are a little bit bloated (clock applet with evolution-data-server integration for example)
This is my top line from top on my arch system (2.6.10-as3 custom kernel)
Mem: 516400k total, 502048k used, 14352k free, 95148k buffers
Swap: 1952960k total, 0k used, 1952960k free, 240188k cached
This is my top line from another box running a locked gnome session with X as a terminal server (custom kernel built from kernel-source-2.6.8 from debian, box is running archlinux):
Mem: 1036080k total, 951408k used, 84672k free, 100252k buffers
Swap: 1991976k total, 244k used, 1991732k free, 384692k cached
Linux just utilizes your available memory with cache. it seems it caches a lot on archlinux, but it will either free the cache or swap it out when it needs memory for real programs.
Additional Debian terminal server with 2 users logged in, doing nothing (load is 0.01 :P), kernel 2.6.7-grsec (hardened kernelpatches taken from gentoo):
Mem: 517216k total, 513836k used, 3380k free, 7688k buffers
Swap: 530104k total, 8648k used, 521456k free, 172952k cached
http://bbs.archlinux.org/viewtopic.php?t=9860