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!

mysql config for a vps with 1.13 Ghz proc / 768 MB RAM

Discussion in 'Workarounds and Optimization' started by SherifBuzz, Dec 2, 2010.

  1. SherifBuzz

    SherifBuzz Member

    Joined:
    Dec 2, 2010
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    51
    Hi all, my site is currently on a shared host, and my traffic has outgrown being on a shared, and i've recently signed up for a vps and have been experimenting with it for the last month, planning to go live end of year. I'd love some advice as to tuning my mysql config.

    site stats :
    - site is a dating site
    - php / mysql based
    - around 7,000 visits per day / 80,000 page views
    - bandwidth usage about 30 GB / month ( low as images are hosted on amazon s3)
    - database size is about 500 MB

    vps specs :
    - 1.13 Ghz proc / 768 MB RAM
    - apache/php/mysql

    here is my current my.cnf:
    only change i made was setting innodb_buffer_pool_size (daily archive operations were very slow at the original setting of 8MB)

    appreciate any recommendations and sorry for the long post.

    Code:
    [mysqld]
    safe-show-database
    
    tmp_table_size = 32M
    
    max_heap_table_size = 32M
    
    query_cache_limit=1M
    
    query_cache_size=16M ## 32MB for every 1GB of RAM
    
    query_cache_type=1
    
    max_connections=300
    
    collation_server=utf8_unicode_ci
    
    character_set_server=utf8
    
    delayed_insert_timeout=40
    
    interactive_timeout=10
    
    wait_timeout=30
    
    connect_timeout=20
    
    thread_cache_size=64
    
    key_buffer=24M ## 32MB for every 1GB of RAM
    
    join_buffer=1M
    
    max_connect_errors=20
    
    max_allowed_packet=8M
    
    table_cache=1024
    
    record_buffer=1M
    
    sort_buffer_size=1M ## 1MB for every 1GB of RAM
    
    read_buffer_size=1M ## 1MB for every 1GB of RAM
    
    read_rnd_buffer_size=1M  ## 1MB for every 1GB of RAM
    
    thread_concurrency=2 ## Number of CPUs x 2
    
    myisam_sort_buffer_size=16M
    
    innodb_buffer_pool_size=390M
     
    #1 SherifBuzz, Dec 2, 2010
    Last edited: Dec 2, 2010
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