Re: BUFSIZ = 1024, still ?

看板FB_current作者時間13年前 (2012/08/19 05:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串4/12 (看更多)
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. _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
文章代碼(AID): #1GC0dIRq (FB_current)
討論串 (同標題文章)
文章代碼(AID): #1GC0dIRq (FB_current)