1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Database optimization needed (I pay)

Discussion in 'MySQL' started by mongolpunctro, Sep 13, 2008.

  1. #1
    I need to optimize my database to use less memory of the CPU, because i recive an error frequently from my hosting company.
    I also send them an e-mail and this is the reply:

    Dear Customer,

    This error means that you have gone over the CPU limit with us. The site is always calculating how much CPU usage you are using in an average 60 second time frame. If you go above the limit, you will get this message no matter where on your site you go. Our system keeps taking averages and as soon as the average goes below the limit, your site automatically comes back. It usually only take less than 5 minutes to come back.

    You can use half of the processing power of your server box over a running 60 second time period. So for example, on your 8x core server you can use 240 CPU seconds over 60 real seconds (Looking at it another way you can use 8-10 GHz at all times).

    To see how much your usage was, there are logs in your account in the File Manager in the cPanel. Open to the Home folder and then go to /tmp/cpu_exceeded_logs/ then you can see your usage. Check what was your cause first, but usually this happens from MySQL queries and you can try to optimize your database in PHPMyAdmin in the cPanel, or empty out some of your tables if it has large amounts of old data.

    More information About how to deal with CPU exceeded errors can be found at the following URL.

    http://helpdesk.bluehost.com/kb/index.php?x=&mod_id=2&id=498




    If someone can help me with this I will pay him trough paypall.

    Thank you.
     

    Attached Files:

    mongolpunctro, Sep 13, 2008 IP
  2. jgorski503

    jgorski503 Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I can optimize the database for you, however, I cannot guarantee that it will meet the requirements of your hosting company. Depending on their limitations it may be time to find a new hosting company.

    You can email me at info@jgorski.com
     
    jgorski503, Sep 14, 2008 IP
  3. Kuldeep1952

    Kuldeep1952 Active Member

    Messages:
    290
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    60
    #3
    You can use the "Explain SQL" option in phpmyadmin to analyse your queries.
    Also try reducing the number of MySQL queries by caching.
     
    Kuldeep1952, Sep 14, 2008 IP
  4. chisara

    chisara Peon

    Messages:
    141
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #4
    When looking through your CPU listing it mentions queries taking huge amount of time.
    So I would start with an investigation in your mysql_slow_queries log which should contain all queries taking longer then a predefined duration.
    Please send or PM that file that would be a good starting point since the DB is eating CPU time according to you CPU logs.
     
    chisara, Sep 15, 2008 IP