CPU high usage after mariadb upgrade 10.11

Started by leebrimlow, October 26, 2024, 03:25:17 PM

Previous topic - Next topic

leebrimlow

After upgrading from 10.4 to 10.11  , i got high cpu usage and all my websites not working.
the panel became too slow.

any help please ?

CPU Model: AMD Ryzen 5 3600 6-Core Processor
CPU Details: 12 Core (2200 MHz)
Distro Name: CentOS Linux release 7.9.2009 (Core)
Kernel Version: 3.10.0-1160.119.1.el7.x86_64
Platform: x86_64 Dedicated



cyberspace

I just recommend you to start from the investigation of MariaDB log file, other system logs, if there is nothing then check SQL queries "show processlist;", check RAM usage, etc.

Starburst

What is your Top 4 processes showing?
Can you post a screenshot of that.

This resembles the CPU usage problem from ClamAV.

Also curious why you are using a past EOL OS on a AMD Ryzen server.


cyberspace

It looks like high cpu usage is caused by high i/o wait. Does your server use hard disks not  ssd/nvme disks ?

leebrimlow

No, it's NVME, that only happened after upgrading the MariaDB

cyberspace

Check logs of the SQL service, if there is nothing then try to optimize MySQL (enable caching if disabled).

leebrimlow

#7
wha is the location of the mysql Log file please?

i searched in /var/log/ , but there is no mysql or mariadb log at all

cyberspace

If logging is disabled then do following:

1. Open the file:
/etc/my.cnf.d/server.cnf
2. Add the lines:

general_log = On
general_log_file = /var/log/mysqld.log
log_error = /var/log/mysqld_error.log


under [server]

3. Restart MySQL/MariaDB.

leebrimlow

i restarted the mariadb upgrade again and stuck at this step for more than an hour !!!




leebrimlow

 i got this:

2024-10-27 13:13:01 0 [Note] Starting MariaDB 10.11.9-MariaDB-log source revision 0e8fb977b00983d98c4c35e39bc1f36463095938 server_uid B9+4bhdCXZju+t0OtX1U29Rbx8s= as process 3964
2024-10-27 13:13:01 0 [Note] InnoDB: Compressed tables use zlib 1.2.7
2024-10-27 13:13:01 0 [Note] InnoDB: Number of transaction pools: 1
2024-10-27 13:13:01 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
2024-10-27 13:13:01 0 [Note] InnoDB: Using Linux native AIO
2024-10-27 13:13:01 0 [Note] InnoDB: Initializing buffer pool, total size = 128.000MiB, chunk size = 2.000MiB
2024-10-27 13:13:01 0 [Note] InnoDB: Completed initialization of buffer pool
2024-10-27 13:13:01 0 [Note] InnoDB: File system buffers for log disabled (block size=4096 bytes)
2024-10-27 13:13:02 0 [Note] InnoDB: End of log at LSN=834146431144
2024-10-27 13:13:02 0 [Note] InnoDB: 128 rollback segments are active.
2024-10-27 13:13:02 0 [Note] InnoDB: Setting file './ibtmp1' size to 12.000MiB. Physically writing the file full; Please wait ...
2024-10-27 13:13:02 0 [Note] InnoDB: File './ibtmp1' size is now 12.000MiB.
2024-10-27 13:13:02 0 [Note] InnoDB: log sequence number 834146431144; transaction id 490699252
2024-10-27 13:13:02 0 [Note] Plugin 'FEEDBACK' is disabled.
2024-10-27 13:13:02 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2024-10-27 13:13:02 0 [Warning] 'thread-concurrency' was removed. It does nothing now and exists only for compatibility with old my.cnf files.
2024-10-27 13:13:02 0 [Note] Server socket created on IP: '0.0.0.0'.
2024-10-27 13:13:02 0 [Note] Server socket created on IP: '::'.
2024-10-27 13:13:04 0 [Note] InnoDB: Buffer pool(s) load completed at 241027 13:13:04
2024-10-27 13:13:04 0 [Note] /usr/sbin/mariadbd: ready for connections.
Version: '10.11.9-MariaDB-log'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MariaDB Server
2024-10-27 13:13:04 14 [Warning] Aborted connection 14 to db: 'unconnected' user: 'unauthenticated' host: 'localhost' (This connection closed normally without authentication)
2024-10-27 13:23:16 1608 [Warning] Aborted connection 1608 to db: 'unconnected' user: 'netdata' host: 'localhost' (Got an error writing communication packets)
2024-10-27 13:59:18 4465 [Warning] InnoDB: Could not free any blocks in the buffer pool! 8064 blocks are in use and 0 free. Consider increasing innodb_buffer_pool_size.
2024-10-27 14:43:10 9867 [Warning] InnoDB: Could not free any blocks in the buffer pool! 8064 blocks are in use and 0 free. Consider increasing innodb_buffer_pool_size.

cyberspace

#12
It could cause high disk i/o usage:

2024-10-27 13:59:18 4465 [Warning] InnoDB: Could not free any blocks in the buffer pool! 8064 blocks are in use and 0 free. Consider increasing innodb_buffer_pool_size.

Consider to optimize MySQL/MariaDB performance:
https://mariadb.com/kb/en/optimization-and-tuning/

leebrimlow

installed CWP with Almalinux 8 , can not install PHP , upgrade mariadb or do anything!! everything is blocked !! Why !!








cyberspace

There are a lot of errors "can't resolve". Make sure the DNS resolver on your VPS/Server is operating fine.