美文网首页
docker mysql 占内存过多

docker mysql 占内存过多

作者: 晨雨微风 | 来源:发表于2019-11-20 09:46 被阅读0次

    解决docker部署mysql后,mysql占用内存过多的问题

    查看内存占用

    docker stats

    更改配置

    在/etc/my.cnf配置中,增加以下配置

    ps: 建议将/etc/my.cnf挂载在宿主机已目录

    #检测的表对象的最大数目

    performance_schema_max_table_instances=400

    #表定义缓存中表的个数

    table_definition_cache=400

    #表文件描述符的缓存大小

    table_open_cache=256

    重启mysql容器

    docker restart mysql

    相关文章

    centos7 docker部署

    docker部署php-fpm,nginx,mysql

    推荐: 浮生无事的博客

    相关文章

      网友评论

          本文标题:docker mysql 占内存过多

          本文链接:https://www.haomeiwen.com/subject/ecwnictx.html