Bug #65047 Severe memory swap of mysql5.1.48
Submitted: 20 Apr 2012 5:32 Modified: 20 May 2012 15:24
Reporter: zhai weixiang (OCA) Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:5.1.48 OS:Linux
Assigned to: CPU Architecture:Any
Tags: memory leak

[20 Apr 2012 5:32] zhai weixiang
Description:
top command:
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                                         
 8229 mysql     15   0 64.5g  46g 5284 S 60.2 97.6   7838:07 mysqld

$free -m
             total       used       free     shared    buffers     cached
Mem:         48289      48018        270          0        138        122
-/+ buffers/cache:      47757        532
Swap:         8189       6869       1319

mysql version:5.1.48

my.cnf

#### Base configure info ####
default-character-set = utf8
port = 3306
skip-locking
skip-name-resolve
old_passwords = 0
lower_case_table_names = 1
open_files_limit = 65535
read_rnd_buffer_size = 3145728
#max_allowed_packet =  256M
max_allowed_packet =  24M
max_connect_errors = 50000
max_connections = 1100
max_user_connections = 1050
thread_cache_size= 256
table_cache = 2048
table_definition_cache = 2048
thread_stack = 524288
max_binlog_size = 500M
max_binlog_cache_size = 2G
binlog_format = row

#### query cache ####
query_cache_size = 0
query_cache_limit = 1K
query_cache_min_res_unit = 1K
query_cache_type = 2

#myisam
concurrent_insert = 2
key_buffer = 100M
sort_buffer_size = 100K
join_buffer_size = 100K
read_buffer_size = 1M
myisam_sort_buffer_size = 100M

#innodb plugin
ignore_builtin_innodb
plugin_load=innodb=ha_innodb_plugin.so;innodb_trx=ha_innodb_plugin.so;innodb_locks=ha_innodb_plugin.so;innodb_lock_waits=ha_innodb_plugin.so;innodb_cmp=ha_in
nodb_plugin.so;innodb_cmp_reset=ha_innodb_plugin.so;innodb_cmpmem=ha_innodb_plugin.so;innodb_cmpmem_reset=ha_innodb_plugin.so
innodb_file_format=Antelope
innodb_strict_mode=1

#innodb
default-storage-engine = INNODB
innodb_flush_method = O_DIRECT
innodb_file_per_table = 1
innodb_open_files=60000
innodb_flush_log_at_trx_commit = 2
innodb_lock_wait_timeout = 100
innodb_additional_mem_pool_size = 20M
innodb_log_buffer_size= 200M
innodb_log_file_size = 1000M
innodb_log_files_in_group = 4
innodb_file_io_threads = 4
innodb_write_io_threads=8
innodb_read_io_threads=8
innodb_thread_concurrency = 16
innodb_max_dirty_pages_pct = 50
innodb_io_capacity=800
innodb_data_file_path = ibdata1:200M:autoextend
skip-slave-start
### Server id ####

server_id=16166145
innodb_buffer_pool_size=30G

How to repeat:
i don't know if this bug is related to short  db connection.
[20 Apr 2012 5:44] Valeriy Kravchuk
Please, check if this problem still happens in your environment with a recent version, 5.1.62.
[20 Apr 2012 7:09] zhai weixiang
i hope i can, but it's impossible to upgrade our production environment,especially when we are using thousands instance of mysql5.1.48

can anyone provide me some related bug?
[20 Apr 2012 15:24] Valeriy Kravchuk
Please, check if FLUSH TABLES reduce the amount of memory used by mysqld. Do you use partitioned InnoDB tables and how many InnoDB tables, in total, do you have? 

Please, upload also the output of SHOW INNODB STATUS.
[21 May 2012 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".