Re: Speeding up dpkg, a proposal
On Wed, Mar 02, 2011 at 08:13:06PM +0000, Roger Leigh wrote:
> On Thu, Mar 03, 2011 at 01:51:35AM +0800, Chow Loong Jin wrote:
> > Hi,
> > On Thursday 03,March,2011 12:02 AM, Marius Vollmer wrote:
> > > [...]
> > > - Instead, we move all packages that are to be unpacked into
> > > half-installed / reinstreq before touching the first one, and put a
> > > big sync() right before carefully writing /var/lib/dpkg/status.
> > Could we somehow avoid using sync()? sync() syncs all mounted filesystems,
> > which isn't exactly very friendly when you have a few slow-syncing
> > filesystems like btrfs (or even NFS) mounted. I recall my schroots that ran
> > on tmpfs unpacking exceptionally slowly due to this issue until I stuck
> > libeatmydata (or a variant of it) onto the schroots' dpkgs.
> Btrfs is quite simply awful in chroots at present, and it seems
> --force-unsafe-io doesn't really seem to help massively either.
> It's dog slow--it's quicker to untar a chroot onto ext3 than to
> bother with Btrfs.
> This is a shame, because Btrfs snapshots are the most fast and
> reliable out there at the moment (LVM snapshots are fast, but not
> /that/ fast, and LVM appears to have locking issues which need
> addressing to make it robust enough to handle simultaneous
> creation and removal of many snapshots.
> It would be great if there was a solution to this problem; is anyone
> running Btrfs as a root filesystem who has any suggestions?
eatmydata works great for my chroots on btrfs.