You are not logged in.

#1 2017-11-23 01:42:11

probackup-nl
Member
From: Delft
Registered: 2017-11-15
Posts: 93
Website

lsinitcpio 24: Estimated extraction time, does it need a cache warning

I was wondering whether the lsinitcpio "Estimated extraction time" would include or exclude disk i/o.

To test this, I made both speed (lz4 -l; 5.2MiB) and size (lzma -9; 2.5MiB) copies of the initramfs file and copied these files also onto a much slower USB2 stick (flash drive).

hdparm -t /dev/sdX1

stick A: 132 MB/sec (USB-3)
stick B: 36 MB/sec (USB-2)

I noticed that lsinitcpio estimated extraction time results from both drives were near identical. Hmmm, what could that be? Ah, disk caching.

After purging the disk caches with

sync && echo 3 | tee /proc/sys/vm/drop_caches

in between each lsinitcpio, extraction time results are different:

stick A 5.2MiB initramfs.img: Estimated extraction time: 0.077s  (cached: 0.028s)
stick B 5.2MiB initramfs.img: Estimated extraction time: 0.171s  (cached: 0.029s)

stick A 2.4MiB initramfs.img: Estimated extraction time: 0.514s  (cached: 0.497s)
stick B 2.4MiB initramfs.img: Estimated extraction time: 0.512s  (cached: 0.497s)

Would lsinitcpio need some wording/warning that the estimates are cached results?

---

==> Image: /boot/initramfs-linux-tiny.img.lzma
==> Created with mkinitcpio 24
==> Kernel: 4.13.12-1-ARCH
==> Size: 2.46 MiB
==> Compressed with: lzma
  -> Uncompressed size: 9.28 MiB (.265 ratio)
  -> Estimated extraction time: 0.497s

==> Included modules:
atkbd [explicit]	hid			scsi_mod		usb-storage
btrfs [explicit]	hid-generic [explicit]	sd_mod [explicit]	usbcore
crc32c-intel [explicit]	i8042 [explicit]	serio			usbhid [explicit]
crc32c_generic		libcrc32c		serio_raw [explicit]	xhci-hcd
ehci-hcd		libps2			uas [explicit]		xhci-pci [explicit]
ehci-pci [explicit]	raid6_pq		usb-common		xor

==> Included binaries:
blkid		btrfsck		dosfsck		fsck.btrfs	kmod		switch_root
btrfs		busybox		fsck		fsck.vfat	mount

==> Hook run order:
  without-udev

Last edited by probackup-nl (2017-11-23 01:43:42)

Offline

#2 2017-11-23 02:07:04

ooo
Member
Registered: 2013-04-10
Posts: 1,638

Re: lsinitcpio 24: Estimated extraction time, does it need a cache warning

I suppose the idea is to give estimate of initramfs extraction time during system boot-up, which should always be non-cached reads. Therefore lsinitcpio reporting estimate based on cached reads would seem like uninteded behavior.

In any case, I don't think the estimate should differ between subsequent runs.
I think this is something that should be reported as a bug.

Offline

#3 2017-11-25 15:24:13

probackup-nl
Member
From: Delft
Registered: 2017-11-15
Posts: 93
Website

Re: lsinitcpio 24: Estimated extraction time, does it need a cache warning

https://bugs.archlinux.org/task/56417

Last edited by probackup-nl (2017-11-25 15:24:25)

Offline

Board footer

Powered by FluxBB