MySQL Forums
Forum List  »  Performance

Mysql high memory usage on centos 7 (migrating from centos 5)
Posted by: Tamas Szabo
Date: March 03, 2018 04:39AM

Hello,

Story: i migrated my centos 5 mysql dedicated vps to centos 7 vps (i copied /etc/my.cnf and mysql data with rsync)
Old and new centos vps have 12 GB memory. My version is 5.6.39 64 bit.
Problem: on old centos 5 server mysql used ~6 GB memory constantly. on new centos 7 server mysql use ~10-11 GB memory and grow (+swapping)

I don't understand, why mysql server use more memory with same mysql data and mysql configuration (mysql server died / killed after a few days because swap runs out of space; old centos 5 server newer swapping, new centos 7 server after 2-3 days /centos 5 mysql used only 6 G memory for months with same my.cnf as centos 7 mysql server that use 10-11 GB memory and growing memory usage!/)

Here is my.cnf:
[mysqld]
server-id = 1
log-bin = mysql-bin
innodb_flush_log_at_trx_commit = 1
sync_binlog = 1
binlog_format = row
max_binlog_size = 200M
expire_logs_days = 2
binlog_cache_size = 64M
log_bin_trust_function_creators = 1
ssl-ca = /etc/mysql/ca-cert.pem
ssl-cert = /etc/mysql/server-cert.pem
ssl-key = /etc/mysql/server-key.pem
max_connections=200
max_user_connections = 30
max_connect_errors=100000
connect_timeout=5
wait_timeout=300
event_scheduler=on
explicit_defaults_for_timestamp = 1
key_buffer_size=512M
sort_buffer_size=6M
read_buffer_size=6M
read_rnd_buffer_size=6M
join_buffer_size=7M
max_allowed_packet=33M
thread_cache_size=128
table_open_cache=6144
table_definition_cache=40960
query_cache_limit=6M
query_cache_size=1024M
query_cache_type = 1
query_cache_min_res_unit = 3K
innodb_buffer_pool_size = 4096M
innodb_buffer_pool_dump_at_shutdown = 1
innodb_buffer_pool_load_at_startup = 1
innodb_data_file_path = ibdata1:3050M;ibdata2:25M:autoextend
innodb_log_file_size = 256M
innodb_file_per_table = 1
performance_schema = off
slow_query_log = 1
slow_query_log_file = /var/lib/mysql/slow_query_log
long_query_time = 3
log-warnings = 2
open_files_limit = 102400

Please give me solution / tip for this problem!

Regards,
Tamas

Options: ReplyQuote


Subject
Views
Written By
Posted
Mysql high memory usage on centos 7 (migrating from centos 5)
163
March 03, 2018 04:39AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.