From: Arno Wagner <arno@wagner.name>
To: dm-crypt@saout.de
Subject: Re: [dm-crypt] dm-crypt flush-to-disk freezes
Date: Wed, 25 Aug 2010 04:40:04 +0200 [thread overview]
Message-ID: <20100825024003.GA27253@tansi.org> (raw)
In-Reply-To: <4C721F98.2090700@redhat.com>
On Mon, Aug 23, 2010 at 09:13:28AM +0200, Milan Broz wrote:
> On 08/22/2010 11:42 PM, Christoph Anton Mitterer wrote:
> > On Sun, 2010-08-22 at 21:52 +0200, Arno Wagner wrote:
> >> What do I lose with barriers off?
> > data security ;)
> >
> >
> > In case of the filesystem barriers (not the IO barriers, which are
> > different AFAIK) they're used to make sure, that the COMMITS in the
> > journal are written after the journal is correctly flushed out.
>
> Slight confusion here.
>
> FS uses flush (called by fsync for example), it is currently implemented
> using IO barrier.
Ok. So is a process calls fsync on a file, this happens.
> After this operation, FS code can be sure that preceding barrier
> reached disk.
> (Device-mapper internally waits for all IO to finish, processing always
> one barrier at a time and queuing following requests.)
Seems there is some backlog in my case.
What I find curious is that plain ext3 on RAID1 (same disks,
different partitions) does not cause problems. I would
expect that an fsync blocks the disk, not only the partition.
Maybe having the system and data on different filesystems just
reduced the backlog enough.
> If you disable it, data simply reach disk later and e.g. unexpected
> power loss can cause quite serious data loss.
> But you probably see better performance.
I went back to ext2 for the time being. This is used only to
work on Word documents. The data gets copied off imediately
anyways and I have a backup of the complete VM in case
something breaks.
> So disabling barriers helps in your case? Then probably some tuning
> of fs can help also.
I would expect that. Especially more aggressive flushing
should help. Will look into it when I have time. For the moment
I am happy to have a solution that does not increase the
considerable pain level word manages to cause all by itself
(I am a LeTeX person....).
> (There is ongoing discussion about reimplementing barriers in block
> layer, maybe it will slightly help here too.)
I find them quite a pain sometimes, especially when writing
large amounts of data. I used to have a fine-tuned parameter set
that managed to almost completely avoid emergency flushes, while
having minimal impact on performance. Then the kernel devs decided
to take the interface away. I am still mad at them for that.
Should probably look at this again.
Arno
--
Arno Wagner, Dr. sc. techn., Dipl. Inform., CISSP -- Email: arno@wagner.name
GnuPG: ID: 1E25338F FP: 0C30 5782 9D93 F785 E79C 0296 797F 6B50 1E25 338F
----
Cuddly UI's are the manifestation of wishful thinking. -- Dylan Evans
If it's in the news, don't worry about it. The very definition of
"news" is "something that hardly ever happens." -- Bruce Schneier
next prev parent reply other threads:[~2010-08-25 2:40 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-17 18:46 [dm-crypt] dm-crypt flush-to-disk freezes Arno Wagner
2010-08-18 8:31 ` Heinz Diehl
2010-08-18 11:09 ` Rick Moritz
2010-08-18 11:43 ` Milan Broz
2010-08-18 13:18 ` Heinz Diehl
2010-08-18 14:36 ` Milan Broz
2010-08-18 13:22 ` Heinz Diehl
2010-08-18 14:12 ` Arno Wagner
2010-08-18 14:47 ` Milan Broz
2010-08-18 15:44 ` Arno Wagner
2010-08-22 19:52 ` Arno Wagner
2010-08-22 21:42 ` Christoph Anton Mitterer
2010-08-22 21:51 ` Arno Wagner
2010-08-22 21:58 ` Christoph Anton Mitterer
2010-08-22 22:01 ` Christoph Anton Mitterer
2010-08-23 6:24 ` Heinz Diehl
2010-08-23 0:47 ` Arno Wagner
2010-08-23 7:13 ` Milan Broz
2010-08-25 2:40 ` Arno Wagner [this message]
2010-08-25 14:13 ` Heinz Diehl
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=20100825024003.GA27253@tansi.org \
--to=arno@wagner.name \
--cc=dm-crypt@saout.de \
/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