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.

optimization for my.cnf

Discussion in 'Workarounds and Optimization' started by bhaa, Apr 26, 2012.

  1. bhaa

    bhaa Registered

    Joined:
    Apr 26, 2012
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    HIi,

    i need to optimize my.cnf
    new vps and high cpu / memory load in mysql
    and my my.cnf is the
    Code:
    [mysqld]
    set-variable = max_connections=500
    log-slow-queries
    safe-show-database
    
    Processor Information
    Code:
    Total processors: 4
    
    Processor #1
    
        Vendor
            GenuineIntel
    
        Name
            Intel(R) Xeon(R) CPU X5670 @ 2.93GHz
    
        Speed
            2932.498 MHz
    
        Cache
            12288 KB
    
    Processor #2
    
        Vendor
            GenuineIntel
    
        Name
            Intel(R) Xeon(R) CPU X5670 @ 2.93GHz
    
        Speed
            2932.498 MHz
    
        Cache
            12288 KB
    
    Processor #3
    
        Vendor
            GenuineIntel
    
        Name
            Intel(R) Xeon(R) CPU X5670 @ 2.93GHz
    
        Speed
            2932.498 MHz
    
        Cache
            12288 KB
    
    Processor #4
    
        Vendor
            GenuineIntel
    
        Name
            Intel(R) Xeon(R) CPU X5670 @ 2.93GHz
    
        Speed
            2932.498 MHz
    
        Cache
            12288 KB
     
  2. NetMantis

    NetMantis BANNED

    Joined:
    Apr 22, 2012
    Messages:
    117
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Utah
    cPanel Access Level:
    DataCenter Provider
    The machine specs alone are not sufficient to build an adequate my.cnf configuration. One must also know how many databases you plan to host, number of tables, traffic, etc

    I wrote a very lengthy post for someone else on this same question just yesterday. You may want to look through my previous posts and see what I wrote helping them setup their my.cnf specific for their own server.

    A good starting point, I'd recommend you using Matthew Montgomery's MySQL tuning script which can be found at https://launchpad.net/mysql-tuning-primer

    You mentioned that you have a VPS server. Traditional VPS servers are a bit more difficult to build an optimized my.cnf for because the hardware shown may not necessarily be the hardware you actually have access to. It is not uncommon to show multiple processors but the VPS server actually only really have access to a single processing core, etc so that in and of itself has very little meaning. What we would want to know is what is the memory usage limits for your VPS and the number of tables you will have hosted in your database as these items will tell much more how your MySQL should be configured.
     
  3. eva2000

    eva2000 Well-Known Member

    Joined:
    Aug 14, 2001
    Messages:
    322
    Likes Received:
    10
    Trophy Points:
    18
    Location:
    Brisbane, Australia
    cPanel Access Level:
    Root Administrator
    Twitter:
    true definitely need more info.

    bhaa, try using my mysqlmymonlite.sh script to gather more info http://forums.cpanel.net/f189/mysql...tats-gathering-tool-cpanel-server-268011.html. It takes less than <12 seconds to gather all info outlined at http://mysqlmymon.com/

    download zip file has readme.txt file to get you started.
     
Loading...

Share This Page