Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 May 2011 17:57:55 +0200
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        Maxim Sobolev <sobomax@sippysoft.com>
Cc:        "current@freebsd.org" <current@FreeBSD.ORG>
Subject:   Re: Randomization in hastd(8) synchronization thread
Message-ID:  <20110521155755.GC3326@garage.freebsd.pl>
In-Reply-To: <4DD2CEE7.1070805@sippysoft.com>
References:  <4DD2CEE7.1070805@sippysoft.com>

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

--p2kqVDKq5asng8Dg
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, May 17, 2011 at 12:39:19PM -0700, Maxim Sobolev wrote:
> Hi Pawel,
>=20
> I am trying to use hastd(8) over slow links and one problem is
> apparent right now - current approach with synchronizing content
> sequentially is not working in this case. What happens is that hastd
> hits the first frequently updated block and cannot make any progress
> anymore. In my case I have 30GB of dirty space to be synchronized
> over just 1mbps uplink.
>=20
> The quick fix that I've applied is randomization in the block
> selection code. This way  eventually all least used blocks will be
> synchronized, leaving only hot ones dirty. More effective approach
> would be to use some kind of LRU selection algorithm, but
> statistical approach would work just as good in this case.
>=20
> Please review the patch below:
>=20
> http://sobomax.sippysoft.com/activemap.c.diff

Hmm, hastd keeps separate bitmap for synchronization. It is stored in
am_syncmap field. Blocks that are dirtied during regular writes should
not effect on synchronization bitmap and synchronization progress.

--=20
Pawel Jakub Dawidek                       http://www.wheelsystems.com
FreeBSD committer                         http://www.FreeBSD.org
Am I Evil? Yes, I Am!                     http://yomoli.com

--p2kqVDKq5asng8Dg
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (FreeBSD)

iEYEARECAAYFAk3X4QMACgkQForvXbEpPzREzQCfc7d0K2hj9txaPeZs1XpRdAQH
UioAoNJx0Oee2AZL37etZ+LD4ukNPAS5
=4ZL3
-----END PGP SIGNATURE-----

--p2kqVDKq5asng8Dg--



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