From owner-freebsd-arch@FreeBSD.ORG Tue May 27 04:25:33 2003 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6292B37B401 for ; Tue, 27 May 2003 04:25:33 -0700 (PDT) Received: from park.rambler.ru (park.rambler.ru [81.19.64.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6ED5443F3F for ; Tue, 27 May 2003 04:25:32 -0700 (PDT) (envelope-from is@rambler-co.ru) Received: from is.park.rambler.ru (is.park.rambler.ru [81.19.64.102]) by park.rambler.ru (8.12.6/8.12.6) with ESMTP id h4RBPVmF015830; Tue, 27 May 2003 15:25:31 +0400 (MSD) Date: Tue, 27 May 2003 15:25:31 +0400 (MSD) From: Igor Sysoev X-Sender: is@is To: Peter Jeremy In-Reply-To: <20030527102806.GC44520@cirb503493.alcatel.com.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: arch@freebsd.org Subject: Re: sendfile(2) SF_NOPUSH flag proposal X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 May 2003 11:25:33 -0000 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). The turing TF_NOPUSH off has almost the same overhead as setsockopt(TCP_NOPUSH, 0) if you need to call tcp_output(tp) inside sendfile(2) and has no overhead at all if you do not need to call it. > At this stage, I would suggest that you need to do better than "the > change is cheap" to justify adding this feature. Can you quantify > the performance benefits, or provide some other justification? My point is not "the cheap change" but "the cheap overhead". Igor Sysoev http://sysoev.ru/en/