Hardware question

Discussion in 'Site & Server Administration' started by deriklogov, Apr 3, 2010.

  1. #1
    Hey,

    I am looking to get one more dedicated server, was wondering if I will install 16Gig of ram instead of 8Gig on 64 bit Centos Os, Does it help with mysql performance ? Does the mysql available to use so much memory ?
     
    deriklogov, Apr 3, 2010 IP
  2. RHS-Chris

    RHS-Chris Well-Known Member

    Messages:
    1,007
    Likes Received:
    35
    Best Answers:
    10
    Trophy Points:
    150
    #2
    Yes, it will help, as MySQL is a large memory hog. You will have to fine tune your my.cnf file to get the best performance out of it. Another option would be to separate your server, and run one server for web and the other strictly for MySQL, that way all the resources of the server will be dedicated to MySQL.
     
    RHS-Chris, Apr 3, 2010 IP
  3. deriklogov

    deriklogov Well-Known Member

    Messages:
    1,078
    Likes Received:
    22
    Best Answers:
    0
    Trophy Points:
    130
    #3
    What would be your suggestion to tune my.cnf for that size of memory ?
     
    deriklogov, Apr 3, 2010 IP
  4. RHS-Chris

    RHS-Chris Well-Known Member

    Messages:
    1,007
    Likes Received:
    35
    Best Answers:
    10
    Trophy Points:
    150
    #4
    That really depends on the usage you are seeing. I would start off with something along these lines, and go from there:

    my.cnf
    
    [client]
    port            = 3306
    socket          = /var/lib/mysql/mysql.sock
    
    [mysqld]
    port            = 3306
    socket          = /var/lib/mysql/mysql.sock
    skip-locking
    key_buffer = 250M
    max_allowed_packet = 1M
    table_cache = 8000
    sort_buffer_size = 2M
    read_buffer_size = 2M
    read_rnd_buffer_size = 8M
    myisam_sort_buffer_size = 64M
    thread_cache_size = 8
    query_cache_size = 70M
    thread_concurrency = 4
    max_connections=300
    query_cache_min_res_unit = 1024
    skip-name-resolve
    thread_cache_size = 12
    local-infile=0
    skip-networking
    
    [mysqldump]
    quick
    max_allowed_packet = 16M
    
    [mysql]
    no-auto-rehash
    
    [isamchk]
    key_buffer = 128M
    sort_buffer_size = 64M
    read_buffer = 2M
    write_buffer = 2M
    
    [myisamchk]
    key_buffer = 128M
    sort_buffer_size = 64M
    read_buffer = 2M
    write_buffer = 2M
    
    [mysqlhotcopy]
    interactive-timeout
    Code (markup):
     
    RHS-Chris, Apr 3, 2010 IP
  5. Axcell

    Axcell Active Member

    Messages:
    128
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    73
    #5
    also, you should consider to using Nginx or LiteSpeed as webserver
     
    Axcell, Apr 3, 2010 IP