From owner-freebsd-current@FreeBSD.ORG Sat Aug 18 21:12:37 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 95C53106564A for ; Sat, 18 Aug 2012 21:12:37 +0000 (UTC) (envelope-from mj@feral.com) Received: from ns1.feral.com (ns1.feral.com [192.67.166.1]) by mx1.freebsd.org (Postfix) with ESMTP id 6A3AC8FC08 for ; Sat, 18 Aug 2012 21:12:37 +0000 (UTC) Received: from [172.16.1.34] (float34.in1.lcl [172.16.1.34]) (authenticated bits=0) by ns1.feral.com (8.14.4/8.14.4) with ESMTP id q7ILCabv037275 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sat, 18 Aug 2012 14:12:36 -0700 (PDT) (envelope-from mj@feral.com) Message-ID: <50300540.9060906@feral.com> Date: Sat, 18 Aug 2012 14:12:32 -0700 From: Matthew Jacob Organization: Feral Software User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: Poul-Henning Kamp References: <6800.1345323911@critter.freebsd.dk> In-Reply-To: <6800.1345323911@critter.freebsd.dk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (ns1.feral.com [192.67.166.1]); Sat, 18 Aug 2012 14:12:36 -0700 (PDT) Cc: freebsd-current@freebsd.org Subject: Re: BUFSIZ = 1024, still ? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Matt Jacob List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Aug 2012 21:12:37 -0000 On 8/18/2012 2:05 PM, Poul-Henning Kamp wrote: > In message <5030033B.4060705@feral.com>, Matthew Jacob writes: >> On 8/18/2012 1:32 PM, Poul-Henning Kamp wrote: >>> Shouldn't we at least increase it to pagesize ? >>> >> What data suggests to you it would be better at pagesize? > The number of system calls to fwrite() a big file ? > > What evidence would there be that it would hurt ? > I am normally not this conservative, but I see this as "why make a change"? If you're concerned about performance, you won't be using fwrite, you'll use O_DIRECT and do your own alignment. But I see your point. One could vaguely argue that a 4K BUFSIZ will put at risk more data on crashes needlessly. One could also vaguely say that the write syscall isn't expensive in and of itself, and that there might be a measurable difference for having to copy 4K (unaligned) than 1K (unaligned) to kernel space for disposition. Wasn't there just a recent discussion about running 1.x binaries? One reason we can do things like that is basic constants don't change very often. I believe the last time I saw BUFSIZ change was from BSD 2.9 to BSD 4.0, but I probably misremember that. If you're going to talk about making a change to defaults, the default MAXPHYS and DLFTPHYS have been undersized for years now.