Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Apr 2000 21:58:11 +0200 (CEST)
From:      =?ISO-8859-1?Q?G=E9rard_Roudier?= <groudier@club-internet.fr>
To:        "Kenneth D. Merry" <ken@kdm.org>
Cc:        John Lengeling <johnl@raccoon.com>, Andrew Heybey <ath@niksun.com>, freebsd-scsi@FreeBSD.ORG
Subject:   Re: newfs on IBM disks slower than Seagate disks?
Message-ID:  <Pine.LNX.4.10.10004062054280.1467-100000@linux.local>
In-Reply-To: <20000406091952.A11611@panzer.kdm.org>

next in thread | previous in thread | raw e-mail | index | archive | help


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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.4.10.10004062054280.1467-100000>