sendfile(2) SF_NOPUSH flag proposal
Peter Jeremy
peterjeremy at optushome.com.au
Tue May 27 04:41:13 PDT 2003
On Tue, May 27, 2003 at 03:25:31PM +0400, Igor Sysoev wrote:
>On Tue, 27 May 2003, Peter Jeremy wrote:
>
>> 2) The new feature provides significant performance benefit. In this
>> case, I believe the overhead of calling setsockopt(2) is negligible
>> so the performance gain would be negligible.
>
>I think the calling setsockopt(TCP_NOPUSH, 1) syscall has huge overhead
>as compared to several C operators inside sendfile(2).
Agreed. But needing another one or two relatively cheap system calls
is negligible compared to the total overhead of accept(), several
select()/poll()/kqueue() calls, several sendfile() calls and a
close(). If you can produce some figures demonstrating that two
setsockopt() syscalls makes a noticable difference to the total cost
of sending a 48K file then your change might be worth considering.
>My point is not "the cheap change" but "the cheap overhead".
Please quantify the improvement amortised over a complete transaction
or connection.
Peter
More information about the freebsd-arch
mailing list