1 Reply Latest reply on Jul 19, 2018 7:42 PM by Dave Stokes-MySQL Community Team-Oracle

    after upgrading from 5.6.32 to 5.7.22, memory usage keeps growing, already using 30% swap

    1440559

      A production environment mysql database, after upgrading from 5.6.32 to 5.7.22, memory usage keeps growing, already using 30% swap

      Buffer pool size and other configurations are very small.

      When using 5.6.32, the memory usage is normal.

      I can't find a reason to use so much memory?

      a memory leak or a bug? 5.7.22

       

      my-5.7.22 configuration:

      ##Global

      innodb_buffer_pool_size = 20G

      key_buffer_size = 2M

      tmp_table_size = 64M

      max_heap_table_size = 64M

      innodb_log_buffer_size = 4M

      ## Per connection

      read_buffer_size = 2M

      read_rnd_buffer_size = 2M

      sort_buffer_size = 2M

      join_buffer_size = 2M

      binlog_cache_size = 4M

      ## Others

      myisam_sort_buffer_size = 4M

      myisam_max_sort_file_size = 10G

      bulk_insert_buffer_size = 16M

      ## Query cache OFF

      query_cache_size = 0

      query_cache_type = 0

      ## Threads

      thread_stack = 512K

      thread_cache_size = 500

       

      my-5.6.32 configuration:

      ##Global

      innodb_buffer_pool_size = 30G

      key_buffer_size = 8M

      tmp_table_size = 64M

      max_heap_table_size = 64M

      innodb_log_buffer_size = 8M

      ## Per connection

      read_buffer_size = 16M

      read_rnd_buffer_size = 16M

      sort_buffer_size = 16M

      join_buffer_size = 16M

      binlog_cache_size = 4M

      ## Others

      myisam_sort_buffer_size = 8M

      myisam_max_sort_file_size = 10G

      bulk_insert_buffer_size = 32M

      ## Query cache OFF

      query_cache_size = 0

      query_cache_type = 0

      ## Threads

      thread_stack = 512K

      thread_cache_size = 500

       

      [mysql@ugc215 ~]$ free -mt

        total used free shared buffers cached

      Mem: 64375 61730 2644 0 387 909

      -/+ buffers/cache: 60433 3941

      Swap: 30719 4428 26291

      Total: 95095 66158 28936

       

      mysql 12159 88.9 92.0 89798836 60648124 ? Sl Jul13 8099:27 /usr/local/mysql5722/bin/mysqld --basedir=/usr/local/mysql5722 --datadir=/data/mysql --plugin-dir=/usr/local/mysql5722/lib/plugin --user=mysql --log-error=/log/mysql/my3306.err --open-files-limit=65535 --pid-file=/data/mysql/mysql3306.pid --socket=/tmp/mysql.sock --port=3306