Re: File-descriptors - large quantities

Michael O'Reilly (michael@metal.iinet.net.au)
Tue, 14 Jul 1998 09:01:41 +0800


In message <199807131400.PAA06491@dax.dcs.ed.ac.uk>, "Stephen C. Tweedie" write
s:
> Hi Michael,
>
> On Fri, 10 Jul 1998 09:32:25 +0800, "Michael O'Reilly"
> <michael@metal.iinet.net.au> said:
> > For single process (i.e. can only have one request in the disk queue
> > at a time), on 10ms disks (say), and a HUGE ram cache (~ 1.5% of disk
> > space), you'd be able to cache all the metadata, so you're on a single
> > seek to read/write data (say). This gives you a maximum connection
> > rate of
> > max_rate == disk_IOs_per_second * 1.5
> > as around 66% of all requests will require disk access.
>
> This is very simplistic. For a start, a lot of the requests which
> require disk access will be doing disk writes, not reads, so the extra
> concurrency can be obtained in the kernel using write-behind caching.

You'll note that I ignored writes completely. Taking writes in account
makes the numbers worse (because you won't be able to use 100% of seek
time for reads).

> > So for 5 second connection length (that's worse than measured in
> > australia on terrible links with 500ms RTTs),
>
> It's not the typical service time which kills you: it's the connections
> which, due to any number of possible reasons, take unusually long to
> complete which fill the queue.

That's right, which why you have an average 5 second long
conection. Most connections @ 600ms, some going to 80 mins. Average
length: 5 seconds.

It doesn't actually matter what the shape of the distribution is, only
what the average is. (sorry, I thought I had made it clear that that 5
seconds was the average connection lifetime).

> I'm not disputing the need for threaded disk IO in the proxy. The fact
> is, however, that improving select() and get_fd() performance in the
> kernel, these folk measured a real-life throughput improvement of up to
> 58% on their instrumented servers.
>
> In short, just because some services create an artificial internal
> bottleneck by single-threading their disk IO, doesn't get away from the
> fact that kernel select() performance simply doesn't scale right now.

Not arguing with that at all. I was just pointing out that with
squid1.1 running a large cache there's not point in bashing the kernel
because the disks simply can't keep up anyway. I.e. you max out the
disks long before you come close to maxing out CPU or file
descriptors.

Michael.

-
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.altern.org/andrebalsa/doc/lkml-faq.html