All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sven Joachim <svenjoac@gmx.de>
To: Andreas Dilger <adilger@dilger.ca>
Cc: Renaud Mariana <rmariana@online.net>,
	Ext4 Developers List <linux-ext4@vger.kernel.org>,
	debian-dpkg@lists.debian.org
Subject: Re: HUGE slowdown when doing dpkg with ext4 over nbd
Date: Wed, 07 Dec 2016 19:34:17 +0100	[thread overview]
Message-ID: <8760mv4mhi.fsf@turtle.gmx.de> (raw)
In-Reply-To: <53212988-1445-45A4-B56F-0F240013B64C@dilger.ca> (Andreas Dilger's message of "Wed, 7 Dec 2016 11:16:42 -0700")

On 2016-12-07 11:16 -0700, Andreas Dilger wrote:

> Add debian-dpkg mailing list to CC.
>
> On Dec 7, 2016, at 10:58 AM, Andreas Dilger <adilger@dilger.ca> wrote:
>> 
>> On Dec 7, 2016, at 2:52 AM, Renaud Mariana <rmariana@online.net> wrote:
>>> 
>>> Here are my answers, hope it will help solve this issue, thanks.
>>> 
>>> Recap:
>>> dpkg kibana on ext4 over a nbd device takes 10 minutes
>>> with xfs it's only 30s.
>>> with ext4 no extends only 30s.
>>> 
>>> 
>>> kernels :
>>> 4.5.7 has this issue as older kernel like 4.4.34
>>> The issue is also when nbd client & server run on same host
>>> 
>>> 
>>> How small are the files?
>>> here is the histogram of file sizes : http://pasteboard.co/6HC3nKyk2.png
>>> We can see 5000 files around 512 Bytes.
>> 
>> Definitely there is no value to use fallocate for 512-byte files, or any
>> of the files that can be written in a single write() syscall.  I'd expect
>> any reasonable tool to be using a write buffer of at least 2-4MB these
>> days to get good performance, so writes below the buffer size shouldn't
>> use fallocate() at all.

It should be noted that the latest dpkg (1.18.15) only uses fallocate
for files which are at least 16 KiB in size[1], so it would be nice if
Renaud could recheck with that version, or cherry-pick the patch into
whatever version he uses.

>>> dpkg using fallocate() ?
>>> Yes, there are 16044 calls by the same process
>>> what are these uninitialized extents ?
>> 
>> Uninitialized extents are preallocated ranges of a file on disk that will
>> read back as zero, but are not necessarily zero-filled at allocation time.
>> For large files that are written randomly (or written slowly and may have
>> contention from other writers) fallocate() + uninitialized extents will
>> preallocate the space for the file so that it is (largely) contiguous on
>> disk and overwrites will not result in random block allocation.

Cheers,
       Sven


1. https://anonscm.debian.org/cgit/dpkg/dpkg.git/commit/?id=a971ad91437af8880cad4703695dcf12ee45959b

  reply	other threads:[~2016-12-07 18:34 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-06 13:13 HUGE slowdown when doing dpkg with ext4 over nbd Renaud Mariana
2016-12-06 18:45 ` Andreas Dilger
2016-12-07  9:52   ` Renaud Mariana
2016-12-07 16:24     ` Christoph Hellwig
2016-12-07 17:58     ` Andreas Dilger
2016-12-07 18:12       ` Andreas Dilger
2016-12-07 18:16       ` Andreas Dilger
2016-12-07 18:34         ` Sven Joachim [this message]
2016-12-07 20:14           ` Andreas Dilger
2016-12-08 13:14           ` Renaud Mariana
2016-12-09  1:25           ` Dave Chinner
2016-12-09 20:28             ` Andreas Dilger
2016-12-09 21:31               ` Dave Chinner

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=8760mv4mhi.fsf@turtle.gmx.de \
    --to=svenjoac@gmx.de \
    --cc=adilger@dilger.ca \
    --cc=debian-dpkg@lists.debian.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=rmariana@online.net \
    /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.