From owner-freebsd-stable@freebsd.org Wed Feb 8 15:18:25 2017 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 90DB8CD6676 for ; Wed, 8 Feb 2017 15:18:25 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 6ECDB16B7 for ; Wed, 8 Feb 2017 15:18:25 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id 6E1A0CD6675; Wed, 8 Feb 2017 15:18:25 +0000 (UTC) Delivered-To: stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6DC30CD6674 for ; Wed, 8 Feb 2017 15:18:25 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: from mail-lf0-x230.google.com (mail-lf0-x230.google.com [IPv6:2a00:1450:4010:c07::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E802B16B6 for ; Wed, 8 Feb 2017 15:18:24 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: by mail-lf0-x230.google.com with SMTP id x1so83912802lff.0 for ; Wed, 08 Feb 2017 07:18:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=xj1fCyd2PQbf5dFomLGDCkx62FDSAr5Qtbz49aLJFIo=; b=H8/6yU17DCF9BUsfO7iVvXW/1UN1kDMvgd2EOQHmnGssPedHYG1nQPB9hYDfDAWqhw d1wm9hvuGDiBH0a6d0CyAnFHZZqYOH2q57vRDDUlSoKncPdYcDpV5MTUaxZUSsYZF834 BCKkYtPXiskHEYBZeM3Cynj+FjXJSDhmyVM02AdP6p0dogn6koWdZ9PVZbQgoPEIjEft JvglLoFkTvE/Ua/5NAdHNYV5ct7DNplcDWa8ZwoQ36iB+Fj+CDhU6S7wnGcYu9p4qljr eOv7VZkr+FQEKoJ9BKX2QBOXX2zl6+vKVnJfK65An+R5TYXWKqYFrL2w/mhyl2OtXyHj HdIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=xj1fCyd2PQbf5dFomLGDCkx62FDSAr5Qtbz49aLJFIo=; b=Pm3lsAJoef9sqX4XHTyAdxsPVQBW5CTomcARHT0xM1KOrUyPNT18kILSli6bEVj1MI gQKdcaDSZ/kWD4vsffgNi5hsXa8FhU9ZyhHq34RvXDK/3CKJ13x11hQFvwOoxXyaXvFx KlNCStrLRApLWVxnFZYM6qKLRhZb84lbOcMmrsTUif2GtKh3NyfQO/reewwoK+kZpFmF 8xgsFcGsOrguYzvwCbdJvPqnxl3zEGp2WU7HpPV29km035OuF6JBwybqjiNbxYreR8lZ rygp14yR+RfC8i8VsR0Vg+RqcdvJ/qrLELKIE0Q2+Rfo5h7LgD91Id3celxOcGCWq7g8 +ycw== X-Gm-Message-State: AIkVDXJKkSVATMx9KPGfnUWW8u8CDbysxlo3rysyH5ECisCRidgMgWygOSd7asx+mWKSvQ== X-Received: by 10.25.86.2 with SMTP id k2mr7921835lfb.51.1486567103193; Wed, 08 Feb 2017 07:18:23 -0800 (PST) Received: from localhost ([91.245.79.58]) by smtp.gmail.com with ESMTPSA id h80sm2518444lfi.6.2017.02.08.07.18.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Feb 2017 07:18:22 -0800 (PST) Sender: Mykola Golub Date: Wed, 8 Feb 2017 17:18:21 +0200 From: Mykola Golub To: Pete French Cc: stable@freebsd.org Subject: Re: HASt and write amplification on the seconday Message-ID: <20170208151820.GA7364@gmail.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Feb 2017 15:18:25 -0000 On Mon, Jan 30, 2017 at 06:41:21PM +0000, Pete French wrote: > I have a pair of machines which I have been runnig HAST on > for a number of years. It works well, it does what Ineed it > to do, and I havent considered the details until recently. > > As I udnesratnd it though, the minimum size of block copied is > set by default to something quite arge (2 meg). I see whay, but > as I am using ZFS on top I am generating lots of writes which are > scattered across the disc (ZFS not known for keeping writes all in > the same place!). > > So, is each 512 byte write being turned into a 2 meg write on the > secondary ? If so this worries me, as I am about to replcae these > drives with SSD's, which I do not want to wearn out with excessive > writes. Extents (2 meg blocks) are used for synchronization after the secondary is reconnected. Normally (the secondary is connected) writes to the primary and the secondary are the same. Taking your example with 512 byte write: 1) The secondary is connected -- a 512 byte write to HAST device results in 512 byte write to the primary and 512 byte write to the secondary. 2) The secondary is disconnected -- a 512 byte write to HAST device results in 512 byte write to the primary and marking 2Mb extent as dirty; when the secondary is reconnected, the whole extent (2Mb) is sent. -- Mykola Golub