From owner-freebsd-performance@FreeBSD.ORG Sun Aug 27 23:35:30 2006 Return-Path: X-Original-To: freebsd-performance@freebsd.org Delivered-To: freebsd-performance@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 988C316A4DD for ; Sun, 27 Aug 2006 23:35:30 +0000 (UTC) (envelope-from j_guojun@lbl.gov) Received: from smtp111.sbc.mail.mud.yahoo.com (smtp111.sbc.mail.mud.yahoo.com [68.142.198.210]) by mx1.FreeBSD.org (Postfix) with SMTP id F116543D49 for ; Sun, 27 Aug 2006 23:35:29 +0000 (GMT) (envelope-from j_guojun@lbl.gov) Received: (qmail 91766 invoked from network); 27 Aug 2006 23:35:29 -0000 Received: from unknown (HELO ?192.168.2.8?) (jinmtb@sbcglobal.net@68.127.157.187 with plain) by smtp111.sbc.mail.mud.yahoo.com with SMTP; 27 Aug 2006 23:35:28 -0000 Message-ID: <44F22CB9.9040100@lbl.gov> Date: Sun, 27 Aug 2006 16:37:29 -0700 From: "Jin Guojun [VFFS]" User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050108 X-Accept-Language: en, zh, zh-CN MIME-Version: 1.0 To: freebsd-performance@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Fri, 01 Sep 2006 13:25:38 +0000 Cc: hardware@freebsd.org Subject: reduce interrupt rate for CD/DVD drive(r) X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Aug 2006 23:35:30 -0000 I have difficulty to get CD/DVD write speed above 1.6MB/s (10x for CD, or 1.1x for DVD). The problem seems to be the interrupt rate is high (70-80% of CPU) for CD/DVD drive(r). I have tried three different CD/DVD drives under three different hardware platform with FreeBSD 4.11-R/6.1-R via growisofs, cdrecord, and burncd programs, and all combinations had the similar results. Non of them can go beyond the 1.6 MB/s writing speed. The reading speed is also far away from the manufactory specification due to high interrupt rate. Is any way to reduce the interrupt rate in order to increase the CD/DVD I/O performance? or is anything else to tune the performance? I doubt this is the hardware issue, but if this is possible, please point it out. Thanks, -Jin P.S.: Below is the information for systems have been tested -- Systems (FreeBSD4.11/6.1 i386): AMD XP 2100+ (1.667GHz) Intel P4 3.0GHz plus one of these CD/DVD drives: Micro Advantage CD-RW IDE-52-32 (52x read, 32x write on CD-RW media) Sony DRX-510UL CD/DVD-RW USB/1394 (2.4x DVD+RW, 4x high-speed DVD+RW) (FreeBSD-6.1 i386/amd64) AMD Turion 64 ML-34 (1.8GHz) + HP double layer 8x DVD+-R/RW Super Multi drive CD/DVD media: 48x CD-R, 52x CD-R (from manufactory), 12x high-speed CD-RW, 2x DVD-R, 4x DVD+RW From owner-freebsd-performance@FreeBSD.ORG Mon Aug 28 00:11:47 2006 Return-Path: X-Original-To: freebsd-performance@freebsd.org Delivered-To: freebsd-performance@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8EAD316A4E6 for ; Mon, 28 Aug 2006 00:11:47 +0000 (UTC) (envelope-from rick@kiwi-computer.com) Received: from kiwi-computer.com (megan.kiwi-computer.com [63.224.10.3]) by mx1.FreeBSD.org (Postfix) with SMTP id 03C5D43D66 for ; Mon, 28 Aug 2006 00:11:44 +0000 (GMT) (envelope-from rick@kiwi-computer.com) Received: (qmail 28174 invoked by uid 2001); 28 Aug 2006 00:11:43 -0000 Date: Sun, 27 Aug 2006 19:11:43 -0500 From: "Rick C. Petty" To: "Jin Guojun \[VFFS\]" Message-ID: <20060828001143.GB27678@megan.kiwi-computer.com> References: <44F22CB9.9040100@lbl.gov> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <44F22CB9.9040100@lbl.gov> User-Agent: Mutt/1.4.2.1i X-Mailman-Approved-At: Fri, 01 Sep 2006 13:25:49 +0000 Cc: freebsd-performance@freebsd.org, hardware@freebsd.org Subject: Re: reduce interrupt rate for CD/DVD drive(r) X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: rick-freebsd@kiwi-computer.com List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Aug 2006 00:11:47 -0000 On Sun, Aug 27, 2006 at 04:37:29PM -0700, Jin Guojun [VFFS] wrote: > I have difficulty to get CD/DVD write speed above 1.6MB/s (10x for CD, > or 1.1x for DVD). > The problem seems to be the interrupt rate is high (70-80% of CPU) for > CD/DVD drive(r). What's the value of the "hw.ata.atapi_dma" sysctl? -- Rick C. Petty From owner-freebsd-performance@FreeBSD.ORG Mon Aug 28 09:56:28 2006 Return-Path: X-Original-To: freebsd-performance@freebsd.org Delivered-To: freebsd-performance@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3B67B16A4DA; Mon, 28 Aug 2006 09:56:28 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from mail13.syd.optusnet.com.au (mail13.syd.optusnet.com.au [211.29.132.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id 82FD443D46; Mon, 28 Aug 2006 09:56:27 +0000 (GMT) (envelope-from peterjeremy@optushome.com.au) Received: from turion.vk2pj.dyndns.org (c220-239-19-236.belrs4.nsw.optusnet.com.au [220.239.19.236]) by mail13.syd.optusnet.com.au (8.12.11/8.12.11) with ESMTP id k7S9uN6E011876 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Mon, 28 Aug 2006 19:56:25 +1000 Received: from turion.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by turion.vk2pj.dyndns.org (8.13.6/8.13.6) with ESMTP id k7S9uNYX001215; Mon, 28 Aug 2006 19:56:23 +1000 (EST) (envelope-from peter@turion.vk2pj.dyndns.org) Received: (from peter@localhost) by turion.vk2pj.dyndns.org (8.13.6/8.13.6/Submit) id k7S9uMBS001214; Mon, 28 Aug 2006 19:56:22 +1000 (EST) (envelope-from peter) Date: Mon, 28 Aug 2006 19:56:22 +1000 From: Peter Jeremy To: "Jin Guojun [VFFS]" Message-ID: <20060828095622.GC747@turion.vk2pj.dyndns.org> References: <44F22CB9.9040100@lbl.gov> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="wULyF7TL5taEdwHz" Content-Disposition: inline In-Reply-To: <44F22CB9.9040100@lbl.gov> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.12-2006-07-14 X-Mailman-Approved-At: Fri, 01 Sep 2006 13:26:00 +0000 Cc: freebsd-performance@freebsd.org, hardware@freebsd.org Subject: Re: reduce interrupt rate for CD/DVD drive(r) X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Aug 2006 09:56:28 -0000 --wULyF7TL5taEdwHz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, 2006-Aug-27 16:37:29 -0700, Jin Guojun [VFFS] wrote: >I have difficulty to get CD/DVD write speed above 1.6MB/s (10x for CD,=20 >or 1.1x for DVD). >The problem seems to be the interrupt rate is high (70-80% of CPU) for=20 >CD/DVD drive(r). Your drive is probably in PIO4 mode (due to there being bugs in the UDMA implementation on many drives). Check hw.ata.atapi_dma and "atacontrol mode acd0". You may find you can change to WDMA2 mode which will significantly reduce the interrupt and CPU load. You will need to do some experimenting with your drives to see what works for you. --=20 Peter Jeremy --wULyF7TL5taEdwHz Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFE8r3G/opHv/APuIcRAhEEAJ4oSVUSRiD+7eisBUxO0No/PQlqugCgilsx 1D2NcxEEb5CM3fW6DnQ65kM= =mleA -----END PGP SIGNATURE----- --wULyF7TL5taEdwHz-- From owner-freebsd-performance@FreeBSD.ORG Mon Aug 28 18:41:58 2006 Return-Path: X-Original-To: freebsd-performance@freebsd.org Delivered-To: freebsd-performance@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CCBEA16A4DE for ; Mon, 28 Aug 2006 18:41:58 +0000 (UTC) (envelope-from j_guojun@lbl.gov) Received: from smtp106.sbc.mail.mud.yahoo.com (smtp106.sbc.mail.mud.yahoo.com [68.142.198.205]) by mx1.FreeBSD.org (Postfix) with SMTP id 67D9143D58 for ; Mon, 28 Aug 2006 18:41:57 +0000 (GMT) (envelope-from j_guojun@lbl.gov) Received: (qmail 31429 invoked from network); 28 Aug 2006 18:41:56 -0000 Received: from unknown (HELO ?192.168.2.10?) (jinmtb@sbcglobal.net@68.127.157.187 with plain) by smtp106.sbc.mail.mud.yahoo.com with SMTP; 28 Aug 2006 18:41:56 -0000 Message-ID: <44F33945.80609@lbl.gov> Date: Mon, 28 Aug 2006 11:43:17 -0700 From: "Jin Guojun [VFFS]" User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20060317 X-Accept-Language: en, zh, zh-CN MIME-Version: 1.0 To: Peter Jeremy References: <44F22CB9.9040100@lbl.gov> <20060828095622.GC747@turion.vk2pj.dyndns.org> In-Reply-To: <20060828095622.GC747@turion.vk2pj.dyndns.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Fri, 01 Sep 2006 13:26:07 +0000 Cc: freebsd-performance@freebsd.org, hardware@freebsd.org Subject: Re: reduce interrupt rate for CD/DVD drive(r) X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Aug 2006 18:41:58 -0000 Peter Jeremy wrote: >On Sun, 2006-Aug-27 16:37:29 -0700, Jin Guojun [VFFS] wrote: > > >>I have difficulty to get CD/DVD write speed above 1.6MB/s (10x for CD, >>or 1.1x for DVD). >>The problem seems to be the interrupt rate is high (70-80% of CPU) for >>CD/DVD drive(r). >> >> > >Your drive is probably in PIO4 mode (due to there being bugs in the >UDMA implementation on many drives). Check hw.ata.atapi_dma and >"atacontrol mode acd0". You may find you can change to WDMA2 mode >which will significantly reduce the interrupt and CPU load. You will >need to do some experimenting with your drives to see what works for >you. > > Yes, this is the problem. hw.ata.atapi_dma=1 but 6.1-R configures acd0 to PIO4. "atacontrol mode acd0 WDMA2" makes acd0 into correct mode. Under 4.11-R, things are complicated. hw.ata.atapi_dma=1 makes boot process configure acd0 to UDMA2, but Tx (I/O) rate limits at 1.6 MB/s. atacontrol will not help. hw.ata.atapi_dma=0 makes boot process configure acd0 to PIO4, and initial Tx rate is 1.6 MB/s. However, use atacontrol to change mode to WDMA2, or UDMA2, or back to PIO4, Tx rate can go up for a single I/O session or more , but not stable. In random time, the Tx rate will drop back to 1.6 MB/s. Since 6.1-R works, I would not think we need to worry about 4.11-R for this issue. Thanks for the information, -Jin