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

Re: Speeding up dpkg, a proposal

Marius Vollmer <marius.vollmer@nokia.com> writes:

> ext Chow Loong Jin <hyperair@ubuntu.com> writes:
>> 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.
> Hmm, right.  We could keep a list of all files that need fsyncing, and
> then fsync them all just before writing the checkpoint.
> Half of that is already done (for the content of the packages), we would
> need to add it for the files in /var/lib/dpkg/, or we could just fsync
> the whole directory.
> But then again, I would argue that the sync() is actually necessary
> always, for correct semantics: You also want to sync everything that the
> postinst script has done before recording that a package is fully
> installed.

Except for chroots, the throw away after use kind, this realy doesn't
matter. If the system crashes at any point before the chroot is thrown
away then it just gets thrown away after boot and the whole operation is
restarted from scratch.


Reply to: