mariadb high cpu issue

Testing of eFa 4
Post Reply
jon doe
Posts: 10
Joined: 07 Feb 2017 16:26

mariadb high cpu issue

Post by jon doe » 15 Jun 2019 00:59

For some reason mysqld displays at 100% cpu or more when I run top. The system feels okay but sometimes I am bottle necking in the milter. If I do systemctl restart mariadb, it solves the issue but after some time my system stops logging to /var/log/maillog (this may of been bad luck or just a coincidence, I'm not sure). Everything still works and mail gets scanned and delivered. Rebooting the system restores the logging but mysql reports again at 100+ CPU.

Any ideas how I can troubleshoot this and narrow down the cause? I see in the forums some references to the mysqladmin command but they don't work exactly as written in those older versions of EFA. I modified the commands to show me the processlist and status but I don't see anything unusual.
Any ideas would be appreciated.

Thank you

ladylinux
Posts: 6
Joined: 22 May 2019 11:45

Re: mariadb high cpu issue

Post by ladylinux » 16 Jun 2019 10:38

Hello,

Did you switch off name resolution in either /etc/my.cf or /etc/my.cnf.d/server.cf

viewtopic.php?f=13&t=2938&start=25#p14195

Ladylinux

jon doe
Posts: 10
Joined: 07 Feb 2017 16:26

Re: mariadb high cpu issue

Post by jon doe » 16 Jun 2019 14:51

Thank you very much for your reply. I checked the server again today and the CPU load is normal now. I don't know how long it took to calm down. I will definitely take your advice if the issue occurs again.

Thank you

jon doe
Posts: 10
Joined: 07 Feb 2017 16:26

Re: mariadb high cpu issue

Post by jon doe » 18 Jun 2019 16:38

I put these lines in the /etc/my.cnf.d/mariadb-server.cnf file under the mysqld section. Is that the correct location?

ladylinux
Posts: 6
Joined: 22 May 2019 11:45

Re: mariadb high cpu issue

Post by ladylinux » 25 Jun 2019 19:07

Hello,

Sorry I been away.

I put mine in /etc/my.cnf.d/mariadb-server.cnf

You also need to make sure that /etc/my.cnf is set to parse this dir.
#
# This group is read both both by the client and the server
# use it for options that affect everything
#
[client-server]

#
# This group is read by the server
#
[mysqld]
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0

#
# include all files from the config directory
#
!includedir /etc/my.cnf.d
You can verify at the mysql prompt like so.
MariaDB [(none)]> show variables like '%skip_name_resolve%';
+-------------------+-------+
| Variable_name | Value |
+-------------------+-------+
| skip_name_resolve | ON |
+-------------------+-------+
1 row in set (0.00 sec)
Ladylinux

jon doe
Posts: 10
Joined: 07 Feb 2017 16:26

Re: mariadb high cpu issue

Post by jon doe » 25 Jun 2019 19:21

Perfect, thanks for the info. Got it all set.

Post Reply