Score:0

Limiting CPU usage of Mariadb proccess doesn't work

um flag

I'm building a server that runs Mariadb 10.5, apache, nginx and PHP-FPM. The server have 16 cores and 32GB Ram. This server suppose to work under load, but it doesn't because Mariadb is using 1500%, which causes the whole server to bottleneck.

This is my my.cnf

innodb_buffer_pool_size = 15G

innodb_log_file_size = 3G

innodb_log_buffer_size = 256M

max_allowed_packet=1024M

interactive_timeout=30

wait_timeout=120

max_connections = 1000

thread_pool_size=4

skip-name-resolve=1

table_definition_cache=500

performance_schema=ON

max_heap_table_size=1024M

tmp_table_size=1024M

table_open_cache=16000

join_buffer_size=512000

As you can see, i've tried to limit the CPU usage with thread_pool_size=4, but it doesn't change anything.

Hopefully some one can tell what I'm missing here

ua flag
High CPU/load-average is caused by inadequate indexes and/or poor formulation of queries. Find a slow query and let's fix it.
Score:0
cn flag

You use thread_pool_size=4, but you also need to have thread_handling=pool-of-threads, to take effect. Please also note, that thread_pool_size is merely a hint- while it tries to have 4 CPUs in running state, it is allowed to create more for the long running queries. Also it does not take background innodb threads into account.

ua flag
This suggestion may help with _connections_, but not with _CPU_.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.