From owner-cvs-ports@FreeBSD.ORG Sat Nov 22 00:34:27 2003 Return-Path: Delivered-To: cvs-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4CEB816A4CE; Sat, 22 Nov 2003 00:34:27 -0800 (PST) Received: from perrin.nxad.com (internal.nxad.com [69.1.70.251]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3F41343FAF; Sat, 22 Nov 2003 00:34:26 -0800 (PST) (envelope-from sean@nxad.com) Received: by perrin.nxad.com (Postfix, from userid 1001) id EE5F221072; Sat, 22 Nov 2003 00:33:40 -0800 (PST) From: Sean Chittenden To: Mike Silbersack Message-ID: <20031122083340.GA30804@perrin.nxad.com> References: <200311141832.hAEIWnpb056798@repoman.freebsd.org> <20031115102127.GA14554@regency.nsu.ru> <20031116121934.B2192@odysseus.silby.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20031116121934.B2192@odysseus.silby.com> X-PGP-Key: finger seanc@FreeBSD.org X-PGP-Fingerprint: 3849 3760 1AFE 7B17 11A0 83A6 DD99 E31F BC84 B341 X-Web-Homepage: http://sean.chittenden.org/ User-Agent: Mutt/1.5.4i cc: Alexey Dokuchaev cc: Mike Silbersack cc: cvs-ports@freebsd.org cc: cvs-all@freebsd.org cc: ports-committers@freebsd.org Subject: Re: cvs commit: ports/www/thttpd/files patch-mmc.c X-BeenThere: cvs-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sat, 22 Nov 2003 08:34:27 -0000 X-Original-Date: Sat, 22 Nov 2003 00:33:40 -0800 X-List-Received-Date: Sat, 22 Nov 2003 08:34:27 -0000 > > BTW, is there any place/docs I can read about pros/cons > > USE_SENDFILE yields me? > > > > Thanks! > > > > ./danfe > > I can give you a quick overview: > > Pros: > > - It's slightly more efficient with system resources. > > Cons: > > - You need to tune sfbufs rather than mbufs, so it requires a bit more > skill to tune at the moment. > - Sendfile is slightly less efficient at sending small files (for now.) > - The thttpd sendfile support is rather experimental right now. > > So, given that thttpd is very efficient without sendfile support > compiled in, it's not worth worrying about using sendfile with it > yet. Once I finish importing some of the DeBox project's changes to > sendfile, then there will be substantial benefits to using sendfile. Also, if you're handling tens of thousands of connections sending different files, sendfile(2) is a HUGE win for reducing the memory footprint of the server. When sending a handful of different files, however, mmap(2) will be the winner until you move to 5.2+. Alan just committed some bits that cache sfbuf's so that there's only one sfbuf for each page of data sent. In versions prior to 5.2, there was more than one sfbuf for the same page of data read off of disk. If you have other questions about sendfile(2), bring them up on the performance@ mailing list and we can discuss them more there. HTH. -sc -- Sean Chittenden