Date: Sun, 13 Dec 2009 04:20:44 +0200 From: Alexander Motin <mav@FreeBSD.org> To: Will Andrews <will@firepipe.net> Cc: Maxim Sobolev <sobomax@FreeBSD.org>, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-8@FreeBSD.org, svn-src-stable@FreeBSD.org Subject: Re: svn: stable/8/sbin/geom/class/mirror Message-ID: <4B244F7C.1070205@FreeBSD.org> In-Reply-To: <20091213015909.GB27552@cephei.firepipe.net> References: <200912102351.nBANpOKc078607@svn.freebsd.org> <4B21A4B9.3070005@FreeBSD.org> <20091213015909.GB27552@cephei.firepipe.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Will Andrews wrote: > On Thu, Dec 10, 2009 at 05:47:37PM -0800, Maxim Sobolev wrote: >> Alexander Motin wrote: >>> Author: mav >>> Date: Thu Dec 10 23:51:24 2009 >>> New Revision: 200373 >>> URL: http://svn.freebsd.org/changeset/base/200373 >>> >>> Log: >>> MFC r200282, r200290: >>> Change gmirror default balance algorithm from "split" to improved "load". >>> "split" is very ineffective for devices with rotating media as HDDs. >>> To be effective, it needs that transfer time reduction due to block >>> splitting was bigger then access time increase due to non-sequential >>> access. For modern HDDs I was able to reproduce it only with read sizes >>> of 2MB and above, which is almost not applicable in real life. >>> "load" algorithm same time is more universal and effective now. >> The other problem with real hard drives is that they usually read much >> more data than requested. Some suggest that they read as much as one >> track each time the data is not in cache even if one sector has been >> requested, therefore splitting request of any reasonable size is >> meaningless, as it would simply cause both drives to load essentially >> the same data, wasting half of available I/O bandwidth and in addition >> you cause both heads to do seek, which makes it even worse. > > Indeed. I think the benchmarks speak for themselves. The new algorithm > results in much lower average I/O service time, due to the seek time > reduction by dispatching read requests to providers according to the known > distance from the request, and also reduced by taking advantage of the disk > cache. The disk cache size probably affects how close the requests need to > be for optimal selection, so perhaps a sysctl is warranted to allow > administrative adjustment of this value from mav@'s default of 1MB. I've took 1MB not from cache, but from track size. I've divided read speed of modern drive on number of RPMs. I doubt that disk will read more then one track ahead, and same time it is quite probable to read whole current track, as head is already there and caches are quite large now. Sure it can be made tunable, but I think it is not very important, if you won't build mirror of floppy disks. Even in worst case current algorithm will give load disbalance no more then 1 request, as distance is only a hint, not a strict rule. -- Alexander Motin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4B244F7C.1070205>