Date: Sat, 18 Aug 2012 14:12:32 -0700 From: Matthew Jacob <mj@feral.com> To: Poul-Henning Kamp <phk@phk.freebsd.dk> Cc: freebsd-current@freebsd.org Subject: Re: BUFSIZ = 1024, still ? Message-ID: <50300540.9060906@feral.com> In-Reply-To: <6800.1345323911@critter.freebsd.dk> References: <6800.1345323911@critter.freebsd.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?50300540.9060906>