Re: pre-2.0.32-2 + this patch works for me

Philippe Strauss (philou@sicel-home-1-4.urbanet.ch)
Sun, 15 Jun 1997 23:59:35 +0200


On Jun 15, Gerard Roudier wrote
>
> David,
>
> I've added to your patch some very simple changes that seem to me
> enough to fix 2.0.30 memory problems.
> Using this patch, I've been unable to break the kernel doing heavy
> disk IOs, with mem=4M and a swap partition.
> I did'nt try other kernel services that can be affected by this changes.
>
> In my opinion, the behaviour of linux under memory stress is very
> different using this patch and may trigger problems in some other kernel
> services I did'nt use in my tests.
>
> As I wrote in my previous mails about this topic, I think it was the
> buffer headers allocation strategy that should be improved and a new gfp
> level seemed to me necessary.
[snip]

Hi,

This is by far the best fix I'have tried yet. I can do a badblocks -w on
a 800MB with my 32MB RAM machine without hanging. The system is far from
responsive, but at least it won't hang with this patch applied.

badblocks is running while I'm typing this message. A lot of processes
have been paged on disk, but I'm able to startx after starting badblocks
(xprocmeter is showing interesting graphs, 22MB buffer mem, a sawtooth curve
for the paging (100/sec peek, 50/sec low), 15% cpu-sys, 20% cpu-total) but
it works rather well compared to the others patches.

Here's some output that may be of interest:

total used free shared buffers cached
Mem: 30984 30716 268 3356 19660 2456
-/+ buffers: 8600 22384
Swap: 68536 7540 60996

Free pages: 264kB
( 2*4kB 0*8kB 0*16kB 2*32kB 1*64kB 1*128kB = 264kB)
Swap cache: add 2747/2747, delete 638507/1098, find 10233/1626
Free swap: 60524kB
8192 pages of RAM
94 free pages
446 reserved pages
573 pages shared
Buffer memory: 21188kB
Buffer heads: 21220
Buffer blocks: 21188
LOCKED: 8523 buffers, 25 used (last=25), 6588 locked, 0 protected, 0 dirty
DIRTY: 12616 buffers, 2 used (last=2), 1 locked, 0 protected, 12616 dirty

USER PID %CPU %MEM VSZ RSS TT STAT START TIME COMMAND
daemon 123 0.0 0.0 828 0 ? SW 23:34 0:00 rpc.portmap
daemon 183 0.0 0.0 856 0 ? SW 23:34 0:00 atd
philou 203 0.0 0.0 1636 0 1 SW 23:34 0:00 bash
philou 208 0.0 0.0 1636 0 6 SW 23:34 0:00 bash
philou 234 0.1 0.0 1748 4 1 S 23:40 0:01 mutt
philou 237 0.0 0.0 1540 0 6 SW 23:41 0:00 startx
philou 240 0.0 0.0 1936 28 6 S 23:41 0:00 xinit
philou 244 0.0 0.5 1764 168 6 S 23:41 0:00 /usr/X11R6/bin/afte
philou 257 0.0 0.0 792 0 6 SW 23:42 0:00 Auto
philou 258 0.0 0.1 1692 40 6 S 23:42 0:00 Wharf
philou 263 0.0 0.0 1516 16 6 S 23:42 0:00 Pager
philou 264 0.9 0.7 2012 224 6 S 23:42 0:07 asmail
philou 265 0.0 1.1 2460 364 6 S 23:42 0:00 xload -nolabel -bg
philou 266 0.0 0.4 1592 128 6 S 23:42 0:00 asclock -nolabel -s
philou 268 0.5 1.2 2392 380 6 S 23:42 0:04 procmeter -geometry
philou 269 0.1 1.6 2984 504 1 S 23:43 0:00 vi /tmp/mutt.lili.2
philou 275 0.0 2.1 1532 668 1 S 23:55 0:00 /bin/bash -c (ps au
philou 276 0.0 1.3 976 424 1 R 23:55 0:00 ps aux
proxy 152 0.1 1.3 2464 432 ? S 23:34 0:01 squid -D -s -f /etc
proxy 153 0.0 0.0 840 0 ? SW 23:34 0:00 dnsserver
proxy 154 0.0 0.0 840 0 ? SW 23:34 0:00 dnsserver
proxy 155 0.0 0.0 840 0 ? SW 23:34 0:00 dnsserver
proxy 156 0.0 0.0 840 0 ? SW 23:34 0:00 dnsserver
proxy 157 0.0 0.0 840 0 ? SW 23:34 0:00 dnsserver
proxy 158 0.0 0.0 928 0 ? SW 23:34 0:00 ftpget
proxy 159 0.0 0.0 792 0 ? SW 23:34 0:00 unlinkd
qmaill 178 0.0 0.0 816 0 ? SW 23:34 0:00 splogger
qmailq 181 0.0 0.0 808 0 ? SW 23:34 0:00 qmail-clean
qmailr 180 0.0 0.0 812 0 ? SW 23:34 0:00 qmail-rspawn
qmails 175 0.0 0.0 852 0 ? SW 23:34 0:00 qmail-send
root 1 0.1 0.0 816 0 ? SW 23:33 0:01 init
root 2 1.0 0.0 0 0 ? SW 23:33 0:13 kflushd
root 3 0.0 0.0 0 0 ? SW< 23:33 0:00 kswapd
root 9 0.0 0.1 792 44 ? S 23:34 0:01 update
root 29 0.0 0.1 804 36 ? S 23:34 0:00 /sbin/kerneld
root 109 0.0 0.1 836 56 ? S 23:34 0:00 syslogd
root 111 0.0 0.0 948 0 ? SW 23:34 0:00 klogd
root 125 0.0 0.0 812 0 ? SW 23:34 0:00 inetd
root 128 0.0 0.0 1392 0 ? SW 23:34 0:00 named
root 131 0.0 0.0 820 16 S0 S 23:34 0:00 gpm
root 134 0.0 0.0 804 0 ? SW 23:34 0:00 icmplogd
root 139 0.0 0.0 832 0 ? SW 23:34 0:00 lpd
root 147 0.0 0.0 1552 0 ? SW 23:34 0:00 RunCache
root 160 0.0 0.1 876 32 ? S 23:34 0:00 (pinger)
root 163 0.1 0.0 1032 0 ? SW 23:34 0:01 sshd
root 169 0.0 0.5 1052 184 ? S < 23:34 0:00 /usr/sbin/xntpd
root 179 0.0 0.0 812 0 ? SW 23:34 0:00 qmail-lspawn
root 185 0.0 0.0 1060 0 ? SW 23:34 0:00 junkbuster
root 192 0.0 0.2 832 72 ? S 23:34 0:00 /usr/sbin/cron
root 195 0.0 0.6 1084 200 ? S 23:34 0:00 /usr/sbin/apache
root 204 0.0 0.0 808 0 2 SW 23:34 0:00 getty
root 205 0.0 0.0 808 0 3 SW 23:34 0:00 getty
root 206 0.0 0.0 1640 4 4 S 23:34 0:00 bash
root 207 0.0 0.0 1644 0 5 SW 23:34 0:00 bash
root 225 17.0 0.1 872 44 5 D 23:37 3:01 badblocks -w /dev/s
root 235 0.0 0.5 996 180 ? S 23:40 0:00 nmbd
root 241 3.5 6.9 8152 2144 ? S 23:41 0:29 X :0 -bpp 16 -auth
www-data 199 0.0 0.4 1084 128 ? S 23:34 0:00 apache
www-data 200 0.0 0.4 1084 128 ? S 23:34 0:00 apache

--
Philippe Strauss <philou@lili.urbanet.ch>
Urbanet SA, Vallombreuse 51, 1004 Lausanne -- 021 / 625.28.14

Homepage & PGP key: http://lili.urbanet.ch

Never insult an alligator until you've crossed the river.

--