2 ms·
Try installing the wonderfully named 'eatmydata' package. Running 'eatmydata [command]' will execute the supplied command and will prevent it from syncing buffe
by joosters 11y ago
Try installing the wonderfully named 'eatmydata' package. Running 'eatmydata [command]' will execute the supplied command and will prevent it from syncing buffers to disk.
apt-get and dpkg call sync() and fsync() a lot to ensure file consistency in the event of power loss. This forces lots of tiny writes to disk. If you throw away the sync calls, the kernel can do a much better job of coalescing the writes into larger, contiguous I/O operations.
Now, obviously you are sacrificing reliability for speed here. You don't want to use 'eatmydata' with a long-running process as you are basically guaranteeing data loss. But for stuff like installing a new package on a system that is not going to suddenly lose power, it will speed things up surprisingly well.