Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Apr 1999 16:31:20 -0500
From:      Dan Nelson <dnelson@emsphone.com>
To:        mi@aldan.algebra.com
Cc:        questions@FreeBSD.ORG
Subject:   Re: writing slower with SoftUpdates
Message-ID:  <19990422163120.A48347@dan.emsphone.com>
In-Reply-To: <199904212008.QAA57336@misha.cisco.com>; from "Mikhail Teterin" on Wed Apr 21 16:08:17 GMT 1999
References:  <199904212008.QAA57336@misha.cisco.com>

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

--KsGdsel6WgEHnImy
Content-Type: text/plain; charset=us-ascii

In the last episode (Apr 21), Mikhail Teterin said:
> According to iozone, writing a 256M file to this empty 512M fs works
> at
> 
> 	18247338 bytes/second without SoftUpdates
> 	16687585 bytes/second with SoftUpdates
> 
> The disk is a 9Gb Cheetah LVD, attached to the LVD outlet of
> Adaptec's 2940U2W.
> 
> Another, identical Cheetah on the same SCSI cable, with another 512M
> empty filesystem gives
> 
> 	18179755 b/s with SoftUpdates
> 	18315425 b/s without SoftUpdates
> 
> Are this results what one should expect?

If these are in fact identical drives,  I would start looking at the
mode pages on the first drive to see if you have write caching turned
on.  Softupdates usually prefers to cache data itself, and you can get
degraded performance if the drive is doing caching too.

I've attached a script that will check all drives on your system, tell
you which ones have WCE (write cache enable) turned on, and tell you
how to disable it.

	-Dan Nelson
	dnelson@emsphone.com

--KsGdsel6WgEHnImy
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=cachecheck

#! /bin/sh

echo Checking SCSI drives for write-cache:

numbad=0

# get a list of direct-access devices known to the system
units=$(camcontrol devlist | sed -n -e "/,da[0-9]*/s/.*,da\(.*\))/\1/p")
for i in $units
do
  result=$(camcontrol modepage -m 8 -P 3 -u $i 2> /dev/null | grep WCE)
  if [ "$result" = "WCE:  1 " ] ; then
    camcontrol devlist | grep ",da${i})"
    numbad=$(($numbad + 1))
  fi
done

if [ $numbad -gt 0 ] ; then
	s=
	[ $numbad -ne 1 ] && s=s

	echo "
$numbad device$s with WCE set.  To reset, run 
\"camcontrol modepage -e -P 3 -m 8 -u <unit>\"
where <unit> is the disk number (i.e. da0 is unit #0), and set WCE to 0."
fi

echo

--KsGdsel6WgEHnImy--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990422163120.A48347>