MySQL / Database Optimisation

Discussion in 'Site & Server Administration' started by contemptx, Jun 5, 2007.

  1. #1
    I Have a large website and im currently running into some issues which I cant seem to solve so im looking for someone who can optimise both MySQL & The Database. (Paid of course.)

    SQL seems to be using around 97% CPU

    I have tried rebooting sql, checking / repairing the database with no change.

    The database size is around 11GIG

    Server Spec:
    Linux - CentOS 4.x
    Cpanel
    2x Dual Xeon 3ghtz
    4GB Ram
    2x 250gb Drives - Raid 1

    Contact Information

    PM
    Email / MSN:
     
    contemptx, Jun 5, 2007 IP
  2. zonzon

    zonzon Peon

    Messages:
    100
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #2
    are you sure that's mysql the bottleneck? what are the other process running on the same box? apache? etc..
     
    zonzon, Jun 5, 2007 IP
  3. tanfwc

    tanfwc Peon

    Messages:
    579
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #3
    PM sent ..
     
    tanfwc, Jun 5, 2007 IP
  4. chrisstinson

    chrisstinson Peon

    Messages:
    67
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Hey contemptx,

    How many records (tables, rows, etc) do those 11GB take up?
    Are you using InnoDB or MySIAM tables?
    Also, how many users a day are you getting? What records / how much of that database is actually being called?
    Do you have your slow-log initiated and logging? Anything in there?
    Also, are you using PHP as a front-end? I see many sites that call databases using poorly structured queries...it ends up pulling row after row of data from the server when it can get away with pulling only a few records. Be as specific as possible when calling data...very few wildcards.

    With 11 GB of data, you'll want to have MySQL cache as many queries as possible, meaning big memory useage. The high processor percentage comes from the queries and the pulling of data from the tables.

    Here's a tip from my site:

    Look at the key_reads and key_read_requests numbers. The ratio of key_reads to key_read_requests should be above 1:100 if you can spare the memory. It should be no lower than 1:10.

    How do you increase the ratio for better performance? Increase the key_buffer_size value to an acceptable level.

    There are many more values to look at, if you wish I can help you out.
     
    chrisstinson, Jun 5, 2007 IP
  5. inworx

    inworx Peon

    Messages:
    4,860
    Likes Received:
    201
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I will do that for $30 one time fee.

    Also, this thread is posted in wrong section.
     
    inworx, Jun 7, 2007 IP