The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Optimizing MySQL server -my.cnf

Discussion in 'Workarounds and Optimization' started by omid1367, Nov 15, 2014.

  1. omid1367

    omid1367 Registered

    Joined:
    Nov 15, 2014
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    VPS Server Information

    Intel(R) Xeon(R) CPU E5-2620 0 @ 2.00GHz
    5 GB ram

    What are the best settings for the server my.cnf file?
    Server speed is very low indeed.
    Few visitors to increase server load goes up to 7 to 15

    My.cnf file settings are as follows :


    PHP:
    [mysqld]
    slow_query_log=1
    long_query_time
    =0.1
    long_query_time
    =10
    #--slow-query-log-file=/var/lib/mysql/slow.log
    log-error="/var/lib/mysql/error.log"
    innodb_additional_mem_pool_size=512M
    innodb_buffer_pool_size
    =1000M
    innodb_file_per_table
    =1
    #innodb_log_buffer_size=8M
    #innodb_flush_log_at_trx_commit=1
    innodb_flush_method=O_DSYNC
    myisam_sort_buffer_size
    =64M
    #expire_logs_days=7
    thread_cache_size=16
    max_allowed_packet
    =32M
    skip
    -federated
    table_definition_cache
    =3000
    local
    -infile=0
    table_open_cache
    =5000
    max_connections
    =100
    max_user_connections
    =50
    thread_concurrency
    =8
    port
    =3306
    query_cache_size
    =50M
    query_cache_limit
    =1M
    query_cache_type
    =1
    socket
    ="/var/lib/mysql/mysql.sock"
    skip-external-locking
    default-storage-engine=MyISAM
    open_files_limit
    =1500
    tmp_table_size
    =30M
    max_heap_table_size
    =30M
    read_buffer
    =8M
    key_buffer
    =400M
    sort_buffer_size
    =256K
    read_buffer_size
    =2M
    join_buffer_size
    =512K
    key_buffer_size
    =500M
    [mysqldump]
    max_allowed_packet=16M
    quick
    [mysql]
    no-auto-rehash
    [mysqlhotcopy]
    interactive-timeout
    myisam_use_mmap
    =1
    innodb_stats_on_metadata
    =0
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,762
    Likes Received:
    662
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page