Thank you for unearthing this report. This issue is still unsolved (now on Alma Linux 8.5), and I am surprised to be the only one to have to face it.
My mariadb data base is mostly read-only, with about one update session per month. So if you mean consolidating the committed transactions which were not consolidated before the previous shutdown, I feel this as unlikely.
Mariadb still takes 15s to initialize :
Code: Select all
[linux@optiplex doc]$ systemd-analyze blame
25.801s mariadb.service
10.905s udisks2.service
10.564s vdo.service
9.792s sssd.service
9.287s etc.
I have this on several computers, and this was not the case on Centos 7 (I have no Centos 7 configuration any more to show the difference).
And the critical chain shows :
Code: Select all
graphical.target @55.158s
└─multi-user.target @55.158s
└─mariadb.service @29.356s +25.801s
└─network.target @29.323s
└─NetworkManager.service @28.870s +451ms
└─network-pre.target @28.869s
└─firewalld.service @25.907s +2.962s
└─polkit.service @16.598s +9.287s
└─basic.target @16.554s
So mariadb looks like it depends on the network. I do not need that, the data base is only accessed through a local application (which is accessed through the network, but has to be started manually). Therefore I have disabled the network access in /etc/my.cnf.d/mariadb-server.cnf :
Code: Select all
# This group is only read by MariaDB servers, not by MySQL.
# If you use the same .cnf file for MySQL and MariaDB,
# you can put MariaDB-only options here
[mariadb]
skip-networking
But this made no difference whatsoever. Does mariadb want to call home ?
The critical chain also looks like it shows the multi-user target depends on mariadb. This is sort of confirmed in /var/log/messages, with the multi-user target waiting for the database to be started :
Code: Select all
Apr 25 07:50:31 optiplex systemd[1]: NetworkManager-dispatcher.service: Succeeded.
Apr 25 07:50:32 optiplex systemd[1]: Started MariaDB 10.5 database server.
Apr 25 07:50:32 optiplex systemd[1]: Reached target Multi-User System.
Apr 25 07:50:32 optiplex systemd[1]: Reached target Graphical Interface.
Why can it be so ? The applications which use the data base have to be started manually.
How could I get mariadb to be initialized in the background, with the multi-user target not having to wait for it ?
And am I really the only one to face this behavior ?
EDIT : I should have added :
Code: Select all
Trx id counter 46021367
Purge done for trx's n:o < 46021365 undo n:o < 0 state: running
History list length 2
So nothing suspicious there.