From owner-freebsd-performance@FreeBSD.ORG Wed Sep 10 01:36:43 2003 Return-Path: Delivered-To: freebsd-performance@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 67A2A16A4BF for ; Wed, 10 Sep 2003 01:36:43 -0700 (PDT) Received: from stork.mail.pas.earthlink.net (stork.mail.pas.earthlink.net [207.217.120.188]) by mx1.FreeBSD.org (Postfix) with ESMTP id B8FC043F93 for ; Wed, 10 Sep 2003 01:36:42 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from user-2ivfl2g.dialup.mindspring.com ([165.247.212.80] helo=mindspring.com) by stork.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 19x0Su-0003jz-00; Wed, 10 Sep 2003 01:36:41 -0700 Message-ID: <3F5EE252.123E5C9@mindspring.com> Date: Wed, 10 Sep 2003 01:35:30 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Jeff Roberson References: <20030908210307.B12093-100000@mail.chesapeake.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a4dbb293d35a7d14d3d097f7a716944ca5a8438e0f32a48e08350badd9bab72f9c350badd9bab72f9c cc: freebsd-performance@freebsd.org cc: "Jim C. Nasby" Subject: Re: Best disk caching method (and PGSQL performance) X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2003 08:36:43 -0000 Jeff Roberson wrote: > On Fri, 5 Sep 2003, Terry Lambert wrote: > > And as the comments point out, it lacks the introspection to > > know dirty pages from clean ones, so all pages that are in > > core and associated with the object are written, not just > > the dirty ones. Avoid this, if possible. > > This is not accurate at all. Please see vfs_subr.c's vop_stdfsync(). We > walk the dirty block head and flush those buffers that are dirty. Sorry, you're absolutely right! It's msync which sucks because it ignores the start address and length arguments, not fsync. The reason fsync sucks is that it lacks start location and end arguments. So you end up writing out everything with both of them, even when all you want is to write one page of a 1G file. -- Terry