From owner-freebsd-current Sun Aug 22 12: 6:52 1999 Delivered-To: freebsd-current@freebsd.org Received: from alpo.whistle.com (alpo.whistle.com [207.76.204.38]) by hub.freebsd.org (Postfix) with ESMTP id 2604814D60 for ; Sun, 22 Aug 1999 12:06:49 -0700 (PDT) (envelope-from julian@whistle.com) Received: from current1.whistle.com (current1.whistle.com [207.76.205.22]) by alpo.whistle.com (8.9.1a/8.9.1) with SMTP id LAA71413; Sun, 22 Aug 1999 11:31:03 -0700 (PDT) Date: Sun, 22 Aug 1999 11:32:38 -0700 (PDT) From: Julian Elischer To: Maxim Sobolev Cc: current@FreeBSD.org Subject: Re: Sync(8) doesn't have any effect on softupdates-enabled filesystem In-Reply-To: <37BFD2E4.370EA4A4@altavista.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sun, 22 Aug 1999, Maxim Sobolev wrote: > I do not know if it is bug or feature, but it seems that sync(8) command > doesn't really flushing write buffers for softdep enabled f/s. IMHO this > behavior is not very friendly for the notebooks and ATX owners because > before putting computer into sleep mode OS preferably should try to > write as many as possible unflushed buffers to disk (see > /etc/rc.suspend). Following is simple showcase for above described > (mis)behaviour: If you do 3 sync's WITH sleep (1) you should start to see the freeing of space. Each sync will flush out one layer on the dependency tree. The freeing of blocks is dependent on two other dependecies happenning first. Sync tells the filesystem to flush all it can at this time... things that have unsatisfied dependencies cannot happen. so try adding some sleeps. > > bash-2.03# mount ; df; dd if=/dev/zero of=bigfile bs=1m count=50 ; df ; > rm bigfile; sync;sync;sync ; sleep 5; df > /dev/wd0s2a on / (local, noatime, soft-updates, writes: sync 3 async > 913) > procfs on /proc (local) > Filesystem 1K-blocks Used Avail Capacity Mounted on > /dev/wd0s2a 908319 538529 297125 64% / > procfs 4 4 0 100% /proc > 50+0 records in > 50+0 records out > 52428800 bytes transferred in 10.366562 secs (5057492 bytes/sec) > Filesystem 1K-blocks Used Avail Capacity Mounted on > /dev/wd0s2a 908319 590217 245437 71% / > procfs 4 4 0 100% /proc > Filesystem 1K-blocks Used Avail Capacity Mounted on > /dev/wd0s2a 908319 589769 245885 71% / > procfs 4 4 0 100% /proc > > Any comments? > > Sincerely, > > Maxim > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-current" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message