LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Slackware Linux RAM/Memory Issues (https://www.linuxquestions.org/questions/slackware-14/slackware-linux-ram-memory-issues-327047/)

Darvocet 05-25-2005 01:57 PM

Slackware Linux RAM/Memory Issues
 
Hey guys I had a quick question for you experts and hopefully you can help me out. I run Slackware 10.1 as a router running numerous servers for my LAN. I have noticed lately that the machine seems to be running low on RAM. The wierd thing is that when there is a fresh boot the RAM is fine, it has a total of 300mb is a Athlon 1.4.

Top (After 22 hours up, sorted by memory)

top - 13:53:53 up 22:51, 1 user, load average: 0.00, 0.00, 0.00
Tasks: 37 total, 1 running, 36 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.0% user, 0.0% system, 0.0% nice, 100.0% idle
Mem: 304836k total, 301188k used, 3648k free, 34184k buffers
Swap: 506036k total, 0k used, 506036k free, 93344k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
146 nobody 10 0 5516 5512 3192 S 0.0 1.8 0:00.69 httpd
147 nobody 9 0 3284 3280 3144 S 0.0 1.1 0:00.01 httpd
933 nobody 9 0 3148 3148 3068 S 0.0 1.0 0:00.00 httpd
943 nobody 10 0 3148 3148 3068 S 0.0 1.0 0:00.00 httpd
148 nobody 9 0 3136 3136 3048 S 0.0 1.0 0:00.00 httpd
145 root 10 0 3116 3116 3048 S 0.0 1.0 0:00.03 httpd
150 root 9 0 2424 2424 2256 S 0.0 0.8 0:00.03 smbd
152 root 9 0 2408 2408 2240 S 0.0 0.8 0:00.00 smbd
158 nobody 8 0 1904 1904 1376 S 0.0 0.6 0:00.00 proftpd
121 root 9 0 1876 1876 1332 S 0.0 0.6 0:00.08 named
944 root 11 0 1744 1740 1588 S 0.0 0.6 0:00.02 sshd
946 darvocet 13 0 1708 1708 1556 S 0.0 0.6 0:00.02 sshd
947 darvocet 14 0 1620 1620 1176 S 0.0 0.5 0:00.02 bash
959 root 18 0 1560 1560 1104 S 0.0 0.5 0:00.02 bash
118 root 10 0 1500 1500 1244 S 0.0 0.5 0:00.27 sshd
153 root 9 0 1440 1440 1068 S 0.0 0.5 0:00.03 nmbd

I have tried killing HTTPD and it doesnt seem to help the memory issue. Lowers it about 5mb but thats it.


Top (After a reboot)

top - 13:56:10 up 0 min, 1 user, load average: 0.23, 0.07, 0.02
Tasks: 35 total, 1 running, 34 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.0% user, 0.0% system, 0.0% nice, 100.0% idle
Mem: 304836k total, 69804k used, 235032k free, 3452k buffers
Swap: 506036k total, 0k used, 506036k free, 50824k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
149 nobody 9 0 3136 3136 3056 S 0.0 1.0 0:00.00 httpd
150 nobody 9 0 3136 3136 3056 S 0.0 1.0 0:00.00 httpd
151 nobody 9 0 3136 3136 3056 S 0.0 1.0 0:00.00 httpd
148 root 9 0 3116 3116 3028 S 0.0 1.0 0:00.03 httpd
153 root 9 0 2424 2424 2272 S 0.0 0.8 0:00.00 smbd
155 root 9 0 2408 2408 2256 S 0.0 0.8 0:00.00 smbd
161 nobody 9 0 1892 1892 1368 S 0.0 0.6 0:00.00 proftpd
122 root 8 0 1852 1852 1296 S 0.0 0.6 0:00.00 named
131 root 9 0 1744 1740 1588 S 0.0 0.6 0:00.00 sshd
173 darvocet 12 0 1712 1712 1556 S 0.0 0.6 0:00.01 sshd
174 darvocet 11 0 1620 1620 1176 S 0.0 0.5 0:00.02 bash
185 root 17 0 1512 1512 1104 S 0.0 0.5 0:00.01 bash
119 root 9 0 1500 1500 1244 S 0.0 0.5 0:00.11 sshd
156 root 9 0 1448 1448 1076 S 0.0 0.5 0:00.01 nmbd
159 root 9 0 1360 1360 812 S 0.0 0.4 0:00.00 dhcpd
187 root 18 0 1028 1028 824 R 0.3 0.3 0:00.02 top
137 daemon 9 0 664 664 576 S 0.0 0.2 0:00.00 atd


.....................
So it seems like slackware is just leeching the RAM somewhere, and I can't find where it's going. I try to have it set to not load programs that I do not use at boot, so the boot is smooth, and the memory use after a boot looks very good to me. But using 97-99% after 20ish hours of uptime is horriable.

USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 2.5 0.0 588 228 ? S 13:55 0:04 init [3]
root 2 0.0 0.0 0 0 ? S 13:55 0:00 [keventd]
root 3 0.0 0.0 0 0 ? SN 13:55 0:00 [ksoftirqd_CPU0]
root 4 0.0 0.0 0 0 ? S 13:55 0:00 [kswapd]
root 5 0.0 0.0 0 0 ? S 13:55 0:00 [bdflush]
root 6 0.0 0.0 0 0 ? S 13:55 0:00 [kupdated]
root 10 0.0 0.0 0 0 ? S< 13:55 0:00 [mdrecoveryd]
root 64 0.0 0.1 1444 592 ? Ss 13:55 0:00 /usr/sbin/syslogd
root 67 0.0 0.1 1400 448 ? Ss 13:55 0:00 /usr/sbin/klogd -
root 95 0.0 0.1 1424 524 ? Ss 13:55 0:00 /sbin/dhcpcd -d -
root 116 0.0 0.1 1428 516 ? Ss 13:55 0:00 /usr/sbin/inetd
root 119 0.0 0.4 3280 1500 ? Ss 13:55 0:00 /usr/sbin/sshd
root 122 0.0 0.6 3000 1892 ? Ss 13:55 0:00 /usr/sbin/named
root 131 0.0 0.5 5872 1740 ? Ss 13:55 0:00 sshd: darvocet [p
root 135 0.0 0.1 1588 584 ? S 13:55 0:00 /usr/sbin/crond -
daemon 137 0.0 0.2 1596 664 ? Ss 13:55 0:00 /usr/sbin/atd -b
root 153 0.0 0.7 6616 2424 ? Ss 13:55 0:00 /usr/sbin/smbd -D
root 155 0.0 0.7 6616 2408 ? S 13:55 0:00 /usr/sbin/smbd -D
root 156 0.0 0.4 3448 1452 ? Ss 13:55 0:00 /usr/sbin/nmbd -D
root 159 0.0 0.4 2388 1408 ? Ss 13:55 0:00 /usr/sbin/dhcpd e
nobody 161 0.0 0.6 3624 1896 ? Ss 13:55 0:00 proftpd: (accepti
root 167 0.0 0.1 1392 476 tty1 Ss+ 13:55 0:00 /sbin/agetty 3840
root 168 0.0 0.1 1392 476 tty2 Ss+ 13:55 0:00 /sbin/agetty 3840
root 169 0.0 0.1 1392 476 tty3 Ss+ 13:55 0:00 /sbin/agetty 3840
root 170 0.0 0.1 1392 476 tty4 Ss+ 13:55 0:00 /sbin/agetty 3840
root 171 0.0 0.1 1392 476 tty5 Ss+ 13:55 0:00 /sbin/agetty 3840
root 172 0.0 0.1 1392 476 tty6 Ss+ 13:55 0:00 /sbin/agetty 3840
darvocet 173 0.0 0.5 5848 1712 ? S 13:55 0:00 sshd: darvocet@pt
darvocet 174 0.0 0.5 2716 1620 pts/0 Ss 13:55 0:00 -bash
root 185 0.0 0.5 2656 1528 pts/0 S 13:56 0:00 bash
nobody 193 0.0 1.0 4808 3168 ? S 13:58 0:00 /var/www/bin/http
nobody 194 0.0 1.0 4808 3168 ? S 13:58 0:00 /var/www/bin/http
nobody 195 0.0 1.0 4808 3168 ? S 13:58 0:00 /var/www/bin/http
root 197 0.0 0.2 2408 844 pts/0 R+ 13:58 0:00 ps aux

(fresh after boot)

.
.
.

Any help would be much appreciated. Thanks.

win32sux 05-25-2005 02:16 PM

slackware isn't leeching your ram... linux is just keeping a lot of cache in ram to help make things faster... notice how your swap hasn't been touched... if linux needs more memory for some process, it will free-up the cached stuff and let it use that... linux tries to use as much memory as it can for cacheing in order to enhance performance... the ram used for caches will NOT keep your processes from getting the memory they need, since the cache will be freed if needed... this is why your swap usage is still at zero...

just my :twocents:...

Darvocet 05-25-2005 02:19 PM

Quote:

Originally posted by win32sux
linux tries to use as much memory as it can for cacheing in order to enhance performance... the ram used for caches will NOT keep your processes from getting the memory they need, since the cache will be freed if needed... this is why your swap usage is still at zero...
okay i'll buy that, if I can get a verification that this is most likely the problem then I will move on. :) I just want to make sure that the network isnt going to experience any speed/reliability issues because of the system using more ram that normal.

Thanks! Anyone else pretty sure this is the issue?

win32sux 05-25-2005 02:24 PM

Quote:

Originally posted by Darvocet
Thanks! Anyone else pretty sure this is the issue?
yes... just search and you'll see... for example:

http://www.linuxquestions.org/questi...hreadid=317018

jonaskoelker 05-25-2005 02:32 PM

check out the two references given in this thread:
http://www.linuxquestions.org/questi...hreadid=326540

Darvocet 05-25-2005 02:33 PM

I dont know how I missed that post while searching :) THanks! hehe


Darv.

dunric 05-25-2005 03:16 PM

Heh, in top output you posted the proces with most memory consumption takes only 1.8% of total memory :-)
Btw. you are running apache and another numerous servers on a router ? If it's not a SOHO network it's pretty ugly thing (TM) ;-)


All times are GMT -5. The time now is 04:38 PM.