• Hi.

    I have a blog on Bluehost and I’ve CPU throttling since last friday. FastCGI is enabled, database repared and optimized, WP SuperCache enabled and no new plugins installed in last few weeks.

    Looking at mysql_slow_queries log, I found this.

    # Mon Dec  6 13:20:32 2010
    # Query_time: 14.233566  Lock_time: 0.050343 Rows_sent: 5  Rows_examined: 212
    use macmedi1_wrdp1;
    SELECT p.post_title, p.comment_count, p.post_date, p.ID, COUNT(tr.object_id) AS counter
      FROM wp_posts AS p
      INNER JOIN wp_term_relationships AS tr ON (p.ID = tr.object_id)
      INNER JOIN wp_term_taxonomy AS tt ON (tr.term_taxonomy_id = tt.term_taxonomy_id)
      WHERE (tt.taxonomy = 'post_tag' AND tt.term_id IN ("176", "42", "55", "10", "70"))
      AND p.ID <> 305
      AND p.post_status = 'publish'
      AND p.post_date_gmt < '2010-12-06 21:20:18'
      AND p.post_type = 'post'
      GROUP BY tr.object_id
      ORDER BY counter DESC, p.post_title DESC
      LIMIT 0, 5
    
    # Mon Dec  6 13:20:38 2010
    # Query_time: 19.074759  Lock_time: 0.050334 Rows_sent: 5  Rows_examined: 1364
    use macmedi1_wrdp1;
    SELECT DISTINCT wp_posts.*, (meta_value+0) AS views FROM wp_posts LEFT JOIN wp_postmeta ON wp_postmeta.post_id = wp_posts.ID WHERE post_date < '2010-12-06 21:20:19' AND 1=1 AND post_status = 'publish' AND meta_key = 'views' AND post_password = '' ORDER  BY views DESC LIMIT 5
    
    # Mon Dec  6 13:20:38 2010
    # Query_time: 15.825190  Lock_time: 9.271190 Rows_sent: 5  Rows_examined: 1364
    use macmedi1_wrdp1;
    SELECT DISTINCT wp_posts.*, (meta_value+0) AS views FROM wp_posts LEFT JOIN wp_postmeta ON wp_postmeta.post_id = wp_posts.ID WHERE post_date < '2010-12-06 21:20:22' AND 1=1 AND post_status = 'publish' AND meta_key = 'views' AND post_password = '' ORDER  BY views DESC LIMIT 5
    
    # Mon Dec  6 13:20:42 2010
    # Query_time: 5.250371  Lock_time: 1.397037 Rows_sent: 16  Rows_examined: 16
    use macmedi1_wrdp1;
    DESC wp_comments

    It’s clear that the times are totally exaggerated. As the only change (but not on Friday) was the upgrade to 3.0.2, can this be the cause?. Honestly I don’t know what else I can check.

    Thanks in advance.

Viewing 3 replies - 1 through 3 (of 3 total)
  • How many posts do you have on your site? Removing auto-saves may help. See: Delete Revisions

    Lock_time: 9.271190

    This lock time is pretty high, showing that other queries kept this query from being able to run. Generally this is caused by other queries from some of your other databases which are choking. Do you have any other databases on the account? If not, your server may be experiencing high mysql loads, but probably not enough to be the cause of all your problems as a lock time of only .5 was paired with a query of 14.

    From what I understand of this throttling, and you can check with your host if you want, is that it only occurs on accounts because of themselves. Problems caused by other users will not cause throttling on anyone’s accounts other than their own.

    See also: Site Optimization
    Database Optimization

    Thread Starter Merrin

    (@merrin)

    First of all, thanks for response.

    I have only 1 database (WordPress) and 450 posts. I’ve deleted revisions and I’ve reduced CPU disabling all unused plugins and changing some Super Cache settings. CPU throttling has been reduced but there’s still quite large consumption peaks.

    I’ll try to optimize database (indexes, etc.). What surprised me is that all of this has happened suddenly.

    Thank you very much.

    Even if a plugin is disabled, the database is still having to make a check on it which, although small, can add up to a series of useless/wasted queries. Rather than just disabling them, delete anything you can afford to delete.

    One good thing to do is to delete all plugins you can afford to delete and de-activate the others, then use PHPMyAdmin in your account to go to the _options table and then in there to the active_plugins in the option_name field. Edit that entry and delete everything from the option_value field. Then re-activate whatever plugins are needed.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘WP 3.0.2 CPU throttling’ is closed to new replies.