From owner-freebsd-stable@FreeBSD.ORG Sun Jun 12 04:46:00 2011 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 037A9106566B; Sun, 12 Jun 2011 04:46:00 +0000 (UTC) (envelope-from dmagda@ee.ryerson.ca) Received: from eccles.ee.ryerson.ca (ee.ryerson.ca [141.117.1.2]) by mx1.freebsd.org (Postfix) with ESMTP id B99648FC14; Sun, 12 Jun 2011 04:45:59 +0000 (UTC) Received: from [10.0.1.2] (bas2-toronto09-1176443988.dsl.bell.ca [70.31.28.84]) (authenticated bits=0) by eccles.ee.ryerson.ca (8.14.4/8.14.4) with ESMTP id p5C4jpHp016219 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Sun, 12 Jun 2011 00:45:52 -0400 (EDT) (envelope-from dmagda@ee.ryerson.ca) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: David Magda In-Reply-To: Date: Sun, 12 Jun 2011 00:45:57 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: References: <4DECB197.8020102@FreeBSD.org> <20110610211202.GA52253@icarus.home.lan> To: Bob Friesenhahn X-Mailer: Apple Mail (2.1084) Cc: freebsd-fs@freebsd.org, freebsd-stable@freebsd.org, Jeremy Chadwick Subject: Re: HEADS UP: ZFS v28 merged to 8-STABLE 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: Sun, 12 Jun 2011 04:46:00 -0000 On Jun 10, 2011, at 17:24, Bob Friesenhahn wrote: > Dedup can require a huge amount of RAM, or a dedicated L2ARC SSD, = depending on the size of your storage. You should not enable it unless = you are prepared for the consequences. Under OpenSolaris, each tracking entry for a deduped block (which can be = between 512B to 128KB) can be up to 376 bytes (struct ddt_entry): so for = one 1 GB (10^9) of deduped data (244140 blocks@4K), you would need ~91MB = of overhead to keep track of it; for 1 TB (10^12) of deduped data you = would need ~91 GB of space to keep track of all the blocks. And if you = can't fit the DDT in RAM, it will have to be saved to disk, which means = more I/O to fetch the data. = http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/cddl/contrib/opensolaris/uts= /common/fs/zfs/sys/ddt.h?rev=3D1.2 If your data is in blocks smaller than 4K you'll need more memory for = the DDT; if the data is broken up into blocks larger than 4K you'll = probably need less. Also remember that even though an L2ARC cache may save you from having = to go to spinning rust, you still need to use some RAM (struct = arc_buf_hdr; ~178B) to reference the DDT stuff in L2ARC: = http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/cddl/contrib/opensolaris/uts= /common/fs/zfs/arc.c A few threads on zfs-dicuss on this: = http://mail.opensolaris.org/pipermail/zfs-discuss/2011-April/thread.html#4= 8026 = http://mail.opensolaris.org/pipermail/zfs-discuss/2011-May/thread.html#481= 85 Also, the above numbers are for OpenSolaris: someone may want to check = the structure sizes for FreeBSD to be sure. They should get you in the = right ballpark though.