From owner-freebsd-questions@FreeBSD.ORG Sat Apr 19 20:02:04 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 62789106564A for ; Sat, 19 Apr 2008 20:02:04 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.230]) by mx1.freebsd.org (Postfix) with ESMTP id 2E09D8FC1F for ; Sat, 19 Apr 2008 20:02:04 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: by rv-out-0506.google.com with SMTP id b25so747714rvf.43 for ; Sat, 19 Apr 2008 13:02:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=wM5YrN8kH5nkNlrMDaxIcn9Of/J+B3Rd2qlig38ejfI=; b=jdje6p9wK4KBJTlnRql0GnIFcliV8d439gpBCyWStf+MKKrMTSTurw1Jp/MQiems3YmCbiBUpdkpG0uWvccszmTWMP10CeTduKSa7CtZN2ZFK/IPBN9kHEyIF4Z9LjhejOBzsRnfo4ouUaS5iUMMQF34yyvs4A+jks5h2aBBXEA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=klzhvFCLbU11pGuJivFH64mUpDjejcucc6+39t7pmF8EzkfJfPS481sEQE4dFGznq5htFjegi67AAu4boRhwNxWauf7jab0Wac9ANrHt5D1zYfvVlsWX8Az/HpJYI8mCmsrXAcUtyyPVYOwflVGQ/f08S/sEHf/UBlTfetsNGeM= Received: by 10.141.5.3 with SMTP id h3mr632075rvi.138.1208635322300; Sat, 19 Apr 2008 13:02:02 -0700 (PDT) Received: by 10.141.212.1 with HTTP; Sat, 19 Apr 2008 13:02:02 -0700 (PDT) Message-ID: <9bbcef730804191302t31eaf472s1b7e64fe5915b9b1@mail.gmail.com> Date: Sat, 19 Apr 2008 22:02:02 +0200 From: "Ivan Voras" Sender: ivoras@gmail.com To: Mel In-Reply-To: <200804192005.06962.fbsd.questions@rachie.is-a-geek.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <790871.1688.qm@web57004.mail.re3.yahoo.com> <9bbcef730804180840y77adff73x7ad0cf90c82633a9@mail.gmail.com> <200804192005.06962.fbsd.questions@rachie.is-a-geek.net> X-Google-Sender-Auth: 891c14e2ac7571aa Cc: freebsd-questions@freebsd.org Subject: Re: Sidetracked: why gjournal over soft-updates (Was: Re: UFS2 Journaling implementation detail) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Apr 2008 20:02:04 -0000 2008/4/19 Mel : > On Friday 18 April 2008 17:40:04 Ivan Voras wrote: > > > > 5. "Some UFS implementations avoid journaling and > > > instead implement soft updates: they order their > > > writes in such a way that the on-disk file system is > > > never inconsistent, or that the only inconsistency > > > that can be created in the event of a crash is a > > > storage leak. To recover from these leaks, the free > > > space map is reconciled against a full walk of the > > > file system at next mount." - > > > (http://en.wikipedia.org/wiki/Journaling_file_system) > > > > > > So the disadvantage of Soft Update is it is necessary > > > to run fsck after reboot in event of a crash or power > > > failure? > > > > Yes. The advantage is that practically, the data is as safe as with > > journalling. > > I've been following this with interest, however it's still not clear to me, > why I'd want a journaling filesystem, because: > 1) If you have soft-updates the data is as safe as with journal > 2) If you have soft-updates fsck will run in the background > 3) Soft-updates don't require diskspace. > > So...other then "journaling filesystems are cool", what's the real advantage? gjournal is a kind of hack and it's only usable for avoiding fscks. It's actually slower than softupdates for high-demand disk loads. "Real" journalling file systems would have the following benefits, as replies to the points from your post: 1) Soft-updates were created in a different time, with different requirements than modern hard drives (especially desktop hard drives) can deliver. Especially, SU requires that data it once sends to the drive gets written immediately, not cached by the drive. Modern desktop drives don't do that so journaling is today actually safer than SU (because it requires smaller, compact data to be written to the journal, instead of scattered bits of data across the disk drive like SU does). There are reasons why there's only one single soft-updates file system in existence today while there are dozens of journaled file systems. Soft-updates is infinitely better than nothing, but at the very least it needs to be seriously updated to be useful for professional purposes today. 2) Background fsck is considered unsafe by many high-end users of FreeBSD, especially with large drives (many terabytes). One of the reasons for that is because it relies on file system snapshots which have in the past behaved quirky. Another reason to avoid background fsck-s is that some applications require all their disk IO bandwith immediately on boot, and background fsck may "steal" the bandwidth while it's running. On the other hand, for desktop-sized drives and low-demanding purposes, background fsck works ok. 3) "Real" journalling file systems have journals sized in the order of dozens of megabytes (e.g. 10 MB - 50 MB) because they don't need to journal every single IO operation like gjournal does. You'll agree that those sizes are trivial for todays drives. For details, you can search the mailing list archives - what I've said is nothing original and the topic has been talked about a lot.