Slow boot time with openSUSE 12.2 in a good laptop.

Hello,

I installed Opensuse 12.2 in a new laptop two months ago and notice a slow boot time, now finally I am trying to discover why the boot is taking so long to finish. I am still a noob with linux, I am using it since version 11.4 mostly with Xfce desktop.

I am struggling to find out what is causing the delay and I have also notice that the boot time is increasing over the time. I thought of asking for help in this forum.

The laptop boot time was like that:

> systemd-analyze
Startup finished in 6807ms (kernel) + 38714ms (userspace) = 45522ms

> systemd-analyze blame
31171ms systemd-vconsole-setup.service
30769ms systemd-modules-load.service
25792ms udev.service
1665ms SuSEfirewall2_init.service
1448ms remount-rootfs.service
1172ms NetworkManager.service

In order to collect the log files just for one Boot I usually delete “warn” and “messages” files from “/var/log” before reboot. I tryed to analyze these two files but I couldn’t figure out any possible source of problems. As “systemd-analyze” points out long times for the “systemd” services I am guessing that it could be a problem with “systemd” itself.

I found out that “systemd” has a logging service “systemd-journald” that stores the log at “/run/log/journal/…”. To my surprise the “system.journal.log” was more than 120MB big

After deleting 120+ MB log from /var/log/journal/41ef233e76e7528b304b79b700000697/system.journal.log and rebooting I’ve got a significant improvement in the boot time.

systemd-analyze

Startup finished in 6684ms (kernel) + 17854ms (userspace) = 24539ms

systemd-analyze blame

13228ms remount-rootfs.service
12545ms systemd-modules-load.service
8847ms udev-trigger.service
3705ms systemd-vconsole-setup.service
1413ms localnet.service
850ms cycle.service

Big log files slowing down systems is not a novelty, but I still not pleased with the boot time and I still suspecting it is a problem with systemd. That is why I am attaching some log files to this thread and asking for any good soul to analize then point out what could be the the problem.

logs from /var/log (.log extension added)
warn.log
messages.log

systemd-journal
systemd-journalctl -a > systemd-journal.log

dmesg
dmesg > dmesg.log

systemd-analyze
systemd-analyze blame > blame.log
systemd-analyze plot > plot.svg (print screen: plot.png)

https://docs.google.com/file/d/0B4qdFC2RFDsGU3ZIUjdqUkRNZUE/edit

Systemd configuration
/etc/systemd/system.conf

[Manager]
LogLevel=debug
LogTarget=syslog-or-kmsg
SysVConsole=no

[HR][/HR]
Hardware: Dell
Model: Latitude E6430
HD: 7200 RPM
CPU: Intel Core i7-3520M CPU @ 2.90GHz
Memory: 2 X 4 GB 1600 MHz DDR3
Graphics: Intel HD 4000
Bios: “A07” “10/08/2012”

System: openSUSE 12.2 (x86_64)

Desktops:
Xfce 4.10 - most used
Gnome 3,4,2.1
KDE 4.8.5

Thank you very much
Best Regards
Marcilio

hi Marcilio

Similar problems have been encountered on different machines,
on installs and updates

pulseaudio seems to be the culprit, it can add up to 40 seconds onto the startup times if disturbed

possible solution
search in yast for
pulse
and delete all associated pulseaudio packages
(best to take a note of what’s deleted)
reboot
then re-install pulseaudio and again reboot

best of luck

Why not show us the contents of the file: /etc/systemd/systemd-journald.conf as I have nothing saved at /run/log/journal myself on either of two PC’s running openSUSE 12.2 and it makes me think you have enabled this option somehow. While not specifically for openSUSE, I found an article on setting up the journal file here: journald.conf, also have you added any grub 2 kernel load options to increase the sysemd verbosity (http://www.freedesktop.org/software/systemd/man/kernel-command-line.html)?

For System File Editing, have a look at this bash script: https://forums.opensuse.org/blogs/jdmcdaniel3/sysedit-system-file-editor-version-1-00-60/ (For KDE & GNOME)

For Editing and Viewing info on Grub 2 (Any Desktop): https://forums.opensuse.org/blogs/jdmcdaniel3/gnu-grub2-command-listing-helper-help-input-106/

Thank You,

here is mine for comparison .

SUSE Paste

mantis@linux-u7wa:~> systemd-analyze 
Startup finished in 2857ms (kernel) + 48112ms (userspace) = 50970ms

My remount-rootfs.service took 1358ms .It seems to be a major difference between your plot and mine

Also found this https://bugzilla.novell.com/show_bug.cgi?id=781299
and also https://forums.opensuse.org/english/get-technical-help-here/install-boot-login/481832-remount-rootfs-service.html

On 2013-02-10 16:16, jdmcdaniel3 wrote:
>
> Why not show us the contents of the file:
> /etc/systemd/systemd-journald.conf as I have nothing saved at
> /run/log/journal myself on either of two PC’s running openSUSE 12.2 and
> it makes me think you have enabled this option somehow.

There have been talks of this journal in the factory mail list, I think
it is going to be enabled for 12.3, and instead syslog disabled.

I understand that it rotates automatically, and there should be a size
limit.


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

On Sun 10 Feb 2013 04:16:02 PM CST, vazhavandan wrote:

here is mine for comparison .

‘SUSE Paste’ (http://paste.opensuse.org/54165137)

Code:

mantis@linux-u7wa:~> systemd-analyze
Startup finished in 2857ms (kernel) + 48112ms (userspace) = 50970ms


My remount-rootfs.service took 1358ms .It seems to be a major
difference between your plot and mine

Hi
Seems very slow… mine is 23ms?
http://paste.opensuse.org/30305122

There is a tweak for network services…need to find my notes.


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 12.2 (x86_64) Kernel 3.4.11-2.16-desktop
up 2 days 19:56, 4 users, load average: 2.07, 2.10, 1.76
CPU Intel® i5 CPU M520@2.40GHz | GPU Intel® Ironlake Mobile

Yes. I too noticed that network service is taking its own sweet time :slight_smile:

Probably due to this. what I don’t understand is that i use ifup but network manager tries to start and fails everytime when it should not start(i flipped the swicth in yast==>n/w settings ) :frowning:

$systemctl status NetworkManager.service
NetworkManager.service - Network Manager
      Loaded: loaded (/lib/systemd/system/NetworkManager.service; enabled)
      Active: failed (Result: exit-code) since Sun, 10 Feb 2013 19:54:09 +0530; 2h 33min ago
      CGroup: name=systemd:/system/NetworkManager.service

On Sun 10 Feb 2013 05:06:01 PM CST, vazhavandan wrote:

malcolmlewis;2526058 Wrote:
> Hi
> Seems very slow… mine is 23ms?
> ‘SUSE Paste’ (http://paste.opensuse.org/30305122)
>
> There is a tweak for network services…need to find my notes.

Yes. I too noticed that network service is taking its own sweet time
:slight_smile:

Probably due to this. what I don’t understand is that i use ifup but
network manager tries to start and fails everytime when it should not
start(i flipped the swicth in yast==>n/w settings ) :frowning:

$systemctl status NetworkManager.service
NetworkManager.service - Network Manager
Loaded: loaded (/lib/systemd/system/NetworkManager.service; enabled)
Active: failed (Result: exit-code) since Sun, 10 Feb 2013 19:54:09
+0530; 2h 33min ago CGroup: name=systemd:/system/NetworkManager.service

Hi
Have you tried disabling the service?


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 12.2 (x86_64) Kernel 3.4.11-2.16-desktop
up 2 days 20:36, 4 users, load average: 0.04, 0.06, 0.43
CPU Intel® i5 CPU M520@2.40GHz | GPU Intel® Ironlake Mobile

Is it available under “Runlevel” editor. If yes what is the name ? i see “network” and “network-remote-fs” I don’t want to turn off “ifup” by mistake

or is this the way to do it ?

Disables a service to not start during bootup:

systemctl disable NetworkManager.service

source:- Systemd - FedoraProject

i am slightly reluctant to do the second one (CLI). I tend to forget these commands. Hence i tend to use runlevel

Thanks for your suggestion, I’ve tryed

  1. remove pulseaudio (14 packs), and reboot (gain of 2 seconds)
  2. reinstall pulseaudio, and reboot (keeped the gain of 2s)

Here is my Yast configuration of pulseaudio packages

Cheers
Marcilio

Thanks for you reply, my configuration of “systemd-journal.conf” is the standard I’ve not changed it

[Journal]
#Compress=yes
#RateLimitInterval=10s
#RateLimitBurst=200
#SystemMaxUse=
#SystemKeepFree=
#SystemMaxFileSize=
#SystemMinFileSize=
#RuntimeMaxUse=
#RuntimeKeepFree=
#RuntimeMaxFileSize=
#RuntimeMinFileSize=
#ForwardToSyslog=yes
#ForwardToKMsg=no
#ForwardToConsole=no
ImportKernel=no

According to the documentation on freedesktop.org it is enough to create “/run/log/journal” to make the log permanent. Deleting the folder “journal” in “/run/log/” shortened the boot time in 2 seconds.
My “systemd” is already in debug mode (LogLevel=debug) and I don’t have the expertise to analyze it, so I don’t see the point of increasing its verbosity.

After deleting “/run/log/journal” the “blame” and “plot” seems to be more reliable. I thing that the “journal log” was messing the results. My boot time now is 20s and I’m still looking for improvement.

Cheers
Marcilio

After deleting “/run/log/journal” the “blame” and “plot” seems to be more reliable. I thing that the “journal log” was messing the results. My remount-rootfs.service show 1711ms now. My boot time now is 20s and I’m still looking for improvement.

Cheers
Marcilio

Well all is well that ends well and looking for this folder in the future for a boot slow down will be one of the things I ask. I just don’t know why you had it there in the first place.

Thank You,

As I was reading this thread I tried to see how fast my system is. So I had to install systemd-analyze and it seems that the file
/run/log/journal/5fb965c5c8b393ceef03911d000006c3/system.journal
was created when I installed systemd-analyze tool.
On another system I have the /run/log directory doesn’t exist.
I will monitor if the file increases in time(probably slowing down the system), but the settings in the systemd-journal.conf file could be used to set the max size of the file.

on this pc (64bit) the location is


<2013Feb11><11:19></var/log/journal/1d550596971c24d1854fb4ec0000029c> 
-rw-r-----+ 1 root root 120430592 Feb 11 11:14 system.journal

thx for the info

changed the name of the system.journal file

from cold, the time to the gui login screen is reduced by 20 seconds

boot chart now shows 3396ms (kernel) + 11165ms (userspace) = 14562ms

have set
SystemMaxFileSize=10M
to see what the effects are

addendum to post #16

limiting the size of the system.journal definitely helps.

starting a new system.journal with the sizes shown below
seems to take about 8 seconds.

10M seems to be a reasonable compromise implying starting
a new journal every 24-32 boots.

startup times seem to increase by ~0,15 seconds/ MB of journal size


on a laptop
before
Mon Feb 11 15:50:42 CET 2013
-rw-r-----  1 root root 66199552 Feb 11 15:47 system.journal
-rw-r-----+ 1 root root   225280 Feb 11 15:42 user-1000.journal
Startup finished in 5513ms (kernel) + 26590ms (userspace) = 32103ms

after 2nd reboot
Mon Feb 11 16:16:56 CET 2013
 in /etc/systemd/systemd-journald.conf set SystemMaxFileSize=10M
effect as shown
-rw-r-----  1 root root 66281472 Feb 11 16:12 system@92f30d0a0cf949f193ad62b539ea2b1e-0000000000017691-0004d57455090630.journal
-rw-r-----  1 root root   720896 Feb 11 16:44 system.journal
-rw-r-----+ 1 root root   229376 Feb 11 16:42 user-1000.journal
Startup finished in 6260ms (kernel) + 16645ms (userspace) = 22906ms

with SystemMaxFileSize=10M systemd-systemd-analyze plot time was increasing by
more that 0,3 seconds per boot.

A more consistent output was found with
file /etc/systemd/systemd-journald.conf
as follows
(fresh system.journal started almost every boot)

#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 2 of the License, or
#  (at your option) any later version.
#
# See systemd-journald.conf(5) for details

[Journal]
#Compress=yes
#RateLimitInterval=10s
#RateLimitBurst=200
#SystemMaxUse=
#SystemKeepFree=
SystemMaxFileSize=1M
#SystemMinFileSize=
#RuntimeMaxUse=
#RuntimeKeepFree=
#RuntimeMaxFileSize=
#RuntimeMinFileSize=
ForwardToSyslog=no
ForwardToKMsg=no
ForwardToConsole=no
ImportKernel=no

Wow. That boot time is awful. For example mine is:

daniel@linux-w365:~> systemd-analyze 
Startup finished in 3642ms (kernel) + 2545ms (userspace) = 6187ms
daniel@linux-w365:~> systemd-analyze blame
   312ms vboxdrv.service
   305ms systemd-readahead-collect.service
   296ms systemd-readahead-replay.service
   293ms cycle.service
   287ms media.mount
   272ms console-kit-log-system-start.service
   268ms fbset.service
   258ms avahi-daemon.service
   218ms systemd-logind.service
   182ms syslog.service
   156ms SuSEfirewall2_setup.service
   137ms SuSEfirewall2_init.service
   121ms quota.service
   121ms brld.service
   118ms cpufreq.service
   115ms systemd-vconsole-setup.service
   101ms network-remotefs.service
   100ms systemd-user-sessions.service
    96ms systemd-tmpfiles-setup.service
    95ms network.service
    67ms var-lock.mount
    62ms rc-local.service
    60ms var-run.mount
    60ms sshd.service
    59ms NetworkManager.service
    56ms bluez-coldplug.service
    50ms udev-trigger.service
    49ms udev.service
    47ms sys-kernel-debug.mount
    45ms systemd-remount-api-vfs.service
    45ms remount-rootfs.service
    41ms xdm.service
    40ms systemd-sysctl.service
    38ms localnet.service
    37ms systemd-modules-load.service
    31ms vboxautostart-service.service
    27ms sbl.service
    25ms vboxweb-service.service                                                                                                     
    23ms dev-hugepages.mount                                                                                                         
    22ms vboxballoonctrl-service.service                                                                                             
    18ms acpid.service                                                                                                               
    18ms other.mount                                                                                                                 
    15ms dev-mqueue.mount                                                                                                            
    15ms console-kit-daemon.service                                                                                                  
    15ms udev-root-symlink.service                                                                                                   
    11ms bumblebeed.service                                                                                                          
    10ms sys-kernel-security.mount                                                                                                   
     8ms upower.service                                                                                                              
     3ms home.mount                                                                                                                  
     2ms rtkit-daemon.service                                                                                                        
     2ms sys-fs-fuse-connections.mount                                                                                               
daniel@linux-w365:~>                   

Anyways,

systemctl --failed

Might give us more insight as well. I used it to find what failed on my install, fixed it and all of a sudden my boot-up was so much faster.

P.S. I have masked a few of the totally unnecessary services which probably helps.
P.P.S. I still have PulseAudio. Removing Pulse is not normally a solution to most problems. Its usually a little too extreme in my opinion.

Hi daniel@linux-w365

thx, you have an interesting setup.
What do you have, a pro-book?

the times on this laptop are mainly due to the following

cmd: systemd-analyze blame
  1434ms avahi-daemon.service
  1329ms cpufreq.service
  1377ms dev-hugepages.mount
  1371ms dev-mqueue.mount
  1613ms localnet.service
  1380ms media.mount
  1361ms NetworkManager.service
  1863ms rtkit-daemon.service
  5235ms remount-rootfs.service
  1364ms sys-kernel-debug.mount
  1359ms sys-kernel-security.mount
  1393ms systemd-logind.service
  1245ms systemd-remount-api-vfs.service
  3913ms systemd-vconsole-setup.service
  1347ms udev-root-symlink.service
  1406ms var-lock.mount
  1398ms var-run.mount

no failures are being reported from systemctl

but there are the following errors due to the services not being installed,
these errors are considered normal!?
any work-arounds found?
originally smolt was in the list but removed by deleting the associated script
from /etc/init.d/

cmd:systemctl --all | grep error
amavis.service               error  inactive dead   amavis.service
apparmor.service             error  inactive dead   apparmor.service
auditd.service               error  inactive dead   auditd.service
cyrus.service                error  inactive dead   cyrus.service
exim.service                 error  inactive dead   exim.service
firstboot.service            error  inactive dead   firstboot.service
isdn.service                 error  inactive dead   isdn.service
ldap.service                 error  inactive dead   ldap.service
local_fs.target              error  inactive dead   local_fs.target
openibd.service              error  inactive dead   openibd.service
openslp.service              error  inactive dead   openslp.service
plymouth-quit-wait.service   error  inactive dead   plymouth-quit-wait.service
plymouth-start.service       error  inactive dead   plymouth-start.service
resmgr.service               error  inactive dead   resmgr.service
rsyslog.service              error  inactive dead   rsyslog.service
scsidev.service              error  inactive dead   scsidev.service
sendmail.service             error  inactive dead   sendmail.service
syslog-ng.service            error  inactive dead   syslog-ng.service
systemd-kmsg-syslogd.service error  inactive dead   systemd-kmsg-syslogd.service
winbind.service              error  inactive dead   winbind.service
xdrsetsite.service           error  inactive dead   xdrsetsite.service
ypserv.service               error  inactive dead   ypserv.service

cheers