On Thu, 2010-10-21 at 01:04 +0300, Modestas Vainius wrote: > Hello, > > On ketvirtadienis 21 Spalis 2010 00:11:05 Chanoch (Ken) Bloom wrote: > > This issue was current at the beginning of 2010, around the time Bug > > #567089 was filed and discussed. It's been fixed in the kernel since > > then. See http://lwn.net/Articles/322823/, and > > http://lwn.net/Articles/326471/ > > > > Does it still affect the shipping Debian kernel? > > ext3 is not a very big problem from my experience unless there is heavy I/O > in > the background. I use 2.6.35 kernel. > > > The problem here was "data=ordered". ext3 also suffered from this > > problem, since its default was "data=ordered". > > In brief, ONE fsync() call cost about as much as ONE sync() call. > > The solution was "don't use data=ordered" (and Linus patched the > > kernel to change the default) then fsync() will be suitably faster. > > ext4 and especially btrfs take a huge (in 10x-60x range) performance hit due > to those repetitive fsync() or sync() calls. But since dpkg keeps calling > sync(), performance suffers even if dpkg is not writing to ext4/btrfs file > system directly. > > My benchmarks are here: > > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=588254
The version you're using in Bug #588254 is the first version of dpkg() that uses sync(). What I'd like to establish is whether Linus and friends have fixed fsync() so that it's significantly faster than sync(). It sounded like that was their goal. Now, looking through the kernel git I'm not so sure, because commit aa32a796389bedbcf1c7714385b18714a0743810 switched ext3 back to data=ordered. See also commit 6d41807614151829ae17a3a58bff8572af5e407e which changed the Kconfig option to discuss the tradeoff. Probably the best thing to do is to take some benchmarks of both options (one version using fsync(), one version using sync(), one version without fsync or sync) on several filesystems with different mount options. Or just ask on lkml.org. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org