简体   繁体   English

MariaDB 10.3.28 CentOS 8 服务器上的性能缓慢

[英]MariaDB 10.3.28 slow performance on CentOS 8 Server

I have a server running CentOS 8 with apache, php-fpm, and mariadb.我有一台运行 CentOS 8 和 apache、php-fpm 和 mariadb 的服务器。 The last one is giving problems to me.最后一个是给我带来问题。

I tried to import a database of a site into phpmyadmin with the apposite interface and also with mysql command.我尝试使用适当的界面以及 mysql 命令将站点数据库导入 phpmyadmin。

The test with interface has been as slow as the timeout of apache (600s) giving to me gateway timeout.与接口的测试与 apache (600s) 的超时一样慢,给我网关超时。 The test with mysql command has taken over 6 minutes!使用 mysql 命令进行的测试耗时 6 分钟!

The dump was something like 2MB so it is really unacceptable.转储大约是 2MB,所以这真的是不可接受的。

Do you know something I could change in configuration in order to solve this situation?您知道我可以更改配置以解决这种情况吗?

Already tried this in /etc/my.cnf but nothing happened:已经在 /etc/my.cnf 中尝试过,但什么也没发生:

[mysqld]
slow_query_log = 1
long_query_time = 1
slow_query_log_file = /var/log/mariadb/slow-query.log

query_cache_type = 1
query_cache_limit = 8M
query_cache_size = 512M

max_connections = 500

tmp_table_size= 768M
max_heap_table_size= 768M

thread_cache_size = 12


join_buffer_size = 12M

The hardware of the machine I think it shouldn't be a problem, anyway:机器的硬件我认为应该不是问题,反正:

  • 4 cpu 4 个中央处理器
  • 5028 MB ram 5028 MB 内存

yes, the individual configurations are in subdirectories.是的,各个配置都在子目录中。 take a look at the subdirs of / etc / mysql eg ./mariadb.conf.d查看 /etc/mysql 的子目录,例如 ./mariadb.conf.d

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM