Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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 Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,216
    Likes Received:
    1,937
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice