FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Kernel

 
 
LinkBack Thread Tools
 
Old 07-07-2010, 04:55 PM
Jonathan Nieder
 
Default Bug#588339: sync() causes significant dpkg unpack performance degradation on tmpfs (pbuilder, piuparts, ...)

Hi kernel team,

Andreas Beckmann wrote:

> Unfortunately since the last dpkg changes concerning sync()/fsync() this
> no longer works out well - the continuous sync() from a "virtual" chroot
> on tmpfs hits the physical system really hard, causing speed loss
> factors between 3-5, probably more if multiple pbuilder builds/piuparts
> tests are run in parallel.

Why would sync() do anything on tmpfs? The s_bdi field from its
superblock is never set to non-NULL in mm/shmem.c, so that’s not it.
Ah, but sync_filesystems() iterates over all filesystems, not just
those accessible from the chroot.

This sucks. To recap:

1. On ext4 with certain mount options, using rename() without first
calling fsync() to get the data on disk has an unfortunate risk of
clearing out a file[1].

2. On ext4 with certain mount options, using fsync() instead of sync()
to sync a collection of newly installed files is unacceptably
slow[2].

3. sync() obviously does way more than we want it too, since it
touches files and filesystems that have nothing to do with
dpkg’s work.

So what should we do? Dear kernel, we will happily provide a list
of files we want to be renamed in place. Can you make sure they
have the right data without _repeatedly_ incurring the penalty of
fsync()?

Jonathan

[1] http://bugs.debian.org/567089
[2] http://bugs.debian.org/578635


--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20100707165534.GA1748@burratino">http://lists.debian.org/20100707165534.GA1748@burratino
 

Thread Tools




All times are GMT. The time now is 08:08 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org