lkml.org 
[lkml]   [2000]   [Aug]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject2.4.0-test6: Bad VM problems / Memory Leak?
After about a day running Linux 2.4.0-test6 on a system with only 32 MB of
ram, bad things started to happen. This is a 'ps' & 'free' snapshot after 1
day of online time and normal use, right before I had to take the system down
because it would be 1 minute in-between shell commands:

USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.0 1048 28 ? S Aug09 0:04 init [3]
root 2 0.0 0.0 0 0 ? SW Aug09 0:59 [kswapd]
root 3 0.0 0.0 0 0 ? SW Aug09 0:00 [kflushd]
root 4 0.0 0.0 0 0 ? SW Aug09 0:00 [kupdate]
root 271 0.0 0.0 1092 0 ? SW Aug09 0:02 syslogd -m 0
root 281 0.0 0.0 1644 0 ? SW Aug09 0:00 klogd
root 296 0.0 0.0 1080 0 ? SW Aug09 0:01 crond
root 311 0.0 0.0 1060 0 ? SW Aug09 0:00 inetd
root 326 0.0 0.0 2524 0 ? SW Aug09 0:13 named
root 336 0.0 0.0 1824 0 ? SW Aug09 0:13 /usr/sbin/sshd
root 352 0.0 4.2 1284 1284 ? SL Aug09 0:00 xntpd -A
root 380 0.0 0.0 2284 0 ? SW Aug09 0:04 sendmail: accepti
root 404 0.0 0.1 1972 44 ? S Aug09 0:00 /usr/local/apache
xfs 482 0.0 0.0 1916 0 ? SW Aug09 0:00 xfs -droppriv -da
root 496 0.0 0.0 1552 0 ? SW Aug09 0:00 xfstt --daemon
winds 533 0.0 0.0 1016 0 ? SW Aug09 0:00 ../bin/wd
winds 536 0.0 1.0 3740 332 ? S Aug09 0:34 ../bin/netmare
frost 542 0.0 0.0 1016 0 ? SW Aug09 0:00 ../bin/wd 4000
frost 543 0.1 2.8 4992 876 ? D Aug09 2:42 ../bin/netmare 40
root 547 0.0 0.0 1016 0 tty3 SW Aug09 0:00 /sbin/mingetty tt
root 548 0.0 0.0 1016 0 tty4 SW Aug09 0:00 /sbin/mingetty tt
root 549 0.0 0.0 1016 0 tty5 SW Aug09 0:00 /sbin/mingetty tt
root 550 0.0 0.0 1016 0 tty6 SW Aug09 0:00 /sbin/mingetty tt
root 551 0.0 0.0 1016 0 tty7 SW Aug09 0:00 /sbin/mingetty tt
root 552 0.0 0.0 1016 0 tty8 SW Aug09 0:00 /sbin/mingetty tt
root 553 0.0 0.0 1016 0 tty9 SW Aug09 0:00 /sbin/mingetty tt
root 554 0.0 0.0 1016 0 tty10 SW Aug09 0:00 /sbin/mingetty tt
root 555 0.0 0.0 1016 0 tty11 SW Aug09 0:00 /sbin/mingetty tt
root 556 0.0 0.0 1016 0 tty12 SW Aug09 0:00 /sbin/mingetty tt
root 557 0.0 0.0 1016 0 tty13 SW Aug09 0:00 /sbin/mingetty tt
root 558 0.0 0.0 1016 0 tty14 SW Aug09 0:00 /sbin/mingetty tt
root 559 0.0 0.0 1016 0 tty15 SW Aug09 0:00 /sbin/mingetty tt
root 560 0.0 0.0 1016 0 tty16 SW Aug09 0:00 /sbin/mingetty tt
root 561 0.0 0.0 1016 0 tty17 SW Aug09 0:00 /sbin/mingetty tt
root 562 0.0 0.0 1016 0 tty18 SW Aug09 0:00 /sbin/mingetty tt
root 563 0.0 0.0 1016 0 tty19 SW Aug09 0:00 /sbin/mingetty tt
root 564 0.0 0.0 1016 0 tty20 SW Aug09 0:00 /sbin/mingetty tt
root 565 0.0 0.0 1016 0 tty21 SW Aug09 0:00 /sbin/mingetty tt
root 566 0.0 0.0 1016 0 tty22 SW Aug09 0:00 /sbin/mingetty tt
root 567 0.0 0.0 1016 0 tty23 SW Aug09 0:00 /sbin/mingetty tt
root 568 0.0 0.0 1016 0 tty24 SW Aug09 0:00 /sbin/mingetty tt
root 598 0.0 0.0 1136 0 ? SW Aug09 0:02 in.telnetd: proxy
root 599 0.0 0.0 2072 0 pts/0 SW Aug09 0:00 login -- balinor
balinor 600 0.0 0.0 1744 0 pts/0 SW Aug09 0:00 -bash
balinor 616 0.0 0.0 1616 0 pts/0 SW Aug09 0:02 tf
root 639 0.0 0.0 1084 0 ttyS1 SW Aug09 0:00 gpm
root 2480 0.0 0.0 1896 0 ? SW Aug09 0:06 SCREEN
zythis 2481 0.0 0.0 1704 0 pts/4 SW Aug09 0:00 /bin/bash
zythis 2484 0.0 0.0 1628 0 pts/4 SW Aug09 0:03 tf
root 2541 0.0 0.0 1852 0 ? SW Aug09 0:01 SCREEN
macro 2542 0.0 0.0 1704 0 pts/6 SW Aug09 0:00 /bin/bash
macro 2550 0.0 0.0 1612 0 pts/6 SW Aug09 0:01 tf
root 2849 0.0 0.9 1908 288 ? S Aug09 0:29 SCREEN tf
frost 2850 0.0 0.0 1828 0 pts/5 S Aug09 0:16 tf
www 3406 0.0 0.0 2020 0 ? SW 01:13 0:01 /usr/local/apache
ftp 3587 0.0 0.0 1792 0 ? SW 07:25 0:16 proftpd: ftp - 21
root 3841 0.0 0.0 2536 0 ? SW 09:50 0:00 /usr/sbin/sshd
gandalf 3842 0.0 0.0 1728 0 pts/3 SW 09:50 0:00 -bash
gandalf 3858 0.0 0.0 1776 0 pts/3 SW 09:50 0:01 tf
www 3880 0.0 0.0 2032 0 ? SW 09:56 0:02 /usr/local/apache
www 3886 0.0 0.0 1996 0 ? SW 09:59 0:03 /usr/local/apache
www 4095 0.0 0.0 1996 0 ? SW 10:44 0:00 /usr/local/apache
www 4096 0.0 0.0 2032 0 ? SW 10:44 0:01 /usr/local/apache
www 4145 0.0 0.0 2032 0 ? SW 11:08 0:00 /usr/local/apache
root 4177 0.0 0.0 1964 0 ? SW 11:10 0:00 SCREEN -R
arren 4178 0.0 0.0 1744 0 pts/7 SW 11:10 0:00 /bin/bash
arren 4181 0.0 0.0 1528 0 pts/7 SW 11:11 0:00 tf
root 4874 0.0 0.0 1016 0 tty2 SW 12:59 0:00 /sbin/mingetty tt
root 5607 0.0 0.0 2064 0 tty1 SW 13:16 0:00 login -- root
www 5767 0.0 0.0 1984 0 ? SW 14:11 0:00 /usr/local/apache
root 5845 0.0 0.4 2616 132 ? S 14:55 0:01 /usr/sbin/sshd
frost 5846 0.0 0.0 1728 0 pts/1 SW 14:55 0:00 -bash
frost 5862 0.0 0.2 1768 64 pts/1 S 14:56 0:00 screen -r
www 5907 0.0 0.0 1996 0 ? SW 15:16 0:00 /usr/local/apache
www 5915 0.0 0.0 1984 0 ? SW 15:20 0:00 /usr/local/apache
root 5967 0.1 0.2 1744 68 tty1 S 15:35 0:00 -bash
root 5993 18.0 1.7 2304 540 tty1 R 15:38 0:00 ps -aux

total used free shared buffers cached
Mem: 30496 28644 1852 0 164 4916
-/+ buffers/cache: 23564 6932
Swap: 64248 16260 47988

--
Now looking at the RSS of each item in the list, that to me clearly does not
add up to the 23564 Kb used at the moment. Also, if there's 6 MB of ram free,
why doesn't the kernel take advantage of that rather than try to constantly
swap programs out to disk? I'd figure Sure, there should be a cutoff point for
RAM going to disk to conserve space for caching, but when the system is this
slow there should be a time when the kernel should just drop cache space and
let it get used for programs. Now of course, this could also be a direct
result of the memory problem that I am experiencing right now.

After reboot, the ps list looked normal and programs were fast again:

USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 9.1 1.6 1048 488 ? S 15:42 0:04 init [3]
root 2 0.1 0.0 0 0 ? RW 15:42 0:00 [kswapd]
root 3 0.0 0.0 0 0 ? SW 15:42 0:00 [kflushd]
root 4 0.0 0.0 0 0 ? SW 15:42 0:00 [kupdate]
root 272 0.2 1.7 1092 532 ? S 15:42 0:00 syslogd -m 0
root 282 0.0 1.6 1092 496 ? S 15:42 0:00 klogd
root 297 0.0 1.8 1080 552 ? S 15:42 0:00 crond
root 312 0.0 1.5 1060 476 ? S 15:42 0:00 inetd
root 327 0.2 4.3 2264 1316 ? S 15:42 0:00 named
root 337 4.6 2.7 1820 852 ? S 15:42 0:01 /usr/sbin/sshd
root 353 0.1 4.2 1284 1284 ? SL 15:42 0:00 xntpd -A
root 381 0.0 3.4 2284 1048 ? S 15:42 0:00 sendmail: accepti
root 405 0.1 3.0 1972 928 ? S 15:42 0:00 /usr/local/apache
www 411 0.0 3.0 1984 928 ? S 15:42 0:00 /usr/local/apache
www 412 0.0 3.0 1984 928 ? S 15:42 0:00 /usr/local/apache
www 413 0.0 3.0 1984 928 ? S 15:42 0:00 /usr/local/apache
www 414 0.0 3.0 1984 928 ? S 15:42 0:00 /usr/local/apache
www 415 0.0 3.0 1984 928 ? S 15:42 0:00 /usr/local/apache
xfs 483 0.5 3.1 1916 952 ? S 15:42 0:00 xfs -droppriv -da
root 495 0.2 2.2 1552 676 ? S 15:42 0:00 xfstt --daemon
winds 534 0.0 1.3 1016 408 ? S 15:42 0:00 ../bin/wd
winds 537 3.8 8.3 3636 2552 ? S 15:42 0:00 ../bin/netmare
frost 543 0.0 1.3 1016 408 ? S 15:42 0:00 ../bin/wd 4000
root 546 0.4 3.6 2064 1100 tty1 S 15:42 0:00 login -- root
root 547 0.0 1.3 1016 400 tty2 S 15:42 0:00 /sbin/mingetty tt
root 548 0.0 1.3 1016 400 tty3 S 15:42 0:00 /sbin/mingetty tt
root 549 0.0 1.3 1016 400 tty4 S 15:42 0:00 /sbin/mingetty tt
frost 550 7.0 12.6 4856 3844 ? S 15:42 0:01 ../bin/netmare 40
root 552 0.0 1.3 1016 400 tty5 S 15:42 0:00 /sbin/mingetty tt
root 553 0.0 1.3 1016 400 tty6 S 15:42 0:00 /sbin/mingetty tt
root 554 0.0 1.3 1016 400 tty7 S 15:42 0:00 /sbin/mingetty tt
root 555 0.0 1.3 1016 400 tty8 S 15:42 0:00 /sbin/mingetty tt
root 556 0.0 1.3 1016 400 tty9 S 15:42 0:00 /sbin/mingetty tt
root 557 0.0 1.3 1016 400 tty10 S 15:42 0:00 /sbin/mingetty tt
root 558 0.0 1.3 1016 400 tty11 S 15:42 0:00 /sbin/mingetty tt
root 559 0.0 1.3 1016 400 tty12 S 15:42 0:00 /sbin/mingetty tt
root 560 0.0 1.3 1016 400 tty13 S 15:42 0:00 /sbin/mingetty tt
root 561 0.0 1.3 1016 400 tty14 S 15:42 0:00 /sbin/mingetty tt
root 562 0.0 1.3 1016 400 tty15 S 15:42 0:00 /sbin/mingetty tt
root 563 0.0 1.3 1016 400 tty16 S 15:42 0:00 /sbin/mingetty tt
root 564 0.0 1.3 1016 400 tty17 S 15:42 0:00 /sbin/mingetty tt
root 565 0.0 1.3 1016 400 tty18 S 15:42 0:00 /sbin/mingetty tt
root 566 0.0 1.3 1016 400 tty19 S 15:42 0:00 /sbin/mingetty tt
root 567 0.0 1.3 1016 400 tty20 S 15:42 0:00 /sbin/mingetty tt
root 568 0.0 1.3 1016 400 tty21 S 15:42 0:00 /sbin/mingetty tt
root 569 0.0 1.3 1016 400 tty22 S 15:42 0:00 /sbin/mingetty tt
root 570 0.0 1.3 1016 400 tty23 S 15:42 0:00 /sbin/mingetty tt
root 571 0.0 1.3 1016 400 tty24 S 15:42 0:00 /sbin/mingetty tt
root 584 0.0 1.7 1084 520 ttyS1 S 15:42 0:00 gpm
root 590 0.8 3.4 1740 1064 tty1 S 15:42 0:00 -bash
root 610 5.5 3.7 2512 1144 ? S 15:43 0:00 /usr/sbin/sshd
root 611 0.0 2.3 2272 724 tty1 R 15:43 0:00 ps -aux

total used free shared buffers cached
Mem: 30496 29028 1468 0 560 10744
-/+ buffers/cache: 17724 12772
Swap: 64248 68 64180

And there has been no problem since the 3-4 people that were on the machine
prior to reboot have just logged on again and restarted their processes.

I think this is a serious issue that should be regarded before 2.4 is
finalized, especially in cases of low amounts of memory and a tradeoff between
cache and swap.

--
Byron Stanoszek Ph: (330) 644-3059
Systems Programmer Fax: (330) 644-8110
Commercial Timesharing Inc. Email: bstanoszek@comtime.com


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:58    [W:1.832 / U:0.812 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site