How can i evaluate/optimize boot time ?

Hello :wink:

with the following pc i have a 2 minutes time to boot the machine, this is untill i hear the kde music on the desktop, is there a good way to optimize/decrease boot time ?
I find it long , is this supposed to be ok ?

thanks :wink:



opensuse122:~ # systemd-analyze blame
 24310ms network.service
  7002ms nxserver.service
  6797ms systemd-modules-load.service
  5299ms systemd-vconsole-setup.service
  4740ms console-kit-log-system-start.service
  2454ms cycle.service
  2290ms avahi-daemon.service
  2286ms remount-rootfs.service
  2267ms localnet.service
  2251ms systemd-logind.service
  1921ms syslog.service
  1697ms udev.service                                                                                                                                                                                                                        
  1310ms fglrxrebuild.service                                                                                                                                                                                                                
  1294ms ntp.service                                                                                                                                                                                                                         
  1246ms apparmor.service                                                                                                                                                                                                                    
   714ms var-run.mount                                                                                                                                                                                                                       
   699ms var-lock.mount                                                                                                                                                                                                                      
   687ms media.mount                                                                                                                                                                                                                         
   680ms sys-kernel-debug.mount                                                                                                                                                                                                              
   665ms dev-hugepages.mount                                                                                                                                                                                                                 
   651ms systemd-tmpfiles-setup.service                                                                                                                                                                                                      
   651ms sys-kernel-security.mount                                                                                                                                                                                                           
   640ms dev-mqueue.mount                                                                                                                                                                                                                    
   629ms udev-root-symlink.service                                                                                                                                                                                                           
   613ms systemd-remount-api-vfs.service                                                                                                                                                                                                     
   491ms home.mount                                                                                                                                                                                                                          
   482ms vboxdrv.service                                                                                                                                                                                                                     
   450ms systemd-sysctl.service                                                                                                                                                                                                              
   357ms stockage3.mount                                                                                                                                                                                                                     
   337ms auditd.service                                                                                                                                                                                                                      
   329ms stockage2.mount                                                                                                                                                                                                                     
   274ms network-remotefs.service                                                                                                                                                                                                            
   250ms acpid.service                                                                                                                                                                                                                       
   139ms upower.service                                                                                                                                                                                                                      
   136ms rc-local.service                                                                                                                                                                                                                    
   127ms fbset.service                                                                                                                                                                                                                       
   125ms nxsensor.service                                                                                                                                                                                                                    
   124ms systemd-readahead-replay.service                                                                                                                                                                                                    
   120ms console-kit-daemon.service                                                                                                                                                                                                          
   115ms systemd-readahead-collect.service                                                                                                                                                                                                   
    81ms cpufreq.service                                                                                                                                                                                                                     
    62ms stockage1.mount
    58ms udev-trigger.service
    47ms udisks2.service
    43ms bluez-coldplug.service
    33ms sshd.service
    32ms rtkit-daemon.service
    30ms xdm.service
    29ms osvirtuels.mount
    29ms atieventsd.service
    27ms systemd-user-sessions.service
    19ms vboxballoonctrl-service.service
    16ms vboxautostart-service.service
    13ms vboxweb-service.service
opensuse122:~ # inxi -F
System:    Host: opensuse122 Kernel: 3.6.3-1-desktop i686 (32 bit) 
           Desktop N/A Distro: openSUSE 12.2 (i586) VERSION = 12.2 CODENAME = Mantis
Machine:   Mobo: N/A model: P43Twins1600 Bios: American Megatrends version: P1.80 date: 09/03/2008
CPU:       Dual core Intel Core2 Duo CPU E8400 (-MCP-) cache: 6144 KB flags: (lm nx sse sse2 sse3 sse4_1 ssse3 vmx) 
           Clock Speeds: 1: 2003.00 MHz 2: 3003.00 MHz
Graphics:  Card: Advanced Micro Devices [AMD] nee ATI RV770 [Radeon HD 4850] 
           X.org: 1.12.3 driver: fglrx tty size: 237x70 Advanced Data: N/A for root 
Audio:     Card-1: Advanced Micro Devices [AMD] nee ATI RV770 HDMI Audio [Radeon HD 4850/4870] driver: snd_hda_intel
           Card-2: Intel 82801JI (ICH10 Family) HD Audio Controller driver: snd_hda_intel
           Sound: Advanced Linux Sound Architecture ver: 1.0.25
Network:   Card: Realtek RTL8111/8168B PCI Express Gigabit Ethernet controller driver: r8169 
           IF: eth0 state: up speed: 100 Mbps duplex: full mac: 00:19:66:a0:a6:a4
Drives:    HDD Total Size: 1640.4GB (37.5% used) 1: /dev/sda WDC_WD1600PD 160.0GB 
           2: /dev/sdb WDC_WD1600PD 160.0GB 3: /dev/sdc ST3320620AS 320.1GB 
           4: /dev/sdd SAMSUNG_HD103UJ 1000.2GB 
Partition: ID: / size: 30G used: 27G (94%) fs: rootfs ID: / size: 30G used: 27G (94%) fs: ext4 
           ID: /home size: 113G used: 27G (25%) fs: ext4 ID: swap-1 size: 3.23GB used: 0.00GB (0%) fs: swap 
Sensors:   Error: You do not have the sensors app installed.
Info:      Processes: 202 Uptime: 1:22 Memory: 1256.1/3990.0MB Client: Shell inxi: 1.7.24 



I am not sure but would be interested in helping out. I disable a lot of services I do not need in Yast2 runlevel module for a start. Edit: Here is mine for comparison.


# systemd-analyze blame
  3079ms NetworkManager.service
  2791ms systemd-modules-load.service
  2783ms systemd-vconsole-setup.service
  2767ms SuSEfirewall2_init.service
  2711ms localnet.service
  1775ms vboxdrv.service
  1351ms remount-rootfs.service
  1262ms avahi-daemon.service
  1180ms systemd-logind.service
   863ms udev-root-symlink.service
   492ms syslog.service
   474ms SuSEfirewall2_setup.service
   436ms systemd-remount-api-vfs.service
   427ms fbset.service
   423ms cpufreq.service
   415ms console-kit-log-system-start.service
   413ms brld.service
   390ms udev.service
   301ms mnt-data.mount
   258ms systemd-readahead-replay.service
   253ms systemd-readahead-collect.service
   245ms media.mount
   205ms quota.service
   180ms systemd-sysctl.service
   151ms zramswap.service
   140ms network-remotefs.service
   136ms sshd.service
   134ms bluez-coldplug.service
   109ms xdm.service
    87ms upower.service
    83ms udev-trigger.service
    81ms rtkit-daemon.service
    72ms pm-profiler.service
    71ms rc-local.service
    71ms systemd-user-sessions.service
    60ms console-kit-daemon.service
    58ms var-lock.mount
    52ms systemd-tmpfiles-setup.service
    50ms var-run.mount
    46ms dev-hugepages.mount
    39ms vboxautostart-service.service
    38ms dev-mqueue.mount
    35ms sbl.service
    35ms network.service
    34ms sys-kernel-debug.mount
    34ms vboxweb-service.service
    32ms vboxballoonctrl-service.service
    19ms acpid.service
    19ms sys-kernel-security.mount
     3ms sys-fs-fuse-connections.mount

It is not correct calling all the time from switch on to the KDE music ā€œboot timeā€. This is booting and loging in. And the log in in KDE can take a lot of time (depending on all the applications that have to be started). Thus as long as you do not time and study those two things seperate, it is of not much use to give advise on (real) boot time improvement.

which services ? i turned off

nxserver.service
this gave me back some 5/7 seconds

then what can be done in kde ?

+1 from me. Noting that autologin as offered by most distros by default, does not make things better re. understanding the boot process.

Switch of Nepomuk, or narrow itā€™s indexing down to ~/Documents

Nepomuk is arleady off.
If i do not have autologin i guess booting (when i say booting itā€™s the time it takes before i can use the pc) will be longer.

i understand what you mean but iā€™m not really willing to understand in depth the ā€œboot processā€ :wink: iā€™d like to boot quicker :wink: For this was the case with 12.1 with the same config for example. Iā€™m not saying itā€™s that easy but trying to see if itā€™s possible or not, and why/where :wink:

Well there are 2 parts to starting the boot process which (if autologin is off) takes you to the login screen and then the desktop startup. As it stands because you have autologin on we donā€™t know if the problem is in the startup boot or the startup desktop. To know you need to turn autologin off and look at the two processes separately.

thanks for the input.
Iā€™d like to turn off the auto login to check if the boot process is ok or not but i donā€™t know where this is set (i did not thick the auto login option in system config panel of kde )

shall i turn off avahi daemon also ? (whatā€™s it used for ? )

Thanks :wink:

ok, i changed the /etc/sysconfig/displaymanager setting to blanck to that auto login is off

here 's the new result after desktop is reached , does it help ?



# systemd-analyze blame
 23174ms network.service
  6600ms nxserver.service
  6480ms systemd-modules-load.service
  4866ms systemd-vconsole-setup.service
  2998ms avahi-daemon.service
  2952ms systemd-logind.service
  2747ms syslog.service
  2362ms cycle.service
  2322ms localnet.service
  2315ms remount-rootfs.service
  1811ms var-run.mount
  1806ms var-lock.mount
  1789ms media.mount
  1772ms dev-hugepages.mount
  1770ms sys-kernel-debug.mount
  1752ms sys-kernel-security.mount
  1743ms dev-mqueue.mount
  1717ms systemd-remount-api-vfs.service
  1510ms udev-root-symlink.service
  1431ms fglrxrebuild.service
  1218ms ntp.service
   986ms systemd-tmpfiles-setup.service
   959ms apparmor.service
   694ms home.mount
   543ms systemd-sysctl.service
   533ms udev-trigger.service
   393ms vboxdrv.service
   384ms upower.service
   274ms network-remotefs.service
   213ms console-kit-log-system-start.service
   194ms udev.service
   186ms auditd.service
   132ms stockage3.mount
   129ms systemd-readahead-replay.service
   127ms fbset.service
   118ms rc-local.service
   112ms console-kit-daemon.service
   111ms systemd-readahead-collect.service                                                                                                                                                                                                   
    99ms acpid.service                                                                                                                                                                                                                       
    89ms stockage2.mount                                                                                                                                                                                                                     
    88ms cpufreq.service                                                                                                                                                                                                                     
    50ms atieventsd.service                                                                                                                                                                                                                  
    48ms udisks2.service                                                                                                                                                                                                                     
    46ms bluez-coldplug.service                                                                                                                                                                                                              
    40ms rtkit-daemon.service                                                                                                                                                                                                                
    36ms xdm.service                                                                                                                                                                                                                         
    35ms sshd.service                                                                                                                                                                                                                        
    29ms osvirtuels.mount                                                                                                                                                                                                                    
    22ms systemd-user-sessions.service                                                                                                                                                                                                       
    20ms vboxballoonctrl-service.service                                                                                                                                                                                                     
    17ms vboxweb-service.service                                                                                                                                                                                                             
    17ms stockage1.mount                                                                                                                                                                                                                     
    15ms vboxautostart-service.service                                                                                                                                                                                                       
     1ms sys-fs-fuse-connections.mount 


I am curious about that 23174ms network.service. Perhaps is it looking for ipv6 or something and timing out? Perhaps disable any network cards you are not using and if you do not use ipv6 try disabling that in the yast -> network section.

My 12.2-KDE4.9.2 system also takes a lot of time to get going. I have checked that ipv6 is not significantly involved. But the start-up of the ntp procedure took about 35 s. (Tested by not starting it.) Now that my curiosity has been satisfied, I have reactivated ntp since it performs a useful function.

Do you have NTPD_FORCE_SYNC_ON_STARTUP enabled?

I see no significant difference in start-up time with NTPD_Force_SYNC_ON_STARTUP true of false

now ipv6 was to blame for me ,

then i have this question : where am I supposed to add the plymouth.enable=0 option for it to be all the time ? if I add it with yast editing the grub settings at the end of kernel options I have a kernel panic (I skipped initrd which works , but disabling plymouth also does not)

thanks :wink:

I am not sure about the plymouth option if that is correct or not; But I am able to add grub2 parameters successfully in yast by going to: Yast2 -> Boot Loader -> Boot Loader Options. And there is a line called ā€œOptional Kernel Command Line Parameterā€. I appended elevator=deadline to this and hit ok, ok, and it saved the boot loader. Reboot and no panics and my disks successfully use deadline scheduler. So it works.

iā€™m not using grub2 but grub,
whatā€™s elevator ?

Elevator is just an example of a boot parameter. Not related to the issue. I do not know if plymouth=0 works or not.

As on my system, systemd also claimed that network takes that long, I am curious: Did you disable the splash screen during boot? Can you then see some longer time no new output on the screen?

Get an SSD! A new install of 12.2/KDE 4.9.x gets to playing the sound in 34s, on a very old MB & CPU, (SATA2), would be even faster with SATA3!