From owner-freebsd-geom@FreeBSD.ORG Sun Nov 28 20:44:59 2004 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6665516A4CE for ; Sun, 28 Nov 2004 20:44:59 +0000 (GMT) Received: from darkness.comp.waw.pl (darkness.comp.waw.pl [195.117.238.136]) by mx1.FreeBSD.org (Postfix) with ESMTP id E361F43D4C for ; Sun, 28 Nov 2004 20:44:58 +0000 (GMT) (envelope-from pjd@darkness.comp.waw.pl) Received: by darkness.comp.waw.pl (Postfix, from userid 1009) id 4E648ACBCB; Sun, 28 Nov 2004 21:44:57 +0100 (CET) Date: Sun, 28 Nov 2004 21:44:57 +0100 From: Pawel Jakub Dawidek To: Tomas Zvala Message-ID: <20041128204457.GG7232@darkness.comp.waw.pl> References: <41A9C110.9050205@zvala.cz> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="G32kpiKURVjWs3Ul" Content-Disposition: inline In-Reply-To: <41A9C110.9050205@zvala.cz> User-Agent: Mutt/1.4.2i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 5.2.1-RC2 i386 cc: freebsd-geom@freebsd.org Subject: Re: geom_mirror performance issues X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Nov 2004 20:44:59 -0000 --G32kpiKURVjWs3Ul Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Nov 28, 2004 at 01:14:08PM +0100, Tomas Zvala wrote: +> Hello, +> I've been playing with geom_mirror for a while now and few issues=20 +> came up to my mind. +> a) I have two identical drives (Seagate 120GB SATA 8MB Cache=20 +> 7.2krpm) that are able to sequentialy read at 58MB/s at the same time= =20 +> (about 115MB/s throughput). But when I have them in geom_mirror I get=20 +> 30MB/s at best. Thats about 60MB/s for the mirror (about half the=20 +> potential). The throughput is almost the same for both 'split' and 'load= '=20 +> balancing algorithms altough with load algorithm it seems that all the= =20 +> reading is being done from just one drive. Think how mirror works. When you do sequential read you get something like this: # dd if=3D/dev/mirror/foo of=3D/dev/null bs=3D128k disk0 disk1 (offset) (offset) 0 128k 256k 384k Now, try to write a program which reads every second sector from the disk. You will get not more than your 30MB/s. This is not stripe. Time spend on moving head from offset 128k (after reading first 128kB) to 256k cost the same as reading those data. You should try /usr/src/tools/tools/raidtest/ which does random I/Os. +> b) Pretty often i can see in gstat that both drives are doing the=20 +> same things (the same number of transactions and same throughput) but o= ne=20 +> of them has significantly higher load(ie. one 50% and the other one 95%)= .=20 +> How is disk load calculated and why does this happen? You use round-robin algorithm? I can't reproduce it here. I see ~50% busy on both components. +> c) When I use 'split' load balancing algorithm, 128kB requests are=20 +> split into two 64kB requests making twice as many transactions on the=20 +> disks. Is it possible to lure fbsd into allowing 256kB requests that=20 +> will get split into two 128kB requests? You can try to change MAXPHYS in param.h and try to recompile your kernel, but I've no idea if this will "just work". +> d) When I use round-robin algorithm the performance halves (i get=20 +> about 20MB/s raw throughput). Why is this? I would expect round-robin= =20 +> algorithm to be the most effective one for reading as every drive gets= =20 +> exactly half the load. Repeat your tests with random I/Os. +> e) My last question again goes with the 'load' balancing. How often=20 +> is switch between drives done? When I set my load balancing to 'load' i= get=20 +> 100% load on one drive and 0% or at most 5% on the other one. Is this an= =20 +> intention. Seems like a bug to me. Again, try with random reading/writing. --=20 Pawel Jakub Dawidek http://www.FreeBSD.org pjd@FreeBSD.org http://garage.freebsd.pl FreeBSD committer Am I Evil? Yes, I Am! --G32kpiKURVjWs3Ul Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFBqjjJForvXbEpPzQRAkjOAKD4R69NUALQ8K84C9vHr5aQmn1R8gCfTeSn zKIFIg/+crdhn/929SDFSV0= =1fgU -----END PGP SIGNATURE----- --G32kpiKURVjWs3Ul--