Re: Speeding up dpkg, a proposal
no need to CC Guillem privately, the dpkg maintainers are reachable at
On Wed, 02 Mar 2011, 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.
The big sync() doesn't work. It means dpkg never finishes its work on
systems with lots of unrelated I/O.
We have used that in the past and we had to revert, see
commit 5ee4e4e0458088cde1625ddb5a3d736f31a335d3 and the associated bug
Later we completely removed the codepath USE_SYNC_SYNC due to this. Even
if you're not using the sync() in the same way that we did, its mere usage
makes the whole solution a no-go.
Other people have already mentioned --force-unsafe-io as a way to recover
some of the performance lost. It does still sync the updates to the
internal database (but not the files installed by the packages).
We've seen reports of poor performance with btrfs (and that's what you use
for Meego IIRC) so you might want to investigate why btrfs is coping so
badly with a few fsync() just on the status files.
That's my 2cents on this discussion.
Raphaël Hertzog ◈ Debian Developer
Follow my Debian News ▶ http://RaphaelHertzog.com (English)
▶ http://RaphaelHertzog.fr (Français)