Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 May 2003 21:41:10 +1000
From:      Peter Jeremy <peterjeremy@optushome.com.au>
To:        Igor Sysoev <is@rambler-co.ru>
Cc:        arch@freebsd.org
Subject:   Re: sendfile(2) SF_NOPUSH flag proposal
Message-ID:  <20030527114110.GE44520@cirb503493.alcatel.com.au>
In-Reply-To: <Pine.BSF.4.21.0305271513120.46491-100000@is>
References:  <20030527102806.GC44520@cirb503493.alcatel.com.au> <Pine.BSF.4.21.0305271513120.46491-100000@is>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030527114110.GE44520>