From patchwork Mon Dec 4 22:50:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Scott Bauer X-Patchwork-Id: 10092483 X-Patchwork-Delegate: snitzer@redhat.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4164960327 for ; Tue, 5 Dec 2017 08:42:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 30996294F2 for ; Tue, 5 Dec 2017 08:42:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 254E729536; Tue, 5 Dec 2017 08:42:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 089DB294F2 for ; Tue, 5 Dec 2017 08:41:57 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E5DB5C047B8B; Tue, 5 Dec 2017 08:41:56 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C70915DA67; Tue, 5 Dec 2017 08:41:56 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 9EF2E4BB79; Tue, 5 Dec 2017 08:41:56 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id vB4NCZxc010779 for ; Mon, 4 Dec 2017 18:12:35 -0500 Received: by smtp.corp.redhat.com (Postfix) id 749E417C26; Mon, 4 Dec 2017 23:12:35 +0000 (UTC) Delivered-To: dm-devel@redhat.com Received: from mx1.redhat.com (ext-mx05.extmail.prod.ext.phx2.redhat.com [10.5.110.29]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4A99317C48; Mon, 4 Dec 2017 23:12:30 +0000 (UTC) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F1FE737E80; Mon, 4 Dec 2017 23:12:28 +0000 (UTC) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Dec 2017 15:12:27 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,362,1508828400"; d="scan'208";a="9540513" Received: from sbauer-z170x-ud5.lm.intel.com (HELO localhost.localdomain) ([10.232.112.34]) by orsmga003.jf.intel.com with ESMTP; 04 Dec 2017 15:12:26 -0800 From: Scott Bauer To: dm-devel@redhat.com Date: Mon, 4 Dec 2017 15:50:51 -0700 Message-Id: <20171204225051.3043-2-scott.bauer@intel.com> In-Reply-To: <20171204225051.3043-1-scott.bauer@intel.com> References: <20171204225051.3043-1-scott.bauer@intel.com> MIME-Version: 1.0 X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 207 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Mon, 04 Dec 2017 23:12:29 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Mon, 04 Dec 2017 23:12:29 +0000 (UTC) for IP:'192.55.52.88' DOMAIN:'mga01.intel.com' HELO:'mga01.intel.com' FROM:'scott.bauer@intel.com' RCPT:'' X-RedHat-Spam-Score: -5.031 (RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_PASS, T_RP_MATCHES_RCVD) 192.55.52.88 mga01.intel.com 192.55.52.88 mga01.intel.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.29 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: dm-devel@redhat.com X-Mailman-Approved-At: Tue, 05 Dec 2017 03:41:40 -0500 Cc: Scott Bauer , agk@redhat.com, snitzer@redhat.com, linux-kernel@vger.kernel.org Subject: [dm-devel] [PATCH 2/2] dm unstripe: Add documentation for unstripe target X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Tue, 05 Dec 2017 08:41:57 +0000 (UTC) X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Scott Bauer --- Documentation/device-mapper/dm-unstripe.txt | 82 +++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 Documentation/device-mapper/dm-unstripe.txt diff --git a/Documentation/device-mapper/dm-unstripe.txt b/Documentation/device-mapper/dm-unstripe.txt new file mode 100644 index 000000000000..7060f1b53db3 --- /dev/null +++ b/Documentation/device-mapper/dm-unstripe.txt @@ -0,0 +1,82 @@ +Device-Mapper Unstripe +===================== + +The device-mapper Unstripe (dm-unstripe) target provides a transparent +mechanism to unstripe a RAID 0 striping to access segregated disks. + +This module should be used by users who understand what the underlying +disks look like behind the Software/Hardware RAID. + +Parameters: + <# of drives> + + + + The block device you wish to unstripe. + + + The physical drive you wish to expose via this "virtual" device + mapper target. This must be 0 indexed. + +<# of drives> + The number of drives in the RAID 0. + + + The amount of 512B sectors in the raid striping, or zero, if you + wish you use max_hw_sector_size. + + +Why use this module? +===================== + +As a use case: + + + As an example: + + Intel NVMe drives contain two cores on the physical device. + Each core of the drive has segregated access to its LBA range. + The current LBA model has a RAID 0 128k stripe across the two cores: + + Core 0: Core 1: + __________ __________ + | LBA 511| | LBA 768| + | LBA 0 | | LBA 256| + ⎻⎻⎻⎻⎻⎻⎻⎻⎻⎻ ⎻⎻⎻⎻⎻⎻⎻⎻⎻⎻ + + The purpose of this unstriping is to provide better QoS in noisy + neighbor environments. When two partitions are created on the + aggregate drive without this unstriping, reads on one partition + can affect writes on another partition. With the striping concurrent + reads and writes and I/O on opposite cores have lower completion times, + and better tail latencies. + + With the module we were able to segregate a fio script that has read and + write jobs that are independent of each other. Compared to when we run + the test on a combined drive with partitions, we were able to get a 92% + reduction in five-9ths read latency using this device mapper target. + + + One could use the module to Logical de-pop a HDD if you have sufficient + geomoetry information regarding the drive. + + +Example scripts: +==================== + +dmsetup create nvmset1 --table '0 1 dm-unstripe /dev/nvme0n1 1 2 0' +dmsetup create nvmset0 --table '0 1 dm-unstripe /dev/nvme0n1 0 2 0' + +There will now be two mappers: +/dev/mapper/nvmset1 +/dev/mapper/nvmset0 + +that will expose core 1 and core 2. + + +In a Raid 0 with 4 drives of stripe size 128K: +dmsetup create raid_disk0 --table '0 1 dm-unstripe /dev/nvme0n1 0 4 256' +dmsetup create raid_disk1 --table '0 1 dm-unstripe /dev/nvme0n1 1 4 256' +dmsetup create raid_disk2 --table '0 1 dm-unstripe /dev/nvme0n1 2 4 256' +dmsetup create raid_disk3 --table '0 1 dm-unstripe /dev/nvme0n1 3 4 256' +