puppylinux-woof-CE / woof-CE

woof - the Puppy builder
GNU General Public License v2.0
382 stars 273 forks source link

Reduce boot time by ~20% #4272

Closed dimkr closed 2 months ago

dimkr commented 2 months ago

In a very non-scientific test, boot time drops from ~25s to ~20s in a VM on my old laptop. I did some basic profiling and these three things are the top 3 time wasters in rc.sysinit.

(With many more optimizations, a dpup built using my woof-CE fork achieves 15-17s, but it also doesn't have X.Org, xorgwizard and other sources of slowness, so I don't think I have more optimizations to upstream)

peabee commented 2 months ago

Presumably the changes have been fully tested on real hardware and confirmed to work OK with all current builds and kernels? I haven't seen any problem reports about slow booting - although I guess being a bit quicker would be nice.

dimkr commented 2 months ago

Presumably the changes have been fully tested on real hardware

Also tested on real hardware, but it's harder to measure boot time (too many external variables)

peabee commented 2 months ago

@gyrog @techrockedge any views?

gyrog commented 2 months ago

Also tested on real hardware, but it's harder to measure boot time (too many external variables) Aren't the numbers at the beginning of a "dmesg" line the seconds since the begining of the boot? Maybe they would provide some indication of the speed of the boot.

I don't think anyone would complain about faster boots. So, provided it works reliably, and it's not slower, then it's probably worth a try.

I have no idea if the change away from a "udev replay loop" creates any issues for any Puppies, e.g. a re-woofed FossaPup, or spup.

techrockedge commented 2 months ago

"no idea if the change away from a "udev replay loop" creates any issues for any Puppies, e.g. a re-woofed FossaPup, or spup"

I have not tested what the effects would be, but if we can determine that Fossapup64 build will not be effected in it's boot cycle this commit should be merged.

dimkr commented 2 months ago

Puppy is the only distro that has this weird loop, which (as far as I see) tries to do the same thing as the udevadm trigger that follows but slower (because it's a shell script). udev is udev - if other distros start udev without this weird loop, it should work equally well on Puppy.

peabee commented 2 months ago

Pull request merged - will be used in future builds on 2 May - these need to be downloaded and tested on real hardware I suggest. I will do this for my builds but leave it up to others for legacy builds etc.