On 01/01/2025 18:27, Aurélien COUDERC wrote:
Here’s a quick « benchmark » in a sid Plasma desktop qemu VM where I had a 
snapshot of up-to-date sid from Nov 24th, upgrading to today’s sid :

Summary:
   Upgrading: 658, Installing: 304, Removing: 58, Not Upgrading: 2
   Download size: 0 B / 1 032 MB
   Space needed: 573 MB / 9 051 MB available

# time apt -y full-upgrade

real    9m49,143s
user    2m16,581s
sys     1m17,361s

# time eatmydata apt -y full-upgrade

real    3m25,268s
user    2m26,820s
sys     1m16,784s

That’s close to a *3 times faster* wall clock time when run with eatmydata.

The second upgrade hasn't been written back at all. For up to 30 seconds, if your machine loses power and for example grub.{cfg,efi} or shim.efi was updated, you can't boot at all. Not to mention Kernel panics still happen.

Surely, we can all agree dpkg should at least do a single 'sync' at the end? Perhaps this would be a more realistic comparison?
# time (eatmydata apt -y full-upgrade; sync)

I wrote something to compare a single `dpkg --install`. This is on a stable chroot where I downloaded 2 packages. Installing and purging with/without eatmydata, but with an explicit sync.
`dpkg --install something; sync`
vs.
`eatmydata dpkg --install something; sync`

The two .debs were
-rw-r--r-- 1 root root 138K Jan  1 18:29 fdisk_2.38.1-5+deb12u2_amd64.deb
-rw-r--r-- 1 root root  12M Jan  1 18:29 
firmware-amd-graphics_20230210-5_all.deb


Running on an OKish SSD:
Warmup... Timing dpkg with fdisk .05 .04 .04 Warmup... Timing eatmydata dpkg with fdisk .03 .02 .02 Warmup... Timing dpkg with firmware-amd-graphics .46 .47 .45 Warmup... Timing eatmydata dpkg with firmware-amd-graphics .63 .63 .67

Running on the slowest mechanical HDD I have:
Warmup... Timing dpkg with fdisk .09 .08 .11 Warmup... Timing eatmydata dpkg with fdisk .05 .05 .05 Warmup... Timing dpkg with firmware-amd-graphics 3.46 3.58 3.46 Warmup... Timing eatmydata dpkg with firmware-amd-graphics 2.95 2.99 3.06

Not sure why SSD with eatmydata takes longer, but eatmydata is faster consistently on a mechanical, but still only a 15% improvement.

Script snippet here:
https://salsa.debian.org/-/snippets/765

--
Regards,
Ahmad

Reply via email to