LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-14-2004, 04:02 PM   #1
muhkuhmasta
LQ Newbie
 
Registered: Jul 2004
Posts: 24

Rep: Reputation: 15
Slackware memory consumption


I'm somewhat confused:


Right after boot running top shows me a memory consumption of around 30mb
(still a lot more than what I get when adding the percentage of memory
consumption for every process [around 9%]) while running an x session the
consumption increases to around 60mb (using fluxbox with gnome or kde this
goes up to a fantastic 110 out of 114mb! [without any programs running]).
But now the miracle: after quitting x the used memory is not freed! still
top show ~60mb used memory, way more than the 9% you get when adding up...


In says in the slackware book (for version 8 though) that slackware runs
fine with 16mb ram.


What do you think of it?




[btw this is slackware 9.1]


Right after boot:
# ps -aux -f -m
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 5.4 0.2 484 236 ? S 12:53 0:04 init
root 2 0.1 0.0 0 0 ? SW 12:53 0:00 [keventd]
root 3 0.0 0.0 0 0 ? SWN 12:53 0:00 [ksoftirqd_CPU0]
root 4 0.0 0.0 0 0 ? SW 12:53 0:00 [kswapd]
root 5 0.0 0.0 0 0 ? SW 12:53 0:00 [bdflush]
root 6 0.0 0.0 0 0 ? SW 12:53 0:00 [kupdated]
root 10 0.0 0.0 0 0 ? SW< 12:54 0:00 [mdrecoveryd]
root 11 0.0 0.0 0 0 ? SW 12:54 0:00 [reiserfsd]
root 58 0.0 0.6 1512 700 ? S 12:54 0:00 /sbin/cardmgr
root 131 0.0 0.0 0 0 ? SW 12:54 0:00 [khubd]
root 673 0.0 0.5 1436 608 ? S 12:54 0:00
/usr/sbin/syslogd
root 676 0.0 0.4 1376 460 ? S 12:54 0:00
/usr/sbin/klogd -
root 679 0.2 1.2 3080 1416 ? S 12:54 0:00 /usr/sbin/sshd
root 687 0.0 0.5 1492 552 ? S 12:54 0:00
/usr/sbin/crond -
root 696 0.0 0.4 1420 476 ttyS0 S 12:54 0:00
/usr/sbin/gpm -m
root 698 0.2 1.1 2272 1280 tty1 S 12:54 0:00 -bash
root 716 1.0 0.6 2692 748 tty1 R 12:55 0:00 \_ ps -aux
-f -m
root 699 0.0 0.4 1368 480 tty2 S 12:54 0:00 /sbin/agetty
3840
root 700 0.0 0.4 1368 480 tty3 S 12:54 0:00 /sbin/agetty
3840
root 701 0.0 0.4 1368 480 tty4 S 12:54 0:00 /sbin/agetty
3840
root 702 0.0 0.4 1368 480 tty5 S 12:54 0:00 /sbin/agetty
3840
root 703 0.0 0.4 1368 480 tty6 S 12:54 0:00 /sbin/agetty
3840


# top -n 1
12:56:58 up 3 min, 1 user, load average: 0.06, 0.07, 0.02
22 processes: 21 sleeping, 1 running, 0 zombie, 0 stopped
CPU states: 1.5% user 5.0% system 0.0% nice 0.0% iowait 93.3% idle
Mem: 110292k av, 35868k used, 74424k free, 0k shrd, 5136k buff
10640k active, 19020k inactive
Swap: 204080k av, 0k used, 204080k free 23176k
cached
[0m
[7m PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME CPU
COMMAND [0m
1 root 9 0 236 236 208 S 0.0 0.2 0:04 0 init
2 root 8 0 0 0 0 SW 0.0 0.0 0:00 0 keventd
3 root 19 19 0 0 0 SWN 0.0 0.0 0:00 0
ksoftirqd_CPU0
4 root 9 0 0 0 0 SW 0.0 0.0 0:00 0 kswapd
5 root 9 0 0 0 0 SW 0.0 0.0 0:00 0 bdflush
6 root 9 0 0 0 0 DW 0.0 0.0 0:00 0 kupdated
10 root -1 -20 0 0 0 SW< 0.0 0.0 0:00 0 mdrecoveryd
11 root 9 0 0 0 0 SW 0.0 0.0 0:00 0 kreiserfsd
58 root 9 0 700 700 532 S 0.0 0.6 0:00 0 cardmgr
131 root 9 0 0 0 0 SW 0.0 0.0 0:00 0 khubd
673 root 9 0 608 608 528 S 0.0 0.5 0:00 0 syslogd
676 root 9 0 460 460 404 S 0.0 0.4 0:00 0 klogd
679 root 9 0 1416 1416 1200 S 0.0 1.2 0:00 0 sshd
687 root 9 0 552 552 488 S 0.0 0.5 0:00 0 crond
696 root 9 0 476 476 420 S 0.0 0.4 0:00 0 gpm
698 root 12 0 1280 1280 1036 S 0.0 1.1 0:00 0 bash
699 root 9 0 480 480 428 S 0.0 0.4 0:00 0 agetty
700 root 9 0 480 480 428 S 0.0 0.4 0:00 0 agetty
701 root 9 0 480 480 428 S 0.0 0.4 0:00 0 agetty
702 root 9 0 480 480 428 S 0.0 0.4 0:00 0 agetty
703 root 9 0 480 480 428 S 0.0 0.4 0:00 0 agetty
734 root 13 0 984 984 812 R 0.0 0.8 0:00 0 top


After loading and quitting (without doing anything else) KDE


# top -n 1
12:58:22 up 4 min, 1 user, load average: 0.45, 0.20, 0.07
22 processes: 21 sleeping, 1 running, 0 zombie, 0 stopped
CPU states: 4.1% user 4.1% system 0.0% nice 0.0% iowait 91.7% idle
Mem: 110292k av, 72804k used, 37488k free, 0k shrd, 10700k buff
24768k active, 39412k inactive
Swap: 204080k av, 0k used, 204080k free 52132k
cached
[0m
[7m PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME CPU
COMMAND [0m
1 root 0 0 236 236 208 S 0.0 0.2 0:04 0 init
2 root 11 0 0 0 0 SW 0.0 0.0 0:00 0 keventd
3 root 19 19 0 0 0 SWN 0.0 0.0 0:00 0
ksoftirqd_CPU0
4 root 9 0 0 0 0 SW 0.0 0.0 0:00 0 kswapd
5 root 9 0 0 0 0 SW 0.0 0.0 0:00 0 bdflush
6 root 9 0 0 0 0 SW 0.0 0.0 0:00 0 kupdated
10 root -1 -20 0 0 0 SW< 0.0 0.0 0:00 0 mdrecoveryd
11 root 9 0 0 0 0 SW 0.0 0.0 0:00 0 kreiserfsd
58 root 9 0 700 700 532 S 0.0 0.6 0:00 0 cardmgr
131 root 9 0 0 0 0 SW 0.0 0.0 0:00 0 khubd
673 root 9 0 608 608 528 S 0.0 0.5 0:00 0 syslogd
676 root 9 0 460 460 404 S 0.0 0.4 0:00 0 klogd
679 root 9 0 1416 1416 1200 S 0.0 1.2 0:00 0 sshd
687 root 9 0 552 552 488 S 0.0 0.5 0:00 0 crond
696 root 9 0 476 476 420 S 0.0 0.4 0:00 0 gpm
698 root 10 0 1280 1280 1036 S 0.0 1.1 0:00 0 bash
699 root 9 0 480 480 428 S 0.0 0.4 0:00 0 agetty
700 root 9 0 480 480 428 S 0.0 0.4 0:00 0 agetty
701 root 9 0 480 480 428 S 0.0 0.4 0:00 0 agetty
702 root 9 0 480 480 428 S 0.0 0.4 0:00 0 agetty
703 root 9 0 480 480 428 S 0.0 0.4 0:00 0 agetty
846 root 11 0 984 984 812 R 0.0 0.8 0:00 0 top
 
Old 07-14-2004, 04:17 PM   #2
rgiggs
Member
 
Registered: Apr 2004
Location: berkeley, ca
Distribution: slk10, winxp
Posts: 313

Rep: Reputation: 30
i think it's because of the way linux manages memory using the slab allocator. it doesn't release the memory for objects simply because the program say free. the allocator keeps those objects around in case they will be needed again (and because these objects are not used by programs, they are not included in the 9% in your case). i guess that's why after logging out of kde, when i log back in, it loads probably 40% faster.

Last edited by rgiggs; 07-14-2004 at 04:20 PM.
 
Old 07-14-2004, 05:02 PM   #3
djbanaan
Member
 
Registered: Aug 2003
Location: Haarlem, The Netherlands
Distribution: Slackware, FreeBSD
Posts: 178

Rep: Reputation: 30
If you look at the output of "free" or do a "cat /proc/meminfo" you'll see a value for "cached". This is what rgiggs is referring to. This cached memory is actually available to the system when needed, so you can count it as "free" memory.

Last edited by djbanaan; 07-15-2004 at 06:33 AM.
 
Old 07-15-2004, 02:57 AM   #4
muhkuhmasta
LQ Newbie
 
Registered: Jul 2004
Posts: 24

Original Poster
Rep: Reputation: 15
Cool

mmkay... it's somewhat like the TSRs back in dos, isn't it?
 
Old 07-15-2004, 03:08 AM   #5
djbanaan
Member
 
Registered: Aug 2003
Location: Haarlem, The Netherlands
Distribution: Slackware, FreeBSD
Posts: 178

Rep: Reputation: 30
If you say so...

I wouldn't know really...
 
Old 07-15-2004, 05:51 AM   #6
muhkuhmasta
LQ Newbie
 
Registered: Jul 2004
Posts: 24

Original Poster
Rep: Reputation: 15
Terminate and Stay Resident. So it can be loaded quicker next time.

Last edited by muhkuhmasta; 07-15-2004 at 05:55 AM.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
process memory consumption ilnli Linux - General 4 09-08-2005 07:13 PM
Tips on reducing memory consumption Boyer Linux - Software 13 01-17-2005 03:20 PM
Determine process memory consumption ? shayer009 Linux - General 1 10-28-2004 02:03 PM
high memory consumption and slow speed ryancw Linux - Newbie 1 03-24-2004 09:10 PM
gnome: huge memory consumption s56vpe Linux - Newbie 5 01-18-2004 07:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:03 AM.

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