Bug 250233

Summary: databases/mysql57-server: Mysql 5.7 consuming swap
Product: Ports & Packages Reporter: Cristian Cardoso <cristian.cardoso11>
Component: Individual Port(s)Assignee: Jochen Neumeister <joneum>
Status: Open ---    
Severity: Affects Only Me CC: joneum
Priority: --- Keywords: regression
Version: LatestFlags: linimon: maintainer-feedback? (joneum)
Hardware: Any   
OS: Any   

Description Cristian Cardoso 2020-10-09 20:40:22 UTC
Mysql 5.7 in FreeBSD 12.1 when running mysqldump, allocates a lot of swap in the system and even after the dump ends, the memory is not deallocated, thus forcing the service to restart every 2 days to release the swap, this behavior does not occur in FreeBSD 11
Comment 1 Jochen Neumeister freebsd_committer 2020-10-16 20:47:33 UTC
No logs, no exact information about the system, unfortunately I can't do anything with such PR, sorry.
Comment 2 Cristian Cardoso 2020-10-19 12:18:57 UTC
Sorry, I'm still getting used to freebsd and I ended up not bringing a more assertive account.

The version I use of FreeBSD is 12.1 current, the dump problem occurred in version 5.7.30 and 5.7.31, which is the last update I installed on the server.
I didn't find anything specific in the mysql log to report here, but follow my my.cnf

[client]
port                            = 3306
socket                          = /tmp/mysql.sock

[mysql]
prompt                          = \u@\h [\d]>\_
no_auto_rehash

[mysqld]
user                            = mysql
port                            = 3306
socket                          = /tmp/mysql.sock
bind-address                    = 0.0.0.0
basedir                         = /usr/local
datadir                         = /var/db/mysql
tmpdir                          = /var/db/mysql_tmpdir
slave-load-tmpdir               = /var/db/mysql_tmpdir
secure-file-priv                = /var/db/mysql_secure
log-bin                         = mysql-bin
log-output                      = TABLE
master-info-repository          = TABLE
relay-log-info-repository       = TABLE
relay-log-recovery              = 1
slow-query-log                  = 1
server-id                       = 1
sync_binlog                     = 1
sync_relay_log                  = 1
binlog_cache_size               = 16M
expire_logs_days                = 30
default_password_lifetime       = 0
enforce-gtid-consistency        = 1
gtid-mode                       = ON
safe-user-create                = 1
lower_case_table_names          = 1
explicit-defaults-for-timestamp = 1
myisam-recover-options          = BACKUP,FORCE
open_files_limit                = 32768
table_open_cache                = 16384
table_definition_cache          = 8192
net_retry_count                 = 16384
key_buffer_size                 = 256M
max_allowed_packet              = 64M
query_cache_type                = 0
query_cache_size                = 0
long_query_time                 = 0.5
innodb_buffer_pool_size         = 1G
innodb_data_home_dir            = /var/db/mysql
innodb_log_group_home_dir       = /var/db/mysql
innodb_data_file_path           = ibdata1:128M:autoextend
innodb_temp_data_file_path      = ibtmp1:128M:autoextend
innodb_flush_method             = O_DIRECT
innodb_log_file_size            = 256M
innodb_log_buffer_size          = 16M
innodb_write_io_threads         = 8
innodb_read_io_threads          = 8
innodb_autoinc_lock_mode        = 2
skip-symbolic-links

[mysqldump]
max_allowed_packet              = 256M
quote_names
quick


I don't know if that would be enough information for you to check the package or not, otherwise, let me know that I try to provide as much information as possible.
Thank you
Comment 3 Cristian Cardoso 2020-11-03 20:47:45 UTC
I recently upgraded the server to version 12.2 and the problem persists.
Mysql is at version 5.7.31