Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I just switched to systemd on debian sid and while it's a big step forward it also makes it easy to see opportunities for improvement

Boot from suspend takes too long

$ systemd-analyze blame | head -4
         13.807s systemd-suspend.service
          2.167s mysql.service
          1.497s apache2.service
           163ms systemd-fsck@dev-disk-by\x2duuid-f9ce6b25\x2d061b\x2d453e\x2db1f7\x2d0f560cd3181c.service

As you can see, systemd-suspend.service takes ages. Standard boot is very quick but from suspend it's slower than sysvinit! Where should I be looking?

Mysql blocking a faster boot

$ systemd-analyze critical-chain | head -7
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 @2.839s
└─multi-user.target @2.839s
  └─exim4.service @2.773s +66ms
    └─mysql.service @604ms +2.167s

A whopping 76% of my graphical.target is spent waiting for mysql. Is there any way to stop it blocking?

Edit: nkts made me realise these are all running in sysvinit compat mode - I bet that's what's holding this up. How do I install systemd startup files on debian?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

You could try to look at exim4.service and see if there's a dependency on multi-user.target. IMHO graphical interface and mail service are unrelated.

share|improve this answer
1  
An excelent point that leads me to realise that mysql.service, apache2.service and exim4.service are being run in sysvinit compat mode from /etc/init.d - know any way to convert them to systemd or manually remove the bottleneck? Where is the systemd file for init.d running? –  J V Feb 16 at 15:33

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.