[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Pre-approval request for dpkg sync() changes for squeeze

On Sun, 21 Nov 2010, Ben Hutchings wrote:
> I'm coming to this late.  It sounds like dpkg has changed its behaviour
> several times recently.  Please can you summarise dpkg's current and
> proposed use of fsync() vs sync(), and the reasons for this.

Jonathan made a good summary of the history. I should add that dpkg uses
sync() instead of fsync() only on systems where we know that sync() is
synchronous (i.e. Linux only).

Now we want to stop using sync() because of the bad side-effects:
- using on a tmpfs is slower because it syncs changes on unrelated
- there are those reports of dpkg blocked due to the sync
  see http://bugs.debian.org/595927 http://bugs.debian.org/600075

> Also do I understand correctly that fsync() is more expensive when ext4
> delayed allocation is in use?

Apparently, at least for dpkg's usage pattern. But the performance are so
much slower that you have been asked whether it would make sense to change
the defaults on ext4 to include "nodelalloc".

Raphaël Hertzog ◈ Debian Developer

Follow my Debian News ▶ http://RaphaelHertzog.com (English)
                      ▶ http://RaphaelHertzog.fr (Français)

Reply to: