From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 10 18:24:07 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3F44916A4BF; Wed, 10 Sep 2003 18:24:07 -0700 (PDT) Received: from smtp6.andrew.cmu.edu (SMTP6.andrew.cmu.edu [128.2.10.86]) by mx1.FreeBSD.org (Postfix) with ESMTP id 66FF343F75; Wed, 10 Sep 2003 18:24:06 -0700 (PDT) (envelope-from eno@andrew.cmu.edu) Received: from andrew.cmu.edu (BLISS.PDL.CMU.EDU [128.2.134.47]) (user=eno mech=PLAIN (0 bits))h8B1O4il015479 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT); Wed, 10 Sep 2003 21:24:05 -0400 Message-ID: <3F5FCEB5.9010407@andrew.cmu.edu> Date: Wed, 10 Sep 2003 21:24:05 -0400 From: Eno Thereska User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020529 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org, freebsd-fs@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: flush on close X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Sep 2003 01:24:07 -0000 In FreeBSD 4.4, I am noticing a huge number of calls to ffs_fsync() (in /sys/ufs/ffs/ffs_vnops.c) when running a benchmark like Postmark. ffs_fsync() flushes all dirty buffers with an open file to disk. Normally this function would be called either because the application writer explicitly flushes the file, or if the syncer daemon or buffer daemon decide it's time for the dirty blocks to go to disk. Neither of these two options is happening. Files are opened and closed very frequently though. I have a suspicion that BSD is using the "flush-on-close" semantic. Could someone confirm or reject this claim? If confirmed, I am wondering how to get rid of it... Thanks Eno