Linux boot time is more than windows boot time on old laptop/pc

On my Laptop which is Samsung rv509, I have tried many Linux distros but on all of them the boot time was never less than 30 seconds always between 30-50 seconds but on windows 8/10 it is less than 15 seconds :joy: .
laptop specs - [Specs Samsung RV RV509 39.6 cm (15.6") IntelĀ® Coreā„¢ i3 4 GB DDR3-SDRAM 500 GB HDD FreeDOS Grey Notebooks]
edit- i am thinking to add extra 4gb ram

If you use Windows 10 with its default configuration, it never shuts down properly, but always goes into hibernation/sleep with Fast Boot. So, yes, waking up from sleep is almost always faster than completely shutting down the computer and then starting it anew.

1 Like

WOW, you got a speed demon there. I have NEVER had any MS system boot that fast from a power off state (PS switched off). I think the fastest I ever had was 45 seconds and that was after some serious tweaking with no update coffee break.
My current system (the one I use all the time) boots in under 20 seconds from power on (PS switch).
Iā€™d like to know the boot times from cold-power switch on to fully ready (no spinning hour glass).

If your Linux distribution is systemd-based, thereā€™s systemd-analyze, which ā€œmay be used to determine system boot-up performance statistics and retrieve other state and tracing information from the system and service managerā€.

Some of the more useful subcommands:

  1. systemd-analyze time, which shows a summary of boot performance. On my desktop system running Fedora 33, I get:

    Startup finished in 1.160s (kernel) + 6.671s (initrd) + 26.489s (userspace) = 34.320s
    graphical.target reached after 26.474s in userspace

    Which largely aligns with your observations.

  2. systemd-analyze blame, which will list units in order of decreasing startup time. Iā€™m including this on the list, but in my experience itā€™s unfortunately only useful if you run it immediately after boot. It doesnā€™t seem to properly limit itself to the boot process, like other tools do, since on my system (22 days uptime) itā€™s listing my longest-startup-time units as dnf-makecache.service and fstrim.service, neither of which are started at boot.

    However, if run shortly after booting the system it may be quite helpful.

  3. systemd-analyze plot > filename.svg, which generates a Gantt chart-style graph of the boot process, resulting in a timeline for when each unit is started and how long it runs. From that graph on my system, I see that there are three major delay points in my systemā€™s startup:

    1. A (relatively) long delay, multiple seconds, before dracut-initqueue.service is started. This is likely due to dracut searching for the system root partition. The dracut(8) manpage offers some tips on improving this time:

      Speeding up the Boot Process

      If you want to speed up the boot process, you can specify as much information for dracut on the kernel command as possible. For example, you can tell dracut, that you root partition is not on a LVM volume or not on a raid partition, or that it lives inside a specific crypto LUKS encrypted volume. By default, dracut searches everywhere. A typical dracut kernel command line for a plain primary or logical partition would contain:

           rd.luks=0 rd.lvm=0 rd.md=0 rd.dm=0
      

      This turns off every automatic assembly of LVM, MD raids, DM raids and crypto LUKS.

    2. A very long delay of nearly 10 seconds for NetworkManager-wait-online.service, as network-enabled services canā€™t be launched until after the system has made its DHCP request and received an IP address and other network parameters
    3. A third, shorter delay before sys-subsystem-net-devices-docker0.device starts, which seems to be a delay introduced by the need for docker.service to have started up before its network bridge can be activated. So, I could likely eliminate that delay by disabling the bridge, if I chose to.

So, there you have it. The vast majority of boot delays in Linux distributions are caused by the fact that Linux waits for the network to come up before proceeding with the boot process, since there are network-dependent services that start at boot. Whereas IIRC with Windows 10, at least when using local accounts, it wonā€™t even start connecting to the network until after the user logs in.

1 Like

Windows uses a modified ā€˜shutdownā€™. It does not fully turn off all processes. The only way to really compare an honest boot time is to fully shut Windows down, then restart it.

However, even then you have to make sure itā€™s really a full shutdown. Windows tries to muddy the waters as much as possible, so people compare oranges to apples, to make it seem like Windows is actually quick.

Is the Linux system installed or are you using a test version of Linux on a USB stick?

I always modify Windows so it does a true shutdown. Basically it just disables hibernate. Then when I do the shutdown I issue the command ā€œshutdown -s -t 0ā€. That is a true shutdown with no hibernate or sleep.

On my wifeā€™s laptop which is an HP Envy x360 with a core i7, 8GB RAM, and 512GB SSD (SATA) I tweaked the BIOS to do a minimal system check at start time. I had a usable Windows desktop in 10 seconds.

After running for a few years like that it no longer starts that quickly.

My Ubuntu 21.04 install seems to start pretty quickly for me on a different laptop. The problem I see sometimes on shutdown is some snaps that have to shutdown before the system can shutdown.

I have noticed that Lubuntu 20.04 on my system takes a couple minutes. I have assumed it was due to the adoption of flatpacks and snaps, but I do not know. I have a lot of stuff installed bc if something does not work I will install another package like for example scanner software.

I installed actually.

plus i have window 8.1 installed so it boots faster within 15 seconds and I also donā€™t have battery in my laptop so no hibernation .

Perhaps I wasnā€™t clear enough in my explanations about how Fast Boot and other related ā€œfeaturesā€ work in Windows 10:

It has nothing to do with laptops or their batteries.

Windows has these options always enabled by default, independent of the hardware used. Windows always goes into some kind of Sleep or Hibernation mode, by default. You explicitly need to turn it off, for it to shut down completely. If you do not explicitly turn off that ā€œfeatureā€, then it will seem like Windows is super fast in booting up, when in reality itā€™s not even booting up, but waking up from Sleep or Hibernation.