From: Christoph Hellwig <hch@infradead.org>
To: Heinz Mauelshagen <heinzm@redhat.com>
Cc: dm-devel@redhat.com, snitzer@redhat.com,
Ming Lei <ming.lei@redhat.com>,
linux-block@vger.kernel.org
Subject: Re: [dm-devel] [PATCH 0/2] dm: add new loop and ram targets
Date: Mon, 22 Jan 2018 12:19:44 -0800 [thread overview]
Message-ID: <20180122201944.GA7080@infradead.org> (raw)
In-Reply-To: <cover.1516124587.git.heinzm@redhat.com>
On Wed, Jan 17, 2018 at 08:33:59PM +0100, Heinz Mauelshagen wrote:
> Enhancing IO performance compared to the kernels existing
> loop driver thus better suiting respective requirements in
> test setups, this patch series adds new "loop" and "ram" targets.
For a fair comparism vs loop you'll need to compare it to the
direct I/O mode. If it is faster than that we have a very serious
bug somewhere.
>
> For measures see test results below.
>
>
> The "loop" target maps segments to backing files.
> Mapping table example:
> 0 4192256 loop /tmp/mapper_loop1
> 4192256 2097152 loop /dev/nvm/mapper_loop0
>
>
> The "ram" target accesses RAM directly rather than through
> tmpfs additionally enhancing performance compared to "loop"
> thus avoding filesystem overhead.
> Mapping table example:
> 0 8388608 ram
>
> "ram" is a singleton target.
>
>
> Performance test results for 4K and 32K IOPS comparing the loop driver
> with dm-loop backed by tmpfs and dm-ram (all 2GiB backing size):
>
> <TESTSCRIPT>
> #!/bin/sh
> for f in /tmp/loop0 /tmp/mapper_loop0
> do
> dd if=/dev/zero of=$f bs=256M count=8 iflag=fullblock
> done
>
> losetup /dev/loop0 /tmp/loop0
> sectors=`du -s /tmp/mapper_loop0|cut -f1`
> dmsetup create loop0 --table "0 $sectors loop /tmp/mapper_loop0"
> dmsetup create ram --table "0 $sectors ram"
>
> for bs in 4K 32K
> do
> for d in /dev/loop0 /dev/mapper/loop0 /dev/mapper/ram
> do
> echo 3 > /proc/sys/vm/drop_caches
> fio --bs=$bs --rw=randrw --numjobs=99 --group_reporting --iodepth=12 --runtime=3 --ioengine=libaio \
> --loops=1 --direct=1 --exitall --name dc --filename=$d | egrep "read|write"
> done
> done
> </TESTSCRIPT>
>
> <4K_RESULTS>
> loop driver:
> read: IOPS=226k, BW=881MiB/s (924MB/s)(2645MiB/3003msec)
> write: IOPS=225k, BW=880MiB/s (923MB/s)(2643MiB/3003msec)
> dm-loop target:
> read: IOPS=425k, BW=1661MiB/s (1742MB/s)(4990MiB/3004msec)
> write: IOPS=425k, BW=1662MiB/s (1743MB/s)(4992MiB/3004msec)
> dm-ram target:
> read: IOPS=636k, BW=2484MiB/s (2605MB/s)(7464MiB/3005msec)
> write: IOPS=636k, BW=2484MiB/s (2605MB/s)(7464MiB/3005msec)
> </4K_RESULTS>
>
> <32K_RESULTS>
> loop driver:
> read: IOPS=55.5k, BW=1733MiB/s (1817MB/s)(5215MiB/3009msec)
> write: IOPS=55.2k, BW=1726MiB/s (1810MB/s)(5195MiB/3009msec)
> dm-loop target:
> read: IOPS=110k, BW=3452MiB/s (3620MB/s)(10.1GiB/3006msec)
> write: IOPS=110k, BW=3448MiB/s (3615MB/s)(10.1GiB/3006msec)
> dm-ram target:
> read: IOPS=355k, BW=10.8GiB/s (11.6GB/s)(32.6GiB/3008msec)
> write: IOPS=355k, BW=10.8GiB/s (11.6GB/s)(32.6GiB/3008msec)
> </32K_RESULTS>
>
>
> Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com>
>
> Heinz Mauelshagen (2):
> dm loop: new target redirecting io to backing file(s)
> dm ram: new target redirecting io to RAM
>
> Documentation/device-mapper/loop.txt | 20 ++
> Documentation/device-mapper/ram.txt | 15 ++
> drivers/md/Kconfig | 14 ++
> drivers/md/Makefile | 2 +
> drivers/md/dm-loop.c | 352 +++++++++++++++++++++++++++++++++++
> drivers/md/dm-ram.c | 101 ++++++++++
> 6 files changed, 504 insertions(+)
> create mode 100644 Documentation/device-mapper/loop.txt
> create mode 100644 Documentation/device-mapper/ram.txt
> create mode 100644 drivers/md/dm-loop.c
> create mode 100644 drivers/md/dm-ram.c
>
> --
> 2.14.3
>
> --
> dm-devel mailing list
> dm-devel@redhat.com
> https://www.redhat.com/mailman/listinfo/dm-devel
---end quoted text---
next prev parent reply other threads:[~2018-01-22 20:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-17 19:33 [PATCH 0/2] dm: add new loop and ram targets Heinz Mauelshagen
2018-01-17 19:34 ` [PATCH 1/2] dm loop: new target redirecting io to backing file(s) Heinz Mauelshagen
2018-01-17 19:34 ` [PATCH 2/2] dm ram: new target redirecting io to RAM Heinz Mauelshagen
2018-01-17 21:29 ` [PATCH 0/2] dm: add new loop and ram targets Mike Snitzer
2018-01-17 23:21 ` Heinz Mauelshagen
2018-01-18 0:36 ` Mike Snitzer
2018-01-18 11:42 ` Bryn M. Reeves
2018-01-18 11:56 ` Mike Snitzer
2018-01-18 12:06 ` Mike Snitzer
2018-01-22 20:19 ` Christoph Hellwig [this message]
2018-01-24 12:48 ` [dm-devel] " Heinz Mauelshagen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180122201944.GA7080@infradead.org \
--to=hch@infradead.org \
--cc=dm-devel@redhat.com \
--cc=heinzm@redhat.com \
--cc=linux-block@vger.kernel.org \
--cc=ming.lei@redhat.com \
--cc=snitzer@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).