LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 04-11-2005, 08:41 PM   #1
Kremit
LQ Newbie
 
Registered: Aug 2003
Posts: 2

Rep: Reputation: 0
System lags and eats a lot of swap space over a few days


I've had a lingering problem with my linux desktop for a long time now (all the way back from Redhat 7.3 about 3 years ago until Fedora now). I have a tendency to leave a few programs open all the time... my mail program (used to be Balsa, now Evolution) and my web browser (used to be Galeon, then Epiphany, now Firefox). Over time, with XFree, GNOME, Gaim, Evolution, and some Mozilla variant, my memory would be completely used (not a problem, the linux kernel knows how to use RAM to the best of its abilities) but my swap space would start becoming full. If I left this going for too long (leaving the browser open for days, etc.) even if I closed all but 1 tab, the system would continue filling the swap space until everything was full and the famous swap-thrashing would start.
Now I understand that leaving the browser open all the time won't let the program free all of the memory it used, but I would expect the pages to be deleted from memory after I closed the tabs or they disappeared from the history. I would also assume my hardware specs should be plenty decent to run the latest distributions (see below).

So, then, has anyone else had a problem with these specific programs leaking memory over time? Even X seems to leak memory... after 6 days, its memory usage (RSS) is at 184MB just for the X binary.

Also, I've noticed that my system lags sometimes even if the memory is not full. Opening Openoffice takes 10-15 secs, and loading terminals becomes slow.

Currently-running software specs:
Distro: Fedora Core 4 "Test 1" -- Yes, devel software probably has memory leaks, but most of the programs in this test are stable versions -- as mentioned before I've had this swap/lag problem for several months, just not as noticeable until now:
Xorg 6.8.2-18
GNOME 2.10
Evolution 2.2.1
Gaim 1.2.1
Firefox 1.0.2 (3 tabs open)
Gnome Terminal 2.10.0
-----
603MB swap partition

Here are my system specs:
Athlon XP 1900+ processor
512MB Crucial 333MHz (PC2700) RAM + 603MB swap partition
Asus A7V333 motherboard
(1) NVIDIA FX5700 128MB video card -- using NVIDIA binaries
(1) NVIDIA Geforce2 32MB video card -- also using NVIDIA binaries
80GB Maxtor hard drive, 8MB cache
Network card, CDRW, etc.

Here's a boatload of data from the command line, right before the swap filled:

Code:
[root@Kremit ~]# uptime
 20:51:40 up 6 days,  6:21,  2 users,  load average: 0.86, 1.34, 1.42

[root@Kremit ~]# free -m
             total       used       free     shared    buffers     cached
Mem:           503        486         16          0          4         59
-/+ buffers/cache:        422         81
Swap:          603        603          0

[root@Kremit ~]# chkconfig --list|grep -i '5:on'
anacron         0:off   1:off   2:on    3:on    4:on    5:on    6:off
autofs          0:off   1:off   2:off   3:on    4:on    5:on    6:off
crond           0:off   1:off   2:on    3:on    4:on    5:on    6:off
cups            0:off   1:off   2:on    3:on    4:on    5:on    6:off
cups-config-daemon      0:off   1:off   2:off   3:on    4:on    5:on    6:off
gpm             0:off   1:off   2:on    3:on    4:on    5:on    6:off
haldaemon       0:off   1:off   2:off   3:on    4:on    5:on    6:off
httpd           0:off   1:off   2:on    3:on    4:on    5:on    6:off
kudzu           0:off   1:off   2:off   3:on    4:on    5:on    6:off
messagebus      0:off   1:off   2:off   3:on    4:on    5:on    6:off
netfs           0:off   1:off   2:off   3:on    4:on    5:on    6:off
network         0:off   1:off   2:on    3:on    4:on    5:on    6:off
ntpd            0:off   1:off   2:off   3:on    4:off   5:on    6:off
sshd            0:off   1:off   2:on    3:on    4:on    5:on    6:off
syslog          0:off   1:off   2:on    3:on    4:on    5:on    6:off
sysstat         0:off   1:on    2:on    3:on    4:on    5:on    6:off
xfs             0:off   1:off   2:on    3:on    4:on    5:on    6:off
xinetd          0:off   1:off   2:off   3:on    4:on    5:on    6:off

[root@Kremit ~]# ps -eF
UID        PID  PPID  C    SZ   RSS PSR STIME TTY          TIME CMD
root         1     0  0   426    88   0 Apr05 ?        00:00:04 init [3]
root         2     1  0     0     0   0 Apr05 ?        00:00:00 [ksoftirqd/0]
root         3     1  0     0     0   0 Apr05 ?        00:00:30 [events/0]
root         4     1  0     0     0   0 Apr05 ?        00:00:00 [khelper]
root         9     1  0     0     0   0 Apr05 ?        00:00:00 [kthread]
root        18     9  0     0     0   0 Apr05 ?        00:00:00 [kacpid]
root        93     9  0     0     0   0 Apr05 ?        00:00:01 [kblockd/0]
root       157     9  0     0     0   0 Apr05 ?        00:00:00 [aio/0]
root       156     1  0     0     0   0 Apr05 ?        00:00:18 [kswapd0]
root       101     1  0     0     0   0 Apr05 ?        00:00:00 [khubd]
root       251     1  0     0     0   0 Apr05 ?        00:00:00 [kseriod]
root       438     1  0     0     0   0 Apr05 ?        00:00:07 [kjournald]
root      1015     1  0   394     4   0 Apr05 ?        00:00:00 udevd
root      1094     1  0     0     0   0 Apr05 ?        00:00:00 [kgameportd]
root      1980     1  0     0     0   0 Apr05 ?        00:00:00 [kjournald]
root      2388     1  0   535   272   0 Apr05 ?        00:00:00 /sbin/dhclient -
root      2433     1  0   396   244   0 Apr05 ?        00:00:00 syslogd -m 0
root      2435     1  0   383   124   0 Apr05 ?        00:00:00 klogd -x
root      2521     1  0  1073     4   0 Apr05 ?        00:00:00 /usr/sbin/sshd
root      2532     1  0   531     4   0 Apr05 ?        00:00:00 xinetd -stayaliv
ntp       2549     1  0   999  3996   0 Apr05 ?        00:00:04 ntpd -u ntp:ntp
root      2559     1  0   432   500   0 Apr05 ?        00:00:03 gpm -m /dev/inpu
root      2570     1  0  4187  1280   0 Apr05 ?        00:00:07 /usr/sbin/httpd
root      2578     1  0  1026   692   0 Apr05 ?        00:00:00 crond
xfs       2619     1  0  1165  1528   0 Apr05 ?        00:00:00 xfs -droppriv -d
81        2634     1  0   628   564   0 Apr05 ?        00:00:00 dbus-daemon --sy
root      2642     1  0   698   376   0 Apr05 ?        00:00:00 cups-config-daem
root      2651     1  0  1044  1012   0 Apr05 ?        00:00:03 hald --retain-pr
root      2928  2651  0   517   352   0 Apr05 ?        00:00:00 hald-addon-acpi
root      2942  2651  0   518   408   0 Apr05 ?        00:00:47 hald-addon-stora
root      2992     1  0   585   668   0 Apr05 ?        00:00:00 login -- root
root      2994     1  0   379   388   0 Apr05 tty3     00:00:00 /sbin/mingetty t
root      2995     1  0   380   388   0 Apr05 tty4     00:00:00 /sbin/mingetty t
root      2996     1  0   380   388   0 Apr05 tty5     00:00:00 /sbin/mingetty t
root      2997     1  0   379   388   0 Apr05 tty6     00:00:00 /sbin/mingetty t
root      3251  2992  0  1158   596   0 Apr05 tty1     00:00:00 -bash
root      4306  3251  0  1111   516   0 Apr05 tty1     00:00:00 /bin/sh /usr/X11
root      4318  4306  0   594   388   0 Apr05 tty1     00:00:00 xinit /etc/X11/x
root      4319  4318  6 62280 186036  0 Apr05 ?        10:14:34 X :0
root      4372  4318  0  5511  1916   0 Apr05 tty1     00:00:19 /usr/bin/gnome-s
root      4391     1  0   652   404   0 Apr05 tty1     00:00:00 /usr/bin/dbus-la
root      4392     1  0   606   436   0 Apr05 ?        00:00:00 dbus-daemon --fo
root      4416     1  0  5486  3844   0 Apr05 tty1     00:00:14 /usr/libexec/gco
root      4418     1  0   538   520   0 Apr05 tty1     00:00:00 /usr/bin/gnome-k
root      4422     1  0  1975  1156   0 Apr05 ?        00:00:17 /usr/bin/esd -te
root      4426     1  0  1807  1652   0 Apr05 ?        00:00:00 /usr/libexec/bon
root      4428     1  0  5906  5232   0 Apr05 ?        00:03:26 metacity --sm-sa
root      4430     1  0  5323  2104   0 Apr05 ?        00:01:10 /usr/libexec/gno
root      4444     1  0  1197  1732   0 Apr05 ?        00:00:31 xscreensaver -no
root      4472     1  0 11712  6004   0 Apr05 ?        00:01:04 /usr/bin/gnome-p
root      4474     1  0 11275  5592   0 Apr05 ?        00:00:52 nautilus --sm-co
root      4476     1  0  4946  1344   0 Apr05 ?        00:00:14 gnome-volume-man
root      4482     1  0  8245 13408   0 Apr05 ?        00:07:35 gaim --session 1
root      4488     1  1  8333  4056   0 Apr05 ?        01:44:32 gkrellm --sm-cli
root      4494     1  0 29200  1436   0 Apr05 ?        00:00:00 /usr/libexec/gno
root      4495     1  0  3226   492   0 Apr05 ?        00:00:09 x11vnc -display
root      4514     1  0 16612  4860   0 Apr05 ?        00:10:09 /usr/libexec/clo
root      4518     1  0  5960  3616   0 Apr05 ?        00:01:08 /usr/libexec/mix
root      4520     1  0  4911  2576   0 Apr05 ?        00:00:15 /usr/libexec/not
root      4522     1  0  6565  6052   0 Apr05 ?        00:02:29 /usr/libexec/wnc
root      4536     1  0   516   540   0 Apr05 ?        00:00:01 /usr/libexec/map
root      4619     1  0 84174  6612   0 Apr05 ?        00:00:23 /usr/libexec/evo
root      4883     1  0 21066  6908   0 Apr05 ?        00:00:24 /usr/libexec/evo
root      6375     1  0  6697   700   0 Apr05 ?        00:00:01 /usr/bin/perl -T
root      6378  6375  0  6941   716   0 Apr05 ?        00:00:01 spamd child
root      6379  6375  0  6966   716   0 Apr05 ?        00:00:01 spamd child
root      6380  6375  0  6895   716   0 Apr05 ?        00:00:01 spamd child
root      6381  6375  0  6998   716   0 Apr05 ?        00:00:01 spamd child
root      6382  6375  0  7132   716   0 Apr05 ?        00:00:02 spamd child
root      7154     1  0 41383 10852   0 Apr05 ?        00:36:23 xmms -e
root     11750     1  0   380   388   0 Apr05 tty2     00:00:00 /sbin/mingetty t
root     17833     1  0   682   516   0 Apr06 ?        00:00:00 init [3]
root      5485     1  0  6698    36   0 Apr07 ?        00:00:01 /usr/bin/perl -T
root      5489  5485  0  7176    36   0 Apr07 ?        00:00:05 spamd child
root      5490  5485  0  7379    36   0 Apr07 ?        00:00:06 spamd child
root      5491  5485  0  7031    36   0 Apr07 ?        00:00:04 spamd child
root      5492  5485  0  7161    36   0 Apr07 ?        00:00:04 spamd child
root      5493  5485  0  7248    36   0 Apr07 ?        00:00:06 spamd child
root     19890     1  0  5769  4076   0 Apr07 ?        00:00:55 /usr/libexec/sti
root     22457  4430  0  5468  3752   0 Apr08 ?        00:01:54 gnome-typing-mon
root     28149     1  0   595   688   0 Apr09 ?        00:02:28 /usr/libexec/gam
root       548     1  0  2787  1468   0 Apr10 ?        00:00:01 cupsd
apache     695  2570  0  4232  1324   0 Apr10 ?        00:00:00 /usr/sbin/httpd
apache     696  2570  0  4231  3028   0 Apr10 ?        00:00:00 /usr/sbin/httpd
apache     697  2570  0  4198  1348   0 Apr10 ?        00:00:00 /usr/sbin/httpd
apache     698  2570  0  4198  1304   0 Apr10 ?        00:00:00 /usr/sbin/httpd
apache     699  2570  0  4198  1304   0 Apr10 ?        00:00:00 /usr/sbin/httpd
apache     700  2570  0  4198  1304   0 Apr10 ?        00:00:00 /usr/sbin/httpd
apache     701  2570  0  4198  1300   0 Apr10 ?        00:00:00 /usr/sbin/httpd
apache     702  2570  0  4232  1328   0 Apr10 ?        00:00:00 /usr/sbin/httpd
root     24576     1  0  6698   840   0 Apr10 ?        00:00:37 bluefish -n
root     27857     9  0     0     0   0 Apr10 ?        00:00:00 [pdflush]
root     28298     1  0 54444 46288   0 Apr10 ?        00:02:27 evolution
root     28511 28298  0  6699   508   0 Apr10 ?        00:00:01 /usr/bin/perl -T
root     28514 28511  0  6962 14920   0 Apr10 ?        00:00:02 spamd child
root     28515 28511  0  6926  9084   0 Apr10 ?        00:00:01 spamd child
root     28516 28511  0  6911 11156   0 Apr10 ?        00:00:01 spamd child
root     28517 28511  0  7203 10872   0 Apr10 ?        00:00:04 spamd child
root     28518 28511  0  7114 11416   0 Apr10 ?        00:00:03 spamd child
root     31101     9  0     0     0   0 Apr10 ?        00:00:00 [pdflush]
root      3152     1  0  1112   852   0 01:33 ?        00:00:00 /bin/sh /usr/lib
root      3193  3152  0  1113   844   0 01:33 ?        00:00:00 /bin/sh /usr/lib
root      3198  3193  1 39399 54028   0 01:33 ?        00:21:18 /usr/lib/firefox
root     11759  3198  0 69425  8272   0 12:25 ?        00:00:25 java_vm
root     18540     1  0  9622 13332   0 20:12 ?        00:00:05 gnome-terminal
root     18543 18540  0   519   612   0 20:12 ?        00:00:00 gnome-pty-helper
root     18544 18540  0  1158  1452   0 20:12 pts/0    00:00:00 bash
root     19000 18544  0  1154   844   0 20:35 pts/0    00:00:00 ps -eF

[root@Kremit ~]# hdparm -i /dev/hda

/dev/hda:

 Model=WDC WD800JB-00JJA0, FwRev=05.01C05, SerialNo=WD-WCAM91471715
 Config={ HardSect NotMFM HdSw>15uSec SpinMotCtl Fixed DTR>5Mbs FmtGapReq }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=66
 BuffType=unknown, BuffSize=8192kB, MaxMultSect=16, MultSect=16
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=156301488
 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio3 pio4
 DMA modes:  mdma0 mdma1 mdma2
 UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5
 AdvancedPM=no WriteCache=enabled
 Drive conforms to: device does not report version:

 * signifies the current active mode

[root@Kremit ~]# hdparm -tT /dev/hda

/dev/hda:
 Timing cached reads:   1024 MB in  2.00 seconds = 511.57 MB/sec
 Timing buffered disk reads:  102 MB in  3.01 seconds =  33.94 MB/sec

[root@Kremit ~]# hdparm -tT /dev/hda

/dev/hda:
 Timing cached reads:   1028 MB in  2.00 seconds = 513.56 MB/sec
 Timing buffered disk reads:  140 MB in  3.02 seconds =  46.35 MB/sec

Last edited by Kremit; 04-11-2005 at 08:52 PM.
 
Old 04-12-2005, 09:12 AM   #2
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
Sounds like a memory leak to me. Have you run any memory tests? I leave just about all the applications you mentioned on for days and weeks at a time at work without any problems and swap never being used at all.
 
Old 04-13-2005, 01:56 PM   #3
Kremit
LQ Newbie
 
Registered: Aug 2003
Posts: 2

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by trickykid
Sounds like a memory leak to me. Have you run any memory tests? I leave just about all the applications you mentioned on for days and weeks at a time at work without any problems and swap never being used at all.
I ran Memtest86 last night, and it ran through all of the default tests with no errors. I've never received any memory addressing errors while using my computer (or, none that I've noticed). No kernel errors or anything like that either.
 
Old 06-26-2005, 08:31 PM   #4
RoaCh Of DisCor
Member
 
Registered: Apr 2004
Location: Washington State
Distribution: SuSE 9.3 / Slackware-Current
Posts: 701

Rep: Reputation: 30
Basically I've had the same issue...and have yet to find a solution.
 
Old 06-27-2005, 01:30 PM   #5
Vgui
Member
 
Registered: Apr 2005
Location: Canada
Distribution: Slackware
Posts: 496

Rep: Reputation: 31
I think I remember hearing that earlier Firefox versions had a memory leak, especially with heavy tab usage. I would recommend upgrading to 1.0.4 (even if not for the potential memory fix, then to keep up to date with security releases). Any reason why you are still at 1.0.2?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to unmount actual swap and mount a new(bigger) swap space? isaac Linux - Newbie 1 06-06-2004 02:23 AM
not using swap / kjournald using a lot of CPU bhatcher Linux - General 3 02-18-2004 11:28 PM
A how to: How much Swap to setup/Linux eats my RAM MasterC Linux - General 5 01-13-2004 07:30 AM
swap space ; system optimizing markus1982 Linux - General 4 10-12-2002 06:35 PM
freeing up swap space on my linux system manmagic Linux - General 1 06-22-2001 08:08 AM


All times are GMT -5. The time now is 09:14 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration