Re: and nicer too - Re: [PATCH] epoll more scalable than poll

From: Dan Kegel (dank@kegel.com)
Date: Fri Nov 01 2002 - 13:41:30 EST


Davide Libenzi wrote:
> On Fri, 1 Nov 2002, Dan Kegel wrote:
>
>>Davide Libenzi wrote:
>>
>>>>Do you avoid the cost of epoll_ctl() per new fd?
>>>
>>>Jamie, the cost of epoll_ctl(2) is minimal/zero compared with the average
>>>life of a connection.
>>
>>Depends on the workload. Where I work, the http client I'm writing
>>has to perform extremely well even on 1 byte files with HTTP 1.0.
>>Minimizing system calls is suprisingly important - even
>>a gettimeofday hurts.
>
> Dan, is it _one_ gettimeofday() or a gettimeofday() inside a loop ?
> gettimeofday() is of the order of few microseconds ... and If your clients
> works with anything alse than a loopback, few microseconds shouldn't weigh
> in much compared to connect/send/recv/close on a network connection. It is
> not much the fact that you transfer one byte, it's the whole TCP handshake
> cost that weighs in.

The scenario is: we're doing load testing of http products,
and for various reasons, we want line-rate traffic with
the smallest possible message size. i.e. we want the
maximum number of HTTP requests/responses per second.
Hence the 1 byte payloads. A single system call on the
slowish embedded processor I'm using has a suprisingly large
impact on the number of http gets per second I can do.
A 1% increase in speed is worth it for me!

So please do try to reduce the number of syscalls needed
to handle very short TCP sessions, if possible.

- Dan

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Nov 07 2002 - 22:00:21 EST