Re: Overscheduling DOES happen with high web server load.

Dean Gaudet (dgaudet-list-linux-kernel@arctic.org)
Thu, 6 May 1999 09:51:23 -0700 (PDT)


On Thu, 6 May 1999, Phillip Ezolt wrote:

> Dean,
> > As shipped, apache-1.3.6 on linux uses fcntl() file locking to prevent
> > more than one process from being inside accept(). I'm not sure if the dec
> > folks have rebuilt the server with -DSINGLE_LISTEN_UNSERIALIZED_ACCEPT...
> > if they have, then there's no protection around accept() in servers
> > listening on a single port.
>
> Apache was built with the following flags:
> (-DSINGLE_LIST_UNSERIALIZED_ACCEPT is not amoung them. )
>
> ./configure --prefix=/usr --libexecdir=/usr/lib/apache --sysconfdir=/etc/httpd/conf --datadir=/home/httpd --includedir=/usr/include/apache --logfiledir=/var/log/httpd --localstatedir=/var --runtimedir=/var/run --proxycachedir=/var/cache/httpd --enable-m
> odule=all --enable-shared=max --disable-rule=WANTHSREGEX
>
> Would it be better to build with -DSINGLE_LISTEN_UNSERIALIZED_ACCEPT? Is
> this something that would help or hurt the "thundering herd" problem?

The mindcraft folks did build with -DSINGLE_LISTEN_UNSERIALIZED_ACCEPT
(you stick it into the CFLAGS environment variable before invoking
./configure). My guess is that you'll see the same results.

I suspect that with accept() or fcntl() we'll need an option to enable the
wake_one() behaviour -- otherwise it's a pain to deal with process
priorities and such. Essentially a flag which says "all processes waiting
on this are of equal priority, no matter what their cpu time, when their
last time slice was, blah blah blah". (And then the kernel should wake
the one which went to sleep most recently ;)

Dean

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