From: Dave Chinner <david@fromorbit.com>
To: kreijack@inwind.it
Cc: systemd Mailing List <systemd-devel@lists.freedesktop.org>,
linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: Slow startup of systemd-journal on BTRFS
Date: Thu, 12 Jun 2014 11:37:28 +1000 [thread overview]
Message-ID: <20140612013728.GP4453@dastard> (raw)
In-Reply-To: <20140612012104.GO9508@dastard>
On Thu, Jun 12, 2014 at 11:21:04AM +1000, Dave Chinner wrote:
> On Wed, Jun 11, 2014 at 11:28:54PM +0200, Goffredo Baroncelli wrote:
> > Hi all,
> >
> > I would like to share a my experience about a slowness of systemd when used on BTRFS.
> >
> > My boot time was very high (about ~50 seconds); most of time it was due to NetworkManager which took about 30-40 seconds to start (this data came from "systemd-analyze plot").
> >
> > I make several attempts to address this issue. Also I noticed that sometime this problem disappeared; but I was never able to understand why.
> >
> > However this link
> >
> > https://bugzilla.redhat.com/show_bug.cgi?id=1006386
> >
> > suggested me that the problem could be due to a bad interaction between systemd and btrfs. NetworkManager was innocent.
>
> systemd has a very stupid journal write pattern. It checks if there
> is space in the file for the write, and if not it fallocates the
> small amount of space it needs (it does *4 byte* fallocate calls!)
> and then does the write to it. All this does is fragment the crap
> out of the log files because the filesystems cannot optimise the
> allocation patterns.
>
> Yup, it fragments journal files on XFS, too.
>
> http://oss.sgi.com/archives/xfs/2014-03/msg00322.html
>
> IIRC, the systemd developers consider this a filesystem problem and
> so refused to change the systemd code to be nice to the filesystem
> allocators, even though they don't actually need to use fallocate...
BTW, the systemd list is subscriber only, so thay aren't going to
see anything that we comment on from a cross-post to the btrfs list.
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2014-06-12 1:37 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-11 21:28 Slow startup of systemd-journal on BTRFS Goffredo Baroncelli
2014-06-12 0:40 ` Chris Murphy
2014-06-12 1:18 ` Russell Coker
2014-06-12 4:39 ` Duncan
2014-06-12 1:21 ` Dave Chinner
2014-06-12 1:37 ` Dave Chinner [this message]
2014-06-12 2:32 ` Chris Murphy
2014-06-15 22:34 ` [systemd-devel] " Lennart Poettering
2014-06-16 4:01 ` Chris Murphy
2014-06-16 4:38 ` cwillu
-- strict thread matches above, loose matches on Subject: below --
2014-06-12 11:13 R: " Goffredo Baroncelli <kreijack@libero.it>
2014-06-12 12:37 ` Duncan
2014-06-12 23:24 ` Dave Chinner
2014-06-13 22:19 ` Goffredo Baroncelli
2014-06-14 2:53 ` Duncan
2014-06-14 7:52 ` Goffredo Baroncelli
2014-06-15 5:43 ` Duncan
2014-06-14 10:59 ` Kai Krakow
2014-06-15 5:02 ` Duncan
2014-06-15 11:18 ` Kai Krakow
2014-06-15 21:45 ` Martin Steigerwald
2014-06-15 21:51 ` Hugo Mills
2014-06-15 21:31 ` Martin Steigerwald
2014-06-15 21:37 ` Hugo Mills
2014-06-17 8:22 ` Duncan
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=20140612013728.GP4453@dastard \
--to=david@fromorbit.com \
--cc=kreijack@inwind.it \
--cc=linux-btrfs@vger.kernel.org \
--cc=systemd-devel@lists.freedesktop.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 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).