LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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-30-2005, 11:30 PM   #1
epoo
Member
 
Registered: Aug 2003
Distribution: slackware 11, ubuntu 7.04
Posts: 165

Rep: Reputation: 30
mem and swap usage increasing daily


background - slackware 10.1, used as a ftp/samba server. uptime is 23 days now (if that matters), running fluxbox and 5 slitapps. it's a generic 1.8ghz.

i was worried about this for some reason from the get-go, so i made a script to write 'free -m' to a text file, so luckily i have that log for the past few days. there were a few times that i logged out of X to see the effect it would have on mem (or maybe just one time) - i think thats when swap dropped down to 0. i know that by design, linux uses up free memory, but this seems like more than that, perhaps a mem leak.
Code:
Sat Apr 16 04:40:01 CDT 2005
-------------------------------------------------------------------------
             total       used       free     shared    buffers     cached
Mem:           240        237          3          0          4         39
-/+ buffers/cache:        193         47
Swap:          478         56        422

Sun Apr 17 04:40:01 CDT 2005
-------------------------------------------------------------------------
             total       used       free     shared    buffers     cached
Mem:           240        237          3          0         16          7
-/+ buffers/cache:        213         27
Swap:          478         64        413

Mon Apr 18 04:40:01 CDT 2005
-------------------------------------------------------------------------
             total       used       free     shared    buffers     cached
Mem:           240        237          3          0          4          5
-/+ buffers/cache:        226         14
Swap:          478         77        400

Tue Apr 19 04:40:01 CDT 2005
-------------------------------------------------------------------------
             total       used       free     shared    buffers     cached
Mem:           240        236          4          0         22        160
-/+ buffers/cache:         53        187
Swap:          478          1        476

Wed Apr 20 04:40:01 CDT 2005
-------------------------------------------------------------------------
             total       used       free     shared    buffers     cached
Mem:           240        237          3          0         14         35
-/+ buffers/cache:        187         53
Swap:          478          0        477

Thu Apr 21 04:40:01 CDT 2005
-------------------------------------------------------------------------
             total       used       free     shared    buffers     cached
Mem:           240        236          4          0         18          7
-/+ buffers/cache:        210         30
Swap:          478          0        477

Fri Apr 22 04:40:02 CDT 2005
-------------------------------------------------------------------------
             total       used       free     shared    buffers     cached
Mem:           240        232          8          0         14         16
-/+ buffers/cache:        201         39
Swap:          478          1        477

Sat Apr 23 04:40:02 CDT 2005
-------------------------------------------------------------------------
             total       used       free     shared    buffers     cached
Mem:           240        236          4          0          8         37
-/+ buffers/cache:        190         50
Swap:          478          2        476

Sun Apr 24 04:40:02 CDT 2005
-------------------------------------------------------------------------
             total       used       free     shared    buffers     cached
Mem:           240        237          3          0          4         21
-/+ buffers/cache:        211         29
Swap:          478          3        474

Mon Apr 25 04:40:02 CDT 2005
-------------------------------------------------------------------------
             total       used       free     shared    buffers     cached
Mem:           240        236          4          0          4         19
-/+ buffers/cache:        212         28
Swap:          478          6        472

Tue Apr 26 04:40:01 CDT 2005
-------------------------------------------------------------------------
             total       used       free     shared    buffers     cached
Mem:           240        236          4          0         11          7
-/+ buffers/cache:        218         22
Swap:          478         11        467

Wed Apr 27 04:40:01 CDT 2005
-------------------------------------------------------------------------
             total       used       free     shared    buffers     cached
Mem:           240        236          4          0          6          7
-/+ buffers/cache:        223         17
Swap:          478         23        455

Thu Apr 28 04:40:01 CDT 2005
-------------------------------------------------------------------------
             total       used       free     shared    buffers     cached
Mem:           240        237          3          0         10          6
-/+ buffers/cache:        219         21
Swap:          478         45        433

Fri Apr 29 04:40:01 CDT 2005
-------------------------------------------------------------------------
             total       used       free     shared    buffers     cached
Mem:           240        236          4          0         20         16
-/+ buffers/cache:        199         41
Swap:          478         89        388

Sat Apr 30 04:40:02 CDT 2005
-------------------------------------------------------------------------
             total       used       free     shared    buffers     cached
Mem:           240        237          3          0          5          6
-/+ buffers/cache:        225         15
Swap:          478         96        382
here's psaux as of now:
Code:
USER       PID %CPU %MEM   VSZ  RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.0   588   68 ?        S    Apr07   0:04 init [3]
root         2  0.0  0.0     0    0 ?        S    Apr07   0:00 [keventd]
root         3  0.0  0.0     0    0 ?        SN   Apr07   0:00 [ksoftirqd_CPU0] 
root         4  0.0  0.0     0    0 ?        S    Apr07   1:47 [kswapd]
root         5  0.0  0.0     0    0 ?        S    Apr07   0:16 [bdflush]
root         6  0.0  0.0     0    0 ?        S    Apr07   0:00 [kupdated]
root        10  0.0  0.0     0    0 ?        S<   Apr07   0:00 [mdrecoveryd]
root        11  0.0  0.0     0    0 ?        S    Apr07   0:02 [kjournald]
root        41  0.0  0.0     0    0 ?        S    Apr07   0:53 [kjournald]
root        62  0.0  0.2  1444  548 ?        Ss   Apr07   0:00 /usr/sbin/syslogd
root        65  0.0  0.1  1400  380 ?        Ss   Apr07   0:00 /usr/sbin/klogd -c 3 -x
root       117  0.0  0.1  1376  260 ?        Ss   Apr07   0:00 udevd 
root       297  0.0  0.0     0    0 ?        S    Apr07   0:00 [khubd]
root      1544  0.0  0.1  1388  360 ?        Ss   Apr07   0:00 /usr/sbin/inetd
root      1554  0.0  0.2  1588  544 ?        S    Apr07   0:00 /usr/sbin/crond -l10
daemon    1556  0.0  0.1  1596  492 ?        Ss   Apr07   0:00 /usr/sbin/atd -b 15 -l 1
root      1564  0.0  0.1  1440  424 ?        Ss   Apr07   0:00 /usr/sbin/gpm -m /dev/mouse -t imps2
erich     1566  0.0  0.3  2752  904 tty1     Ss   Apr07   0:01 -bash
root      1567  0.0  0.1  1392  396 tty2     Ss+  Apr07   0:00 /sbin/agetty 38400 tty2 linux
root      1568  0.0  0.1  1392  324 tty3     Ss+  Apr07   0:00 /sbin/agetty 38400 tty3 linux
root      1569  0.0  0.1  1392  316 tty4     Ss+  Apr07   0:00 /sbin/agetty 38400 tty4 linux
root      1570  0.0  0.1  1392  316 tty5     Ss+  Apr07   0:00 /sbin/agetty 38400 tty5 linux
root      1571  0.0  0.1  1392  396 tty6     Ss+  Apr07   0:00 /sbin/agetty 38400 tty6 linux
erich     8184  0.0  0.3  2368  900 tty1     S+   Apr18   0:00 /bin/sh /usr/X11R6/bin/startx
erich     8197  0.0  0.1  2216  364 tty1     S+   Apr18   0:00 xinit /usr/X11R6/lib/X11/xinit/xinitrc -- /usr/X11R6/bin/X -nolisten tcp
root      8198  0.1 80.1 341604 197672 ?     S    Apr18  29:58 /usr/X11R6/bin/X :0 -nolisten tcp
erich     8201  0.0  0.9  6612 2368 tty1     S    Apr18   0:04 /usr/X11R6/bin/fluxbox
erich     8213  0.0  0.2  2636  620 tty1     S    Apr18   0:00 wmclockmon -12
erich     8214  0.0  0.2  2596  520 tty1     S    Apr18   0:00 wmnetload -b
erich     8215  0.0  0.2  2436  544 tty1     S    Apr18   8:58 wmdiskmon -m -p /dev/hda1 -p /dev/hda4
erich     8216  0.0  0.1  2436  484 tty1     S    Apr18   0:00 wmupmon
erich     8217  0.0  0.2  2432  508 tty1     S    Apr18   0:00 wmcpuload
erich     8218  0.0  0.2  2432  516 tty1     S    Apr18   0:00 wmmemload
root     29010  0.0  0.3  2688  780 ?        S    Apr19   0:00 /usr/X11R6/bin/root-tail -g 1100x150+0+0 /var/log/proftpd.log /var/log/xferlog green
nobody   31704  0.0  0.2  3624  636 ?        Ss   Apr20   0:00 proftpd: (accepting connections)
erich    19679  0.0  0.6  3224 1652 ?        Ss   Apr24   0:01 aterm -sh 80 -tr -trsb -sb -fg white -bg black -fn -Misc-Fixed-Medium-R-SemiCondensed--13-12$
erich    19680  0.0  0.6  2716 1636 pts/0    Ss   Apr24   0:00 bash
root      2168  0.0  0.6  6740 1536 ?        Ss   Apr25   0:01 /usr/sbin/smbd -D
root      2170  0.0  0.5  6740 1268 ?        S    Apr25   0:00 /usr/sbin/smbd -D
root      2171  0.0  0.4  3572 1228 ?        Ss   Apr25   0:01 /usr/sbin/nmbd -D
erich    25546  0.0  0.5  2396 1308 ?        Ss   14:49   0:00 /bin/sh /home/erich/.firefox/firefox
erich    25558  0.0  0.5  2436 1336 ?        S    14:49   0:00 /bin/sh /home/erich/.firefox/run-mozilla.sh /home/erich/.firefox/firefox-bin
erich    25563  0.0 11.2 46552 27824 ?       S    14:49   0:11 /home/erich/.firefox/firefox-bin
erich    25566  0.0 11.2 46552 27824 ?       S    14:49   0:00 /home/erich/.firefox/firefox-bin
erich    25567  0.0 11.2 46552 27824 ?       S    14:49   0:00 /home/erich/.firefox/firefox-bin
erich    25569  0.0  0.9  3992 2308 ?        S    14:49   0:00 /usr/libexec/gconfd-2 11
erich    25571  0.0 11.2 46552 27824 ?       S    14:49   0:00 /home/erich/.firefox/firefox-bin
erich    31885  0.0  0.3  2408  848 pts/0    R+   23:22   0:00 ps aux
these two lines are worth noting:
Code:
erich     8197  0.0  0.1  2216  364 tty1     S+   Apr18   0:00 xinit /usr/X11R6/lib/X11/xinit/xinitrc -- /usr/X11R6/bin/X -nolisten tcp
root      8198  0.1 80.3 335888 198308 ?     R    Apr18  29:24 /usr/X11R6/bin/X :0 -nolisten tcp
the last process is using a ridiculous amount of memory, it seems - and why is root running X anyways ?

any help is appreciated - thanks in advance !
 
Old 04-30-2005, 11:53 PM   #2
twantrd
Senior Member
 
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,440

Rep: Reputation: 52
Quote:
the last process is using a ridiculous amount of memory, it seems - and why is root running X anyways ?
I don't know, look at your configuration. Root started X. If you don't want X running, turn it off.

Looking at your setup, you have very little memory on the box and you set swap very low for what you are running so that's probably why your swap is getting depleted.

-twantrd
 
Old 05-01-2005, 12:00 AM   #3
epoo
Member
 
Registered: Aug 2003
Distribution: slackware 11, ubuntu 7.04
Posts: 165

Original Poster
Rep: Reputation: 30
actually the user 'erich' started X, its the line right above that.

my swap is twice the mem size, that should be enough
 
Old 05-01-2005, 03:01 PM   #4
twantrd
Senior Member
 
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,440

Rep: Reputation: 52
I would increase the swap size to more than just double your ram. The amount of ram you have is very low. You are running X and that takes up quite a bit of juice.

-twantrd
 
Old 05-01-2005, 03:16 PM   #5
epoo
Member
 
Registered: Aug 2003
Distribution: slackware 11, ubuntu 7.04
Posts: 165

Original Poster
Rep: Reputation: 30
okay, thanks for the suggestion. i thought it would be acceptable, but that makes sense.
 
Old 05-01-2005, 11:49 PM   #6
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 53
that really doesn't look like a problem -- sure it's using a little swap but not alot

as for x -- this is kind of driver specific i think but for me here since my video card has a bunch of memory on it the driver uses a memory map to write to the cards memory ..

these pages are just mapped into virtual memory and are available to X's address space
it doesn't mean the memory is actually being used by x at all and that memory like all the memory is available for everybody all the time and then some (4 gigs virtual address space)
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mem usage in Sarge/Debian hasanito Debian 2 10-04-2004 02:46 PM
Lowering Mem usage DropHit Red Hat 2 12-20-2003 10:36 PM
XWindosw - 1G (and more) mem usage!! drand Linux - General 2 12-02-2003 12:28 PM
High Mem Usage miketheninja Linux - General 2 11-05-2003 04:26 PM
post your mem usage... zeky Linux - General 36 12-10-2002 12:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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