• 请不要在回答技术问题时复制粘贴 AI 生成的内容
guoyu4126
V2EX  ›  程序员

4 核 8G ECS MYSQL 求助配置

  •  
  •   guoyu4126 · Jun 12, 2018 · 3090 views
    This topic created in 2941 days ago, the information mentioned may be changed or developed.

    explicit_defaults_for_timestamp

    sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

    slow_query_log=on

    slow_query_log_file = /var/log/mysql_slow.log

    long_query_time = 2

    #performance

    max_allowed_packet = 32M

    max_heap_table_size = 128M

    sort_buffer_size = 16M

    join_buffer_size = 16M

    thread_cache_size = 16

    query_cache_size = 128M

    query_cache_limit = 4M

    ft_min_word_len = 8

    thread_stack = 512K

    tmp_table_size = 128M

    #MyISAM

    read_buffer_size = 8M

    read_rnd_buffer_size = 64M

    myisam_sort_buffer_size = 256M

    skip-federated

    当前配置文档。 基本完全不懂 都是从网上一点一点看来了 求助

    业务量还可以,想最大利用

    目前没读写分离

    4 replies    2018-06-14 09:29:57 +08:00
    loongwang
        1
    loongwang  
       Jun 13, 2018
    要不看下高性能 mysql,有一定参考价值,网上的良莠不齐,很容易被带坑里
    opengps
        2
    opengps  
       Jun 13, 2018
    话说,这个配置选择自己搭建 mysql,你很有必要用 ssd 盘
    你都用到这个配置规模了,有必要单独使用 RDS for mysql 了,自带读写分离之类的功能,好像也可以调整参数,而且还有高可用高 iops
    guoyu4126
        3
    guoyu4126  
    OP
       Jun 13, 2018
    @opengps 用得是 ssd 盘。 但是 RDS for mysql 还没有配。不过 redis 用得很多,可以减轻一下 mysql 压力
    panzhc
        4
    panzhc  
       Jun 14, 2018
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   947 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 44ms · UTC 21:31 · PVG 05:31 · LAX 14:31 · JFK 17:31
    ♥ Do have faith in what you're doing.