• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Question How to set up mariaDB to use RAM instead CPU?

Bogdan1

Regular Pleskian
Hello,

can someone guide me please, how to set up mariaDB to use RAM instead CPU?
I have VPS with 20GB RAM, and now I'm inserting data to DB and see that almost 100% of CPU is being used.
and like 3GB RAM.

Thanks
 
Last edited:
I suggest to query Google for "MySQL performance tuning".

Yeah, I did and here is my my.cnf but I'm not sure if it's working. Because of CPU usage.

[mysqld]
#bind-address = %
local-infile=0
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
symbolic-links=0

# MyISAM #
key-buffer-size = 32M
myisam-recover = FORCE,BACKUP


# SAFETY #
max-allowed-packet = 16M
max-connect-errors = 1000000

# INNODB #
innodb-flush-method = O_DIRECT
innodb-log-files-in-group = 2
innodb-log-file-size = 512M
innodb-flush-log-at-trx-commit = 1
innodb-file-per-table = 1
innodb-buffer-pool-size = 15000M
innodb_buffer_pool_instances = 8
innodb_write_io_threads = 8
innodb_read_io_threads = 8

[mysqld_safe]
log-error=/var/log/mariadb/mariadb.log
pid-file=/var/run/mariadb/mariadb.pid

#
# include all files from the config directory
#
!includedir /etc/my.cnf.d
 
Back
Top