TheyCallMeTojo thank you for the suggestion, but I need apache.
andreherberth You're right, these are my httpd.conf and my.cnf
HTTPD.CONF
Apache: 2.4.6
Server MPM: prefork
Server API: FPM/FastCGI
KeepAlive On
MaxKeepAliveRequests 500
KeepAliveTimeout 3
<IfModule mpm_prefork_module>
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxRequestWorkers 250
MaxConnectionsPerChild 0
</IfModule>
<IfModule mpm_worker_module>
StartServers 3
MinSpareThreads 75
MaxSpareThreads 250
ThreadsPerChild 25
MaxRequestWorkers 400
MaxConnectionsPerChild 0
</IfModule>
<IfModule mpm_event_module>
StartServers 3
MinSpareThreads 75
MaxSpareThreads 250
ThreadsPerChild 25
MaxRequestWorkers 400
MaxConnectionsPerChild 0
</IfModule>
MY.CNF
MariaDB: 10.1.37
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
performance_schema = on
symbolic-links=0
innodb_file_per_table = 1
innodb_buffer_pool_instances = 1
innodb_log_file_size = 16M
thread_concurrency = 8
query_cache_type =0
query_cache_limit =1M
query_cache_size = 16M
thread_cache_size = 8
myisam_sort_buffer_size = 64M
read_rnd_buffer_size = 8M
read_buffer_size = 2M
sort_buffer_size = 2M
table_open_cache = 512
max_allowed_packet = 1M
key_buffer_size = 384M
[mysqld_safe]
log-error=/var/log/mariadb/mariadb.log
pid-file=/var/run/mariadb/mariadb.pid
htop says:

mysqltuner says:
