From owner-freebsd-scsi Thu Apr 6 13:25:48 2000 Delivered-To: freebsd-scsi@freebsd.org Received: from front6m.grolier.fr (front6m.grolier.fr [195.36.216.56]) by hub.freebsd.org (Postfix) with ESMTP id 5C66737BAF4 for ; Thu, 6 Apr 2000 13:25:38 -0700 (PDT) (envelope-from groudier@club-internet.fr) Received: from ppp-109-30.villette.club-internet.fr (ppp-109-30.villette.club-internet.fr [194.158.109.30]) by front6m.grolier.fr (8.9.3/No_Relay+No_Spam_MGC990224) with ESMTP id WAA22781; Thu, 6 Apr 2000 22:24:58 +0200 (MET DST) Date: Thu, 6 Apr 2000 21:58:11 +0200 (CEST) From: =?ISO-8859-1?Q?G=E9rard_Roudier?= X-Sender: groudier@linux.local To: "Kenneth D. Merry" Cc: John Lengeling , Andrew Heybey , freebsd-scsi@FreeBSD.ORG Subject: Re: newfs on IBM disks slower than Seagate disks? In-Reply-To: <20000406091952.A11611@panzer.kdm.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Thu, 6 Apr 2000, Kenneth D. Merry wrote: > On Thu, Apr 06, 2000 at 09:51:16 -0500, John Lengeling wrote: > >=20 > > >=20 > > > See if write caching is enabled (WCE =3D=3D 1) in mode page 8. (See = the > > > camcontrol(8) man page for how to display mode pages.) > > >=20 > > > Ken > > > > >=20 > > Should it be on or off? What does WCE do? >=20 > WCE means Write Cache Enabled. >=20 > I generally have write caching turned on with my disks, but it can be a > rather religious issue. You can probably find lots of discussion about i= t > if you search various FreeBSD list archives. (I'm not going to recommend > one way or the other.) I will do slightly different. :-) When WCE bit =3D 0, the device shall return GOOD SCSI status after DATA has= =20 been actually written to the medium (on WRITE commands obviously). So, even when WCE=3D0, the device can use its cache memory to optimize=20 actual write operations by sorting and coalescing commands, provided that= =20 it is given several commands simultaneously. When WCE bit =3D 1, the device is allowed to return GOOD status as soon as= =20 it has buffered the data of a WRITE operation. In result, when WCE bit =3D 1, the cache memory of the device can be populated with numerous pending data for writing, reducing the memory available for prefetching and decreasing READ performances. In my opinion, given realistic IO patterns and not too mistaken IO subsystems, WCE =3D 1 is mostly good with reducing IO performances in numerous (most?) situations (of not using a silly benchmark or a silly IO pattern). However, in the situation of a system performing bunches of small WRITES it wants (or believes) to be synchronous, WCE =3D 1 can magically increase performances if the device is just not told about these IOs having to be performed synchronously (FUA bit should be used). I generally have write caching enabled on my testing machine, not because I like this option but for the reason I know people generally use it and that this option is a good stresser for disk firmwares. But I donnot recommend to blindly use this option on production systems without having checked its actual effect on performances. If you are unsure, you should probably disable WCE, since the risk of losing both performances and reliability does exist, in my opinion, when WCE bit is set. Obviously this depends on so many factors, that a single recommendation is not possible. G=E9rard. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message