etc/my.cnf optimisation

Discussion in 'Site & Server Administration' started by adresanet, Dec 15, 2010.

  1. #1
    Hello,

    On a dual core E8500 @ 3.16GHz with 4GB of RAM, 32bit centos
    I have the followings:
    set-variable = max_connections=105
    safe-show-database
    
    long_query_time = 2
    log-slow-queries = /var/log/mysql-slow.log
    log-queries-not-using-indexes
    
    query_cache_limit=512M
    query_cache_size=512M
    query_cache_type=1
    
    query_cache_min_res_unit=2k
    
    
    table_cache=3072
    tmp_table_size=640M
    max_heap_table_size=592M
    
    key_buffer=16M
    sort_buffer_size=16M
    read_buffer_size=4M
    key_buffer_size=150M
    join_buffer=3M
    
    interactive_timeout=8
    wait_timeout=18
    connect_timeout=10
    
    thread_cache_size=4
    thread_concurrency=4
    
    concurrent_insert=2
    low_priority_updates=1
    Code (markup):
    What can I do to improve my server performances ?
    Thanks!
     
    adresanet, Dec 15, 2010 IP
  2. naskin

    naskin Peon

    Messages:
    31
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You can use very good mysqltuner.com perl-script for optimization your mysql-server settings.
     
    naskin, Dec 24, 2010 IP
  3. mwasif

    mwasif Active Member

    Messages:
    816
    Likes Received:
    23
    Best Answers:
    1
    Trophy Points:
    70
    #3
    What is your database and index size?
     
    mwasif, Dec 24, 2010 IP
  4. Axcell

    Axcell Active Member

    Messages:
    128
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    73
    #4
    Axcell, Dec 24, 2010 IP
  5. Bohra

    Bohra Prominent Member

    Messages:
    12,573
    Likes Received:
    537
    Best Answers:
    0
    Trophy Points:
    310
    #5
    depends on your mysql usage what kinds of site are you running ?
     
    Bohra, Dec 26, 2010 IP
  6. RectangleMan

    RectangleMan Notable Member

    Messages:
    2,825
    Likes Received:
    132
    Best Answers:
    0
    Trophy Points:
    210
    #6
    Curious why you're on 32-bit OS? Is this an old server with single core?
     
    RectangleMan, Dec 28, 2010 IP
  7. richammond

    richammond Active Member

    Messages:
    28
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    86
    #7
    Exactly!! Use a 64-bits OS with mysql and the rest going with it. You'll see such an improvement. Otherwise, you can host your mysql server elsewhere as a dedicated mysql server. What does your top command show??
     
    richammond, Dec 30, 2010 IP