On Sun, Nov 21, 2010 at 09:18:04AM +0100, Raphael Hertzog wrote: > 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 > filesystems > - 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".
Something that might be worth trying is using fallocate, which /might/ mitigate the delayed allocation effects. Mike -- To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20101121100802.ga3...@glandium.org