[systemd-devel] Slow startup of systemd-journal on BTRFS

Lennart Poettering lennart at poettering.net
Fri Jun 20 06:08:39 PDT 2014


On Wed, 18.06.14 07:51, Tollef Fog Heen (tfheen at err.no) wrote:

> 
> ]] Lennart Poettering 
> 
> (trimming Ccs)
> 
> > I am invoking fallocate() in advance, because we write those files with
> > mmap() and that of course would normally triggered SIGBUS already on the
> > most boring of reasons, such as disk full/quota full or so. Hence,
> > before we do anything like that, we invoke fallocate() to ensure that
> > the space is actually available... As far as I can see, that pretty much
> > in line with what fallocate() is supposed to be useful for, the man page
> > says this explicitly:
> 
> OOI, why not use write + read-only mmap for reading?  In testing
> performance for another project, that's significantly faster than rw
> mmap.

Well, non-mmap stuff might indeed be quicker, but this isn't really
optimized to the last bit of speed but more to keep the code simple. And
the code is quite simple now, as we can use the same codepaths to locate
things for appending and for finding them...

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list