Comment 27 for bug 947664

Revision history for this message
Ted (ted276) wrote :

Anyone experiencing this issue may wish to try these and report back on what, if any, differences they make:

- Use dpkg's force-unsafe-io. Put "force-unsafe-io" in /etc/dpkg/dpkg.cfg.d/unsafe_io

- If using ext4, mount with the "nodelalloc" option. Either add it in /etc/fstab or remount with 'mount / -o remount,nodelalloc,<your other usual options>'

- Use libeatmydata (https://www.flamingspork.com/projects/libeatmydata/), which is an LD_PRELOAD library that will disable fsync() and related functions.

FYI, from the man page for dpkg:

              unsafe-io: Do not perform safe I/O operations when unpacking. Currently this implies not performing file system syncs before file renames, which is known to cause substantial performance degradation on some file systems, unfortunately the ones that require the safe I/O on the first place due to their unreliable behaviour causing zero-length files on abrupt system crashes.

              Note: For ext4, the main offender, consider using instead the mount option nodelalloc, which will fix both the performance degradation and the data safety issues, the latter by making the file system not produce zero-length files on abrupt system crashes with any software not doing syncs before atomic renames.

              Warning: Using this option might improve performance at the cost of losing data, use with care.