From owner-freebsd-stable@FreeBSD.ORG Tue Jan 26 23:55:01 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 90427106566B for ; Tue, 26 Jan 2010 23:55:01 +0000 (UTC) (envelope-from aw1@swelter.hanley.stade.co.uk) Received: from v-smtp-auth-relay-6.gradwell.net (v-smtp-auth-relay-6.gradwell.net [79.135.125.112]) by mx1.freebsd.org (Postfix) with ESMTP id F16B48FC0A for ; Tue, 26 Jan 2010 23:55:00 +0000 (UTC) Received: from 93-97-22-18.zone5.bethere.co.uk ([93.97.22.18] helo=swelter.hanley.stade.co.uk country=GB ident=postmaster&pop3&stade^co*uk) by v-smtp-auth-relay-6.gradwell.net with esmtpa (Gradwell gwh-smtpd 1.290) id 4b5f80d3.548f.91 for freebsd-stable@freebsd.org; Tue, 26 Jan 2010 23:54:59 +0000 (envelope-sender ) Received: from swelter.hanley.stade.co.uk (localhost [127.0.0.1]) by swelter.hanley.stade.co.uk (8.14.3/8.14.3) with ESMTP id o0QNsxGD012958 for ; Tue, 26 Jan 2010 23:54:59 GMT (envelope-from aw1@swelter.hanley.stade.co.uk) Received: (from aw1@localhost) by swelter.hanley.stade.co.uk (8.14.3/8.14.3/Submit) id o0QNsx6W012957 for freebsd-stable@freebsd.org; Tue, 26 Jan 2010 23:54:59 GMT (envelope-from aw1) Date: Tue, 26 Jan 2010 23:54:59 +0000 From: Adrian Wontroba To: freebsd-stable@freebsd.org Message-ID: <20100126235458.GA12634@swelter.hanley.stade.co.uk> Mail-Followup-To: Adrian Wontroba , freebsd-stable@freebsd.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 8.0-STABLE Organization: Oh dear, I've joined one again. X-Virus-Scanned: clamav-milter 0.95.3 at swelter.hanley.stade.co.uk X-Virus-Status: Clean Subject: Re: immense delayed write to file system (ZFS and UFS2), performance issues X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: aw1@stade.co.uk List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jan 2010 23:55:01 -0000 On Wed, Jan 27, 2010 at 01:15:17AM +0200, Dan Naumov wrote: > Can anyone confirm that using the WDIDLE3 utility on the 2TB WD20EADS > discs will not cause any issues if these disks are part of a ZFS > mirror pool? I do have backups of data, but I would rather not spend > the time rebuilding the entire system and restoring enormous amounts > of data over a 100mbit network unless I absolutely have to :) How about using the "write every 5 seconds" python script posted earlier in this thread by erik@tefre.com? Works nicely for me and stops the load cycle count increase. Thank you Erik! To save searching, here is Erik's script as used here. #!/usr/local/bin/python # Author: Erik Stian Tefre #Keeping this python script running prevents Load_Cycle_Count from #incrementing on my WD15EADS drives by forcing a write every 5 seconds (2 #drive zfs mirror pool, average of 2 load cycles per minute when the #script is not running): import time,os mypool = "/tank" # ^^ Change to your pool! fname = os.path.join(mypool, "wd_green_anti_idle.pyfile") c = 0 f = open(fname, "w") while True: if c == 100: f.close() f = open(fname, "w") c = 0 c += 1 time.sleep(5) f.write("a") f.flush() os.fsync(f.fileno()) You might find this handy too: #!/bin/sh # $FreeBSD:$ # PROVIDE: wd_green_anti_idle # REQUIRE: LOGIN . /etc/rc.subr wd_green_anti_idle_enable="${wd_green_anti_idle_enable-NO}" name=wd_green_anti_idle rcvar=`set_rcvar` command="/usr/local/stade/bin/wd_green_anti_idle.py" start_cmd="wd_green_anti_idle_start" wd_green_anti_idle_start() { if ! checkyesno wd_green_anti_idle_enable ; then return 0 fi echo "Starting ${name}." ${command} & } load_rc_config $name run_rc_command $* Adjust command name to suit, put in /usr/local/etc/rc.d, add wd_green_anti_idle_enable="YES" to /etc/rc.conf and the script starts running during startup. A minor bug - it doesn't close down. -- Adrian Wontroba A witty saying proves nothing, but saying something pointless gets people's attention.