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 |
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.
|
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.
|
mmkay... it's somewhat like the TSRs back in dos, isn't it?
|
If you say so... :D
I wouldn't know really... |
Terminate and Stay Resident. So it can be loaded quicker next time.
|
All times are GMT -5. The time now is 11:11 AM. |