From owner-freebsd-mobile Mon May 14 0:36: 2 2001 Delivered-To: freebsd-mobile@freebsd.org Received: from freebsd.dk (fw-rl0.freebsd.dk [212.242.86.114]) by hub.freebsd.org (Postfix) with ESMTP id D161637B423; Mon, 14 May 2001 00:35:58 -0700 (PDT) (envelope-from sos@freebsd.dk) Received: (from sos@localhost) by freebsd.dk (8.11.3/8.11.3) id f4E7Zso17545; Mon, 14 May 2001 09:35:54 +0200 (CEST) (envelope-from sos) From: Søren Schmidt Message-Id: <200105140735.f4E7Zso17545@freebsd.dk> Subject: Re: slow IDE performance In-Reply-To: <200105111639.f4BGd6c03347@ptavv.es.net> "from Kevin Oberman at May 11, 2001 09:39:06 am" To: Kevin Oberman Date: Mon, 14 May 2001 09:35:53 +0200 (CEST) Cc: Mike Smith , Leon Breedt , freebsd-mobile@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL88 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=ISO-8859-1 Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org It seems Kevin Oberman wrote: > The consensus of the experts (including Soren Schmidt, author of the > ATA driver,) after the referenced thread was that there were serious > problems with the write cache implementation on may IDE disks that > made write cache use "dangerous at any speed". Not just with soft > updates, but with normal synchronous disk operation. Hmm, maybe its time for me to chime in here... The only problem with write cache is that you can potentially loose uptil a cache full of data if the power goes away unexpectedly. This is especially bad if you use softupdates, but harmfull on all filesystems of cause. Without WC you should only loose the last sector that is about to be written or actively being written when power goes away, which can still be bad, but more limitted in scope. Now, that aside, it is also a fact that lots of modern disks takes a significant performance hit when WC is disabled, the worst example so far are some of the newer Maxtors, they drop to < 8MB/s write speed in that case. > Since Windows does not make use of many ATA functions used to make > cache fairly safe for SCSI and often does not ever write any data from > cache to disk in a power failure, the correct operation of the cache > flush operation is critical, but I have been told that it simply does > not work with many disks. Well, I dont know where you heard that, but the flush cache command has worked on all the ATA disks I've seen so far... The problem at hand is only related to using an on-disk cache, the reason is that the system _thinks_ it has written data to the media, and that is not nessesarily the case when WC is enabled, and since softupdates relies on that info, well.... We are looking at ways to try to do a flush of the disk cache in the right places, but so far we have no working setup. Now I've done some serious testing here on this problem, using an "automated power outage gadget" and the results so far tells me the problem with just using WC is existant, but it has not corrupted data any worse than without (data sample is > 500 powercuts with/without WC on). One interesting thing is that using IBM disks and utilising tagged queueing seems to work as expected, the disk apparently first reports a write done when the data has actually hit the media, or I've just been lucky about well over 500 times there also :) -Søren To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message