From owner-freebsd-stable@FreeBSD.ORG Mon Nov 1 11:01:47 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B5152106566C for ; Mon, 1 Nov 2010 11:01:47 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id 54C988FC17 for ; Mon, 1 Nov 2010 11:01:47 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 4CAC945C89; Mon, 1 Nov 2010 12:01:46 +0100 (CET) Received: from localhost (chello089073192049.chello.pl [89.73.192.49]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id A940945CA0; Mon, 1 Nov 2010 12:01:40 +0100 (CET) Date: Mon, 1 Nov 2010 12:01:00 +0100 From: Pawel Jakub Dawidek To: Mikolaj Golub Message-ID: <20101101110100.GI2160@garage.freebsd.pl> References: <86wrp3wj67.fsf@kopusha.home.net> <20101028163036.GA2347@garage.freebsd.pl> <86lj5i3zjt.fsf@kopusha.home.net> <86d3qr3m0b.fsf@kopusha.home.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="pe+tqlI1iYzVj1X/" Content-Disposition: inline In-Reply-To: <86d3qr3m0b.fsf@kopusha.home.net> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 9.0-CURRENT amd64 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-0.6 required=4.5 tests=BAYES_00,RCVD_IN_SORBS_DUL autolearn=no version=3.0.4 Cc: freebsd-stable@freebsd.org, Pete French Subject: Re: hast vs ggate+gmirror sychrnoisation speed X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Nov 2010 11:01:47 -0000 --pe+tqlI1iYzVj1X/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Oct 30, 2010 at 03:25:56PM +0300, Mikolaj Golub wrote: >=20 > On Thu, 28 Oct 2010 22:08:54 +0300 Mikolaj Golub wrote to Pawel Jakub Daw= idek: >=20 > PJD>> I looked at the code and the keepalive packets arbe sent from anot= her > PJD>> thread. Could you try turning them off in primary.c and see if that > PJD>> helps? >=20 > MG> At first I set RETRY_SLEEP to 1 sec to have more keepalive packets. = The errors > MG> started to observe frequently: >=20 > MG> Oct 28 21:35:53 bolek hastd[1709]: [storage] (secondary) Unable to r= eceive request header: RPC version wrong. > MG> Oct 28 21:35:54 bolek hastd[1632]: [storage] (secondary) Worker proc= ess exited ungracefully (pid=3D1709, exitcode=3D75). > MG> Oct 28 21:36:12 bolek hastd[1722]: [storage] (secondary) Unable to r= eceive request header: RPC version wrong. > MG> Oct 28 21:36:12 bolek hastd[1632]: [storage] (secondary) Worker proc= ess exited ungracefully (pid=3D1722, exitcode=3D75). > MG> ... >=20 > MG> Now I have been running synchronization for more then a half an hour= with > MG> keepalive_send disabled and have not seen any error. >=20 > So :-) What do you think about sending keepalive in remote_send_thread() = to > avoid this problem and sending them only when a connection is idle (it lo= oks > like there is no much use to send them all the time)? Something like in t= he > patch below (it works for me). I like your patch and I agree of course it is better to send keepalive packets only when connection is idle. The only thing I'd change is to modify QUEUE_TAKE1() macro to take additional argument 'timeout' - if we don't want it to time out, we pass 0. Could you modify your patch? --=20 Pawel Jakub Dawidek http://www.wheelsystems.com pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --pe+tqlI1iYzVj1X/ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAkzOnewACgkQForvXbEpPzRzugCeIi7y7O5jKsqxZyhs2rXskvPP E/wAnitchRQB9Gu217OGm+m3bqSO5bmn =RXcK -----END PGP SIGNATURE----- --pe+tqlI1iYzVj1X/--