From owner-freebsd-stable@FreeBSD.ORG Wed Jul 20 03:14:35 2005 Return-Path: X-Original-To: freebsd-stable@FreeBSD.org Delivered-To: freebsd-stable@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B1B0516A41F; Wed, 20 Jul 2005 03:14:35 +0000 (GMT) (envelope-from truckman@FreeBSD.org) Received: from gw.catspoiler.org (217-ip-163.nccn.net [209.79.217.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5763F43D53; Wed, 20 Jul 2005 03:14:35 +0000 (GMT) (envelope-from truckman@FreeBSD.org) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.13.3/8.13.3) with ESMTP id j6K3EOrj042431; Tue, 19 Jul 2005 20:14:28 -0700 (PDT) (envelope-from truckman@FreeBSD.org) Message-Id: <200507200314.j6K3EOrj042431@gw.catspoiler.org> Date: Tue, 19 Jul 2005 20:14:24 -0700 (PDT) From: Don Lewis To: mkb@incubus.de In-Reply-To: <20050714195253.GA23666@drjekyll.mkbuelow.net> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii Cc: freebsd-stable@FreeBSD.org, freebsd-questions@FreeBSD.org Subject: Re: dangerous situation with shutdown process X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jul 2005 03:14:35 -0000 On 14 Jul, Matthias Buelow wrote: > Kevin Oberman wrote: > >>> How can I fix it on my system? >> >>SCSI or ATA? If it's ATA, turn off write cache with (atacontrol(8) or >>the sysctl. > > You do NOT want to do that. Not only will performance drop brutally > (example: drop to 1/5th of normal write speed for sequential writes, > probably worse for random writes) but it will also significantly > reduce the lifetime of your disk. Modern disks are designed to be > used with the write-back cache enabled, so don't turn it off. There's not much performance difference with SCSI if write caching is disabled. Typical SCSI drives can handle ~63 outstanding read and write transactions and can sort them into a somewhat optimal order if tagged command queuing is in use. >>The problem is that disks lie about whether they have actually written >>data. If the power goes off before the data is in cache, it's lost. > > No, the problem is that FreeBSD doesn't implement request barriers > and that softupdates is flawed by design and seemingly could not > make use of them, even if they were available (because, as I > understand it, it relies on a total ordering of all writes, unlike > the partial ordering necessary for a journalled fs). Softupdates only needs to be partial ordering. It just needs to be notified when the data hits the platter so that it can send any dependent writes to the disk. Wouldn't the use of barriers have the potential to force a lot of unrelated cached write data to be written much earlier than necessary? If so, there would seem to be a performance penalty under certain workloads, though performance would still be better than with write-caching disabled.