You are not logged in.

#1 2020-03-10 18:13:05

filou13auriol
Member
Registered: 2020-03-01
Posts: 6

start OS optimisation

hi everyone from bunsen comunity,

I  don't know how optimize sarting on my (not so young) laptop dell D630.

first, to know starting time, I've used command:
systemd-analyze
and what it return:

Startup finished in 5.899s (kernel) + 23.744s (userspace) = 29.643s

next,to see process on OS strating I've used command:
systemd-analyze blame
and what it return:

          8.665s NetworkManager-wait-online.service
          5.511s dev-sda1.device
          4.737s ModemManager.service
          3.779s NetworkManager.service
          3.538s loadcpufreq.service
          2.003s dev-loop0.device
          1.977s systemd-rfkill.service
          1.920s lvm2-monitor.service
          1.907s networking.service
          1.856s polkit.service
          1.701s systemd-logind.service
          1.689s lm-sensors.service
          1.679s systemd-udevd.service
          1.632s rsyslog.service
          1.214s keyboard-setup.service
          1.035s dev-mqueue.mount
          1.033s sys-kernel-debug.mount
          1.032s dev-hugepages.mount
          1.024s binfmt-support.service
           671ms systemd-modules-load.service
           643ms kmod-static-nodes.service
           629ms lightdm.service
           627ms ntp.service
           593ms colord.service
           515ms snap-core-8689.mount
           507ms upower.service
           498ms systemd-user-sessions.service
           454ms systemd-remount-fs.service
           454ms console-setup.service
           431ms systemd-udev-trigger.service
           418ms systemd-tmpfiles-setup-dev.service
           400ms hddtemp.service
           348ms wpa_supplicant.service
           318ms avahi-daemon.service
           316ms proc-sys-fs-binfmt_misc.mount
           311ms dev-disk-by\x2duuid-672332c9\x2d86a5\x2d445d\x2dbb18\x2d41948769ea51.swap
           300ms systemd-random-seed.service
           293ms systemd-tmpfiles-setup.service
           251ms systemd-update-utmp.service
           229ms systemd-journald.service
           202ms cpufrequtils.service
           198ms systemd-sysctl.service
           166ms systemd-backlight@backlight:intel_backlight.service
           147ms user@109.service
           128ms systemd-journal-flush.service
           126ms udisks2.service
            60ms systemd-tmpfiles-clean.service
            43ms user@1000.service
            42ms systemd-backlight@leds:dell::kbd_backlight.service
            39ms systemd-backlight@backlight:dell_backlight.service
            30ms alsa-restore.service
             7ms systemd-update-utmp-runlevel.service
             4ms sys-fs-fuse-connections.mount

anyone have an idea to reduce starting time, some process I can blacklist or something else ???

Offline

#2 2020-03-10 18:32:04

unklar
Member
Registered: 2015-10-31
Posts: 1,093

Re: start OS optimisation

systemd-analyze critical-chain

that tells you who dawdles

This is a difficult issue in the meantime...   hmm

Offline

#3 2020-03-10 19:15:57

rbh
Member
From: Sweden/Vasterbotten/Rusfors
Registered: 2016-08-11
Posts: 330

Re: start OS optimisation

Do you realey think 30 s is long time to start the Del D630?

But, of cource it is possible to tweak and spead up the start.

Do you realey use "Logical Volume Manager" (service lvm2) and avahidaemon and ModemManager and... On my old Dell and IB thinkpad, I have disabled those services.

If you do not know what the services do, perform an internet search. Here is about the avahi-daemon.service: https://wiki.archlinux.org/index.php/Avahi.
I prefer to use static adresses on services on my lan. No need use avahi!

You can in terminal list all running services with the command "systemctl"
The list of services is paged. When yoy see service avahi-daemon.service, copy the text "avahi-daemon.service".
Open a new termina tab and change too root:

# sudo su -

Stop the service test if it is ok for you and if so, disable it:

# systemctl stop avahi-daemon.service
# systemctl disable avahi-daemon.service

You can also instead of shuting down, only suspend.

some more tips on https://wiki.debian.org/BootProcessSpeedup

Last edited by rbh (2020-03-10 19:17:26)


// Regards rbh

Offline

#4 2020-03-11 14:04:44

rbh
Member
From: Sweden/Vasterbotten/Rusfors
Registered: 2016-08-11
Posts: 330

Re: start OS optimisation

Have you edited /etc/default/grub?

GRUB_TIMEOUT=5, can be edited to GRUB_TIMEOUT=1

Also, if you are sole user, enable autologin can be a good idé.


// Regards rbh

Offline

#5 2020-03-12 14:16:15

filou13auriol
Member
Registered: 2020-03-01
Posts: 6

Re: start OS optimisation

thanks everyone for your answers. I have to check few things to answer correctly, but now I can answer follows:



unklar wrote:
systemd-analyze critical-chain

here console return:

The time after the unit is active or started is printed after the "@" character.
The time the unit takes to start is printed after the "+" character.

graphical.target @22.584s
└─multi-user.target @22.584s
  └─ntp.service @22.257s +326ms
    └─network-online.target @22.256s
      └─NetworkManager-wait-online.service @14.480s +7.775s
        └─NetworkManager.service @11.564s +2.913s
          └─dbus.service @9.135s
            └─basic.target @9.084s
              └─sockets.target @9.084s
                └─avahi-daemon.socket @9.084s
                  └─sysinit.target @9.041s
                    └─swap.target @9.040s
                      └─dev-disk-by\x2duuid-672332c9\x2d86a5\x2d445d\x2dbb18\x2d4194
                        └─dev-disk-by\x2duuid-672332c9\x2d86a5\x2d445d\x2dbb18\x2d41

I don't know what i can do with this... I have to check on the web what are corresponding ntp.service and NetworkManager-wait-online.service and the others.. and how can I stop the unwanted services during startup.



rbh wrote:

Do you realey think 30 s is long time to start the Del D630?

Of course not. It is a really good time to start up on this oldie, compare to more 5 minutes with Vista previously installed. I only want to learn to optimize my computer. It can be an interesting experience for later, on other computer. Actually I'm a newby, maybe one day I will try to optimize my kernel module... but not now smile

rbh wrote:

Do you realey use "Logical Volume Manager" (service lvm2) and avahidaemon and ModemManager and...

In fact, I don't know, so I have to check it in doing internet search. I will let you know.



rbh wrote:

Have you edited /etc/default/grub?
GRUB_TIMEOUT=5, can be edited to GRUB_TIMEOUT=1
Also, if you are sole user, enable autologin can be a good idé.

ok, changed now, here my grub:  (I don't want autologin for security reasons)

GRUB_DEFAULT=0
GRUB_TIMEOUT=1
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash video=SVIDEO-1:d"
GRUB_CMDLINE_LINUX=""

and made a sudo update-grub. And now my console return:

Startup finished in 6.619s (kernel) + 22.596s (userspace) = 29.215s

kernel is ,now more longer ??? 6.619s instead of 5.899s. A little bit strange, isn't it ?

Last edited by filou13auriol (2020-03-12 14:29:20)

Offline

#6 2020-03-12 14:38:19

rbh
Member
From: Sweden/Vasterbotten/Rusfors
Registered: 2016-08-11
Posts: 330

Re: start OS optimisation

How many times have you checked the boot time? It is a very little diiference, I think the 4 s you cut from grub is not acountd for. The pc was waiting 4 s before booting...

Another thng, I prefer to see bootmessages, insted of a splashscreen. It is nowadays hard to realey read al text, but if anything goes wrong, one see red text flashing. Sometimes the text stops scrolling for some second.

But, you are realey finetuning and that does not come easy...

ntp.service, is clock syncing. Good to have. If clock is drifting too much, apt-repos can be invalid.


// Regards rbh

Offline

#7 2020-03-12 21:32:14

filou13auriol
Member
Registered: 2020-03-01
Posts: 6

Re: start OS optimisation

rbh wrote:

ntp.service, is clock syncing. Good to have. If clock is drifting too much, apt-repos can be invalid.

ok, thanks... so I will not touch ntp.service

Offline

#8 2020-03-13 07:14:05

ohnonot
...again
Registered: 2015-09-29
Posts: 4,418
Website

Re: start OS optimisation

filou13auriol wrote:
8.665s NetworkManager-wait-online.service

There's 8s you can shave off.
https://bbs.archlinux.org/viewtopic.php?id=202628

Offline

#9 2020-03-13 09:39:08

filou13auriol
Member
Registered: 2020-03-01
Posts: 6

Re: start OS optimisation

regarding  NetworkManager-wait-online.service:

ohnonot wrote:

so, a stupid question from the noob I am:

if I disable or mask  NetworkManager, may I still use internet, in ethernet or wifi ??
because if not, I will not do it. I need a connection. smile

Offline

#10 2020-03-13 11:16:55

rbh
Member
From: Sweden/Vasterbotten/Rusfors
Registered: 2016-08-11
Posts: 330

Re: start OS optimisation

filou13auriol wrote:

if I disable or mask  NetworkManager, may I still use internet, in ethernet or wifi ??
because if not, I will not do it. I need a connection. smile

If you disable NetworkManager, you have to configure the network with some other tool than the default (NetworkManager).
If you have cable connection to the router, you can configure a static ip-adress.
There is other tools to configure wifi.

But, the link was about  NetworkManager-wait-online.service! I was surprised to learn that is not needed for the NetworkManager.service.

The link mentioned the user had to mask NetworkManager.service, not disable it.
I have done so now on the laptop I'm using now. Wifi works without starting NetworkManager-wait-online.service,

Last edited by rbh (2020-03-13 11:17:59)


// Regards rbh

Offline

#11 2020-03-14 20:41:06

filou13auriol
Member
Registered: 2020-03-01
Posts: 6

Re: start OS optimisation

thanks a lot rbh.

I made a systemctl mask NetworkManager-wait-online.service.

folllowing, the result of systemd-analyze critical-chain:

graphical.target @16.604s
└─multi-user.target @16.604s
  └─ntp.service @14.857s +1.747s
    └─network-online.target @14.856s
      └─network.target @14.856s
        └─NetworkManager.service @11.097s +3.758s
          └─dbus.service @10.002s
            └─basic.target @9.972s
              └─paths.target @9.972s
                └─cups.path @9.972s
                  └─sysinit.target @9.864s
                    └─systemd-backlight@backlight:dell_backlight.service @11.183s +297ms
                      └─system-systemd\x2dbacklight.slice @6.059s
                        └─system.slice @1.962s
                          └─-.slice @1.777s

and systemd-analyse time is now 22.422s vs previously 29.215s.

Cool...   cool

Offline

Board footer

Powered by FluxBB