Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Nov 2004 21:44:57 +0100
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        Tomas Zvala <tomas@zvala.cz>
Cc:        freebsd-geom@freebsd.org
Subject:   Re: geom_mirror performance issues
Message-ID:  <20041128204457.GG7232@darkness.comp.waw.pl>
In-Reply-To: <41A9C110.9050205@zvala.cz>
References:  <41A9C110.9050205@zvala.cz>

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

--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--



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