From: Mikulas Patocka <mpatocka@redhat.com>
To: Patrick Dung <patdung100@gmail.com>
Cc: dm-devel@redhat.com
Subject: Re: About dm-integrity layer and fsync
Date: Fri, 3 Jan 2020 12:14:07 -0500 (EST) [thread overview]
Message-ID: <alpine.LRH.2.02.2001031206190.11685@file01.intranet.prod.int.rdu2.redhat.com> (raw)
In-Reply-To: <CAJTWkdu1-k5m0F-uzp-EMrncL1w4wLqEi8LgF0U1Js_Nf-YphQ@mail.gmail.com>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 2018 bytes --]
On Fri, 3 Jan 2020, Patrick Dung wrote:
> Hello,
>
> A quick question on dm-integrity. Does dm-integrity layer honors fsync?
Yes it does.
However, it writes data into the journal and when the journal is flushed,
it reports the fsync function as finished.
On a mechanical disk, writes to contiguous space (i.e. the journal) are
faster than random writes all over the disk, that's why you see better
performance with dm-integrity than without it.
Mikulas
> I was testing dm-integrity and performance. It had a strange result that using dm-integrity with journal is faster than a normal file system or dm-integrity with
> bitmap (no journal). fio is used for testing the storage performance. The device is a SATA hard disk drive. Then I created a 100GB partition for testing.
>
> Below is the test cases:
>
> 1) XFS on a partition directly test case
>
> 2) dm-integrity: crc32c on a partition with default setting journal commit interval is 10 seconds. Then create XFS on it. test case
>
> 3) dm-integrity: crc32c on a partition default setting journal commit interval set to 5 seconds. Then create XFS on it.
>
> 4) dm-integrity: crc32c on a partition default setting but using bitmap instead of journal. Then create XFS on it.
>
> FIO command:
>
> fio --filename=./t1 --direct=1 --rw=randrw --refill_buffers --norandommap --randrepeat=0 --ioengine=sync --bs=4k --rwmixread=75 --iodepth=16 --numjobs=8 --runtime=60
> --group_reporting --fsync=1 --name=4ktest --size=4G
>
> Result:
>
> 1. Read/Write IOPS: 117/41. Read/Write Speed 481KB/s 168KB/s
> 2. Read/Write IOPS: 178/59. Read/Write Speed 732KB/s 244KB/s
> 3. Read/Write IOPS: 169/57. Read/Write Speed 695KB/s 236KB/s
> 4. Read/Write IOPS: 97/32. Read/Write Speed 400K/s 131KB/s
> The original discussion in: https://gitlab.com/cryptsetup/cryptsetup/issues/513 . Milan Broz said the dm-devel mailing list is a suitable place to discuss the probem.
>
> Thanks in advance.
>
> Patrick
>
>
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
next prev parent reply other threads:[~2020-01-03 17:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-03 15:51 About dm-integrity layer and fsync Patrick Dung
2020-01-03 17:14 ` Mikulas Patocka [this message]
2020-01-03 19:05 ` Patrick Dung
2020-01-05 9:39 ` Mikulas Patocka
2020-01-05 12:20 ` Patrick Dung
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=alpine.LRH.2.02.2001031206190.11685@file01.intranet.prod.int.rdu2.redhat.com \
--to=mpatocka@redhat.com \
--cc=dm-devel@redhat.com \
--cc=patdung100@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.