From owner-freebsd-fs@FreeBSD.ORG Wed Jul 9 08:11:56 2014 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2A539BCB for ; Wed, 9 Jul 2014 08:11:56 +0000 (UTC) Received: from mail-wi0-x22a.google.com (mail-wi0-x22a.google.com [IPv6:2a00:1450:400c:c05::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9F6A62F5C for ; Wed, 9 Jul 2014 08:11:55 +0000 (UTC) Received: by mail-wi0-f170.google.com with SMTP id cc10so2324465wib.3 for ; Wed, 09 Jul 2014 01:11:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type; bh=DakfFTU7y0QwUasfRVVt8p7/PYu0TTHxNyKJFZAc6hE=; b=gOQAZLrtr9yGPAoerLQwJRugYPtyk8DMJ+yqU/4OQSHxJOXTT5o+VwBEpjXVFH5X/K PZxBBeFSiBEY6Gyx/Ok7KSjAIF+YIYSS6FRoZVT5kqwmPDf8sElIoZ62CfdhOf9eUYfh hH/O2+rV38a6CZfLlUk2+nBk/OFfflGxUUDrLyrlYkc8unhr16lFmabR0FlaqIXwgk9J kEaijX//ddijx7ian3WFFzjt4DDZoWhboPTKmed7fgJWtvQ5dnVPDdgrAUh+S9jhj92O 8P5EIvOLhZRSCnbjFVVtC3iDVTM6ZYDjnMdx8iS4xBeqgV0W8i1Q/PobjINpX0QYEIRc cHww== X-Received: by 10.180.126.9 with SMTP id mu9mr9463119wib.69.1404893513744; Wed, 09 Jul 2014 01:11:53 -0700 (PDT) Received: from [192.168.1.145] ([193.173.55.180]) by mx.google.com with ESMTPSA id 19sm101749449wjz.3.2014.07.09.01.11.52 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 09 Jul 2014 01:11:53 -0700 (PDT) Message-ID: <53BCF948.6010303@gmail.com> Date: Wed, 09 Jul 2014 10:11:52 +0200 From: Johan Hendriks User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: krad Subject: Re: Using 2 SSD's to create a SLOG References: <20140708025106.GA85067@neutralgood.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.18 Cc: freebsd-fs@freebsd.org X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jul 2014 08:11:56 -0000 op 09-07-14 09:21, krad schreef: > An NFS server is a common task that generates lots of synchronous writes > > > On 8 July 2014 03:51, wrote: > >> On Mon, Jul 07, 2014 at 06:06:43PM -0700, javocado wrote: >>> I am interested in adding an SSD "SLOG" to my ZFS system so as to >>> (dramatically) speed up writes on this system. >>> >>> My question is if ZFS will, itself, internally, mirror two SSDs that are >>> used as a SLOG ? >>> >>> What I mean is, if ZFS is already smart enough to create a zpool mirror >>> (or, on my case, a zpool raidz3) then perhaps ZFS is also smart enough to >>> mirror the SLOG to two individual SSDs ? >>> >>> I am hoping to dumbly plug two SSDs onto motherboard SATA ports and just >>> hand them over, raw, to ZFS. >> From the zpool man page: >> >> Example 12 Creating a ZFS Pool with Mirrored Separate Intent Logs >> >> The following command creates a ZFS storage pool consisting of >> two, >> two-way mirrors and mirrored log devices: >> >> # zpool create pool mirror c0d0 c1d0 mirror c2d0 c3d0 log mirror \ >> c4d0 c5d0 >> >> You should be able to use that example to make the 'zpool add' command to >> add the mirrored log to an existing pool. >> >> But know that the SLOG only helps writes that are synchronous. This is in >> many workloads a small fraction of the total writes. For other workloads >> it is a large portion of the writes. >> >> Do you know for certain that you need a SLOG? >> -- >> Kevin P. Neal http://www.pobox.com/~kpn/ >> On the community of supercomputer fans: >> "But what we lack in size we make up for in eccentricity." >> from Steve Gombosi, comp.sys.super, 31 Jul 2000 11:22:43 -0600 >> _______________________________________________ >> freebsd-fs@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-fs >> To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org" >> > _______________________________________________ > freebsd-fs@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-fs > To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org" I would not use raw disks... The way I add a SLOG to the system is as follows. In my case I can hotswap disks so I insert one SSD, On the console it will show up as for example da10. I also mark the disk with the label I use on the system in this example slog01. Then I use gpart to label the disk # gpart create -s gpt /dev/da10 # gpart add -t freebsd-zfs -a 4k -l slog01 /dev/da10 Then I Insert the second disk If this disk shows up as da11 I use the following commands. I also label the disk with a sticker or pen slog02 # gpart create -s gpt /dev/da11 # gpart add -t freebsd-zfs -a 4k -l slog02 /dev/da11 This way I now for certain that the disk slog01. If you do not label the disk itself and /dev/daxx numbers change you can remove the wrong disk... Then I add the slog device to the pool. In the example my pool is named storage # zpool add storage log mirror gpt/slog01 gpt/slog02 A zpool status will show you the whole pool and you will see in the end the mirrored log device san01 ~ # zpool status pool: storage state: ONLINE scan: scrub repaired 0 in 1h21m with 0 errors on Tue Jul 1 06:51:21 2014 config: NAME STATE READ WRITE CKSUM sanstorage ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 gpt/disk0 ONLINE 0 0 0 gpt/disk1 ONLINE 0 0 0 mirror-1 ONLINE 0 0 0 gpt/disk2 ONLINE 0 0 0 gpt/disk3 ONLINE 0 0 0 mirror-2 ONLINE 0 0 0 gpt/disk4 ONLINE 0 0 0 gpt/disk5 ONLINE 0 0 0 mirror-3 ONLINE 0 0 0 gpt/disk12 ONLINE 0 0 0 gpt/disk13 ONLINE 0 0 0 mirror-4 ONLINE 0 0 0 gpt/disk6 ONLINE 0 0 0 gpt/disk7 ONLINE 0 0 0 mirror-5 ONLINE 0 0 0 gpt/disk10 ONLINE 0 0 0 gpt/disk11 ONLINE 0 0 0 mirror-6 ONLINE 0 0 0 gpt/disk8 ONLINE 0 0 0 gpt/disk9 ONLINE 0 0 0 logs mirror-7 ONLINE 0 0 0 gpt/slog01 ONLINE 0 0 0 gpt/slog02 ONLINE 0 0 0 errors: No known data errors The main advantage of the gpart label is that you can use it on every sata/sas port in the system. If I use it in the front bays on the system they are known as daxx but I can put them on the sata controller on the motherboard if I want, they will become adaxx. Because ZFS uses the gpt labels it will always find them. Please make sure you have a backup... Also first try it on a virtual machine and get comfortable with the commands... regards