Page 1 of 1

mariadb high cpu issue

Posted: 15 Jun 2019 00:59
by jon doe
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

Re: mariadb high cpu issue

Posted: 16 Jun 2019 10:38
by ladylinux
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

Re: mariadb high cpu issue

Posted: 16 Jun 2019 14:51
by jon doe
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

Re: mariadb high cpu issue

Posted: 18 Jun 2019 16:38
by jon doe
I put these lines in the /etc/my.cnf.d/mariadb-server.cnf file under the mysqld section. Is that the correct location?

Re: mariadb high cpu issue

Posted: 25 Jun 2019 19:07
by ladylinux
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

Re: mariadb high cpu issue

Posted: 25 Jun 2019 19:21
by jon doe
Perfect, thanks for the info. Got it all set.