2000-11-06 17:49:06

by Linus Torvalds

[permalink] [raw]
Subject: Re: [PATCH] Re: Negative scalability by removal of



On Tue, 7 Nov 2000, Andrew Morton wrote:

> Alan Cox wrote:
> >
> > > Even 2.2.x can be fixed to do the wake-one for accept(), if required.
> >
> > Do we really want to retrofit wake_one to 2.2. I know Im not terribly keen to
> > try and backport all the mechanism. I think for 2.2 using the semaphore is a
> > good approach. Its a hack to fix an old OS kernel. For 2.4 its not needed
>
> It's a 16-liner! I'll cheerfully admit that this patch
> may be completely broken, but hey, it's free. I suggest
> that _something_ has to be done for 2.2 now, because
> Apache has switched to unserialised accept().

This is why I'd love to _not_ see silly work-arounds in apache: we
obviously _can_ fix the places where our performance sucks, but only if we
don't have other band-aids hiding the true issues.

For example, with a file-locking apache, we'd have to fix the (noticeably
harder) file locking thing to be wake-one instead, and even then we'd
never be able to do as well as something that gets the same wake-one thing
without the two extra system calls.

The patch looks superficially fine to me, although it does seem to add
another cache-line to the wakeup setup - it migth be worth-while to have
the exclusive state closer. But maybe I just didn't count right.

Linus



2000-11-07 05:24:19

by dean gaudet

[permalink] [raw]
Subject: Re: [PATCH] Re: Negative scalability by removal of

On Mon, 6 Nov 2000, Linus Torvalds wrote:

> This is why I'd love to _not_ see silly work-arounds in apache

hey, maybe it's time for me to repeat something that i'm often quoted as
saying:

apache is about correctness first, and performance second.

i don't think that's silly personally. remember most websites can be
served fine off an anemic 486/33 with one ethernet port tied behind its
back while doing a three legged race with a 6502 up a hill in san
francisco during el nino.

don't let the benchmarks fool ya! it's generally more important that a
server be able to fork perl and parse CGIs fast than it is for it to
accept an extra 1000 conns/s.

apache-1.3.15 defines SINGLE_LISTEN_UNSERIALIZED_ACCEPT on linux 2.2 and
later. dunno when the release date will be... someone go find a security
flaw and it'll push up the release ;) (p.s. and rbb promised to forward
the change into 2.0 and rse said he'd forward the change into mm, all of
which were based off the same code.)

-dean

2000-11-07 05:28:49

by David Miller

[permalink] [raw]
Subject: Re: [PATCH] Re: Negative scalability by removal of

Date: Mon, 6 Nov 2000 21:23:57 -0800 (PST)
From: dean gaudet <[email protected]>

apache is about correctness first, and performance second.

Which is why we say it is "incorrect" for apache to try
and work around kernel performance problems. :-)))

Later,
David S. Miller
[email protected]

2000-11-07 09:27:43

by dean gaudet

[permalink] [raw]
Subject: Re: [PATCH] Re: Negative scalability by removal of

haha, ok! :)

(well i'm sure you know the history, but for others -- that code entered
apache not specifically for linux... but specifically for handling the
many early-to-mid 90s unixes that just plain broke on multiple accept :)

-dean

On Mon, 6 Nov 2000, David S. Miller wrote:

> Date: Mon, 6 Nov 2000 21:23:57 -0800 (PST)
> From: dean gaudet <[email protected]>
>
> apache is about correctness first, and performance second.
>
> Which is why we say it is "incorrect" for apache to try
> and work around kernel performance problems. :-)))
>
> Later,
> David S. Miller
> [email protected]
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> Please read the FAQ at http://www.tux.org/lkml/
>