Re: buffers vs. pages vs. kernel speed

Philippe Strauss (philou@lili.urbanet.ch)
Wed, 18 Jun 1997 17:32:30 +0200


On Jun 17, Dr. Werner Fink wrote
>
> A few hours ago I wrote:
>
> > Hi Dave,
> >
> > I've added one small change to your patch in __get_free_pages
> > (mm/page_alloc.c):
> > Maybe it's better to handle GFP_BUFFER the same way as GFP_NFS to
> > avoid heavy swapping if a process needs buffer but allow swapping if
> > necessary. This change makes the mouse much more usable.
> >
> > One point I've removed from a previous patch I've made is the skipping
> > of buffer pages if shrink_mmap is called in the case of getting free
> > buffer pages.
> >
> > This patch is against pre-patch-2.0.31-2 and includes your patch.
> >
> > Werner
>
> [ ... patch deleted ...]
>
> There is a typo in the patch above, please try the following one.
>
>
> Werner

Hi.

I've tested your patch. I use badblocks -w since it's the better torture
test I've found on my setup (P5 166 32MB Ram, quiet some server daemon).

First I mke2fs'd this 2GB partition with a 1kB block size.
Got one of this, but the format ended up successfully.

try_to_free_page(3,0,0): FAIL try(shrink_mmap:shm_swap:swap_out) state[o(1):n(1)] stop[o(3):n(3)]

Next: badlocking an empty 2 GB scsi disk leave the system highly responsive.
Maybe too much. Doing a 'watch "ps aux | grep badblocks"', I've seen that
badblocks was spending much of it's time in the D state (uninteruptible sleep).
After 5 minutes of badblocks, i get this ps aux:

USER PID %CPU %MEM VSZ RSS TT STAT START TIME COMMAND
daemon 124 0.0 0.0 828 0 ? SW 22:51 0:00 rpc.portmap
daemon 185 0.0 0.0 856 0 ? SW 22:51 0:00 atd
nobody 191 0.0 0.1 896 56 ? S 22:51 0:00 proftpd (accepting
philou 205 0.0 1.6 1636 500 1 S 22:51 0:00 -bash
philou 1872 0.0 1.3 968 416 1 R 23:19 0:00 ps aux
proxy 151 0.1 1.4 2464 436 ? S 22:51 0:02 squid -D -s -f /etc
proxy 152 0.0 0.0 840 0 ? SW 22:51 0:00 dnsserver
proxy 153 0.0 0.0 840 0 ? SW 22:51 0:00 dnsserver
proxy 154 0.0 0.0 840 0 ? SW 22:51 0:00 dnsserver
proxy 155 0.0 0.0 840 0 ? SW 22:51 0:00 dnsserver
proxy 156 0.0 0.0 840 0 ? SW 22:51 0:00 dnsserver
proxy 157 0.0 0.0 928 0 ? SW 22:51 0:00 ftpget
proxy 158 0.0 0.0 792 0 ? SW 22:51 0:00 unlinkd
qmaild 180 0.0 0.0 904 0 ? SW 22:51 0:00 tcpserver
qmaill 176 0.0 0.0 816 8 ? S 22:51 0:00 splogger
qmailq 179 0.0 0.0 808 4 ? S 22:51 0:00 qmail-clean
qmailr 178 0.0 0.0 812 0 ? SW 22:51 0:00 qmail-rspawn
qmails 174 0.0 0.0 852 12 ? S 22:51 0:00 qmail-send
root 1 0.0 0.0 816 0 ? SW 22:50 0:01 init
root 2 0.2 0.0 0 0 ? SW 22:50 0:04 kflushd
root 3 0.0 0.0 0 0 ? SW< 22:50 0:00 kswapd
root 9 0.0 0.1 792 44 ? S 22:50 0:00 update
root 29 0.0 0.0 804 0 ? SW 22:50 0:00 kerneld
root 110 0.0 0.2 836 80 ? S 22:51 0:00 /sbin/syslogd
root 112 0.0 0.0 948 0 ? SW 22:51 0:00 klogd
root 126 0.0 0.0 812 0 ? SW 22:51 0:00 inetd
root 129 0.0 0.0 1396 20 ? S 22:51 0:00 named
root 132 0.0 0.0 820 0 ? SW 22:51 0:00 gpm
root 135 0.0 0.1 808 56 ? S 22:51 0:00 icmplogd
root 140 0.0 0.0 832 0 ? SW 22:51 0:00 lpd
root 146 0.0 0.0 1552 0 ? SW 22:51 0:00 RunCache
root 159 0.0 0.1 876 40 ? S 22:51 0:00 (pinger)
root 162 0.0 0.0 1032 0 ? SW 22:51 0:01 sshd
root 168 0.0 0.6 1052 200 ? S < 22:51 0:00 /usr/sbin/xntpd
root 177 0.0 0.0 812 12 ? S 22:51 0:00 qmail-lspawn
root 181 0.0 0.0 816 12 ? S 22:51 0:00 splogger
root 187 0.0 0.0 1060 0 ? SW 22:51 0:00 junkbuster
root 194 0.0 0.0 832 16 ? S 22:51 0:00 cron
root 197 0.0 0.6 1084 200 ? S 22:51 0:00 /usr/sbin/apache
root 206 0.0 0.0 808 0 2 SW 22:51 0:00 getty
root 207 0.0 0.0 808 0 3 SW 22:51 0:00 getty
root 208 0.0 1.3 1640 420 4 S 22:51 0:00 -bash
root 209 0.0 1.1 1648 356 5 S 22:51 0:00 -bash
root 210 0.0 0.0 808 0 6 SW 22:51 0:00 getty
root 225 0.0 0.4 996 140 ? S 22:54 0:00 nmbd
www-data 200 0.0 0.4 1084 128 ? S 22:51 0:00 apache
www-data 201 0.0 0.4 1084 128 ? S 22:51 0:00 apache

nothing much stay resident.
It seems that the system is still swapping a lot, but sloooooowly.
I think Gerard patch was better (Actually I'v rebooted with his patch),
despite leaving to much memory that could be used fo buffers on big memory
systems.

Cheers.

--
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.

--