From: Christoph Hellwig <hch@infradead.org>
To: Dave Chinner <david@fromorbit.com>
Cc: Gernot Hillier <gernot.hillier@siemens.com>,
linux-ext4@vger.kernel.org, guillem@debian.org
Subject: Re: unexpected sync delays in dpkg for small pre-allocated files on ext4
Date: Thu, 26 May 2016 00:02:17 -0700 [thread overview]
Message-ID: <20160526070217.GA12151@infradead.org> (raw)
In-Reply-To: <20160526022020.GG26977@dastard>
On Thu, May 26, 2016 at 12:20:20PM +1000, Dave Chinner wrote:
> Stupid question: why is dpkg using fallocate() for such small ranges
> like that? I can't think of a more inefficient way to do small IO -
> using delayed allocation is far more optimal from a layout,
> overhead, latency and IO perspective than the above forced
> allocation pseudo-synchronous write behaviour.
Below is the commit adding it. Guillem, can you explain what fallocate
in the dpkg is supposed to help with? The way it's it does fallocate
before writes that aren't spare it looks actively harmful for any
Linux file system.
commit 87b0b20b86407baf1deb4e91b3fd839e01228ac8
Author: Guillem Jover <guillem@debian.org>
Date: Tue Jul 15 21:00:52 2014 +0200
dpkg: Try to preallocate the disk size for extracted files
This might help in avoiding filesystem fragmentation, and possibly
improve performance on some filesystems.
We use the system specific methods if available, and possibly
improve performance on some filesystems.
We use the system specific methods if available, and only use
posix_fallocate() if nothing else is available, because on some systems
its semantics are counter to what we want to obtain here, as the libc
library will fallback to manually writing '\0' to each block to force
the preallocation, instead of just failing and leaving the application
to do so if desired.
next prev parent reply other threads:[~2016-05-26 7:02 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-24 17:07 unexpected sync delays in dpkg for small pre-allocated files on ext4 Gernot Hillier
2016-05-24 23:13 ` Theodore Ts'o
2016-05-30 8:27 ` Gernot Hillier
2016-05-31 0:21 ` Dave Chinner
2016-06-01 9:44 ` Gernot Hillier
2016-06-01 13:17 ` Gernot Hillier
2016-06-01 14:12 ` Theodore Ts'o
2016-06-02 16:23 ` Gernot Hillier
2016-07-13 13:57 ` Gernot Hillier
2016-05-26 2:20 ` Dave Chinner
2016-05-26 7:02 ` Christoph Hellwig [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-05-30 19:04 Jun He
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=20160526070217.GA12151@infradead.org \
--to=hch@infradead.org \
--cc=david@fromorbit.com \
--cc=gernot.hillier@siemens.com \
--cc=guillem@debian.org \
--cc=linux-ext4@vger.kernel.org \
/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.