Why is my site Slower than Slow?

I hate to bring up this subject again but my site is getting slower by the hour.

I am using WP Multi-site with 10 subsites. BP is on the main site.

My host (hostmonster.com) techs tell me the slowness is in my site and not in other sites on my server. They say my site is "throttling." They showed me where I can download a list of slow queries, which I did. I deleted most of them and left others for the attached PDFs.

Some of the highlights are: Domain mapping is taking several seconds. Some queries take up to 17 seconds. Many queries are more than 6 seconds. In admin, when I click on a menu like plugins, it takes about 10 minutes before I see the page loaded. I installed Super Cache in Easy mode. It made no perceptible difference.

My key domain is http://edberry.com My two key subdomains are http://polymontana.com and http://climateclash.com. My customers are leaving because no one can use my sites.

Thanks for any help, Ed

  • exberry

    Hi Mason and thank you,

    Well, you are right. It did speed up while I was doing something else. The admin speeded up along with the user displays. I looked at the latest sql logs and they are better. However, there are still some slow queries like the following two, that deal with taxonomies and usermeta as follows:

    # Query_time: 7.792406 Lock_time: 0.086983 Rows_sent: 22 Rows_examined: 110
    use edberryc_wrd1;
    SELECT t.*, tt.*, tr.object_id FROM wp_27_terms AS t INNER JOIN wp_27_term_taxonomy AS tt ON tt.term_id = t.term_id INNER JOIN wp_27_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN ('category', 'post_tag') AND tr.object_id IN (316, 310, 298, 293, 276, 273, 271, 266, 252, 250, 259) ORDER BY t.name ASC

    # Query_time: 3.616238 Lock_time: 0.000808 Rows_sent: 1 Rows_examined: 215
    use edberryc_wrd1;
    SELECT DISTINCT u.ID as id, u.user_registered, u.user_nicename, u.user_login, u.display_name, u.user_email , um.meta_value as last_activity FROM wp_users u LEFT JOIN wp_usermeta um ON um.user_id = u.ID WHERE u.spam = 0 AND u.deleted = 0 AND u.user_status = 0 AND um.meta_key = 'last_activity' AND DATE_ADD( um.meta_value, INTERVAL 5 MINUTE ) >= UTC_TIMESTAMP() ORDER BY um.meta_value DESC LIMIT 0, 50

    Do you know what is generating these queries?

    I am not running CustomPress or anything else I know of that uses taxonomies, unless BP uses them.

    Thanks, Ed

  • SooBahkDo

    Hi All,

    I too am now experiencing excessive slowness on dashboard pages and visitor pages on two 3.0.4 installations with domain mapping 3.0.4 and multi-domains 1.1 installed. (30 secs to two minutes for pages to load) Both sites previously worked very snappily with both installed.

    What should I inspect to determine potential source of slowness?

    http://www.soobahkdo.biz
    http://www.blogcrop.com

  • Ulrich

    @exberry:

    Do you know what is generating these queries?

    # Query_time: 7.792406 Lock_time: 0.086983 Rows_sent: 22 Rows_examined: 110
    use edberryc_wrd1;
    SELECT t.*, tt.*, tr.object_id FROM wp_27_terms AS t INNER JOIN wp_27_term_taxonomy AS tt ON tt.term_id = t.term_id INNER JOIN wp_27_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN ('category', 'post_tag') AND tr.object_id IN (316, 310, 298, 293, 276, 273, 271, 266, 252, 250, 259) ORDER BY t.name ASC

    This query is generated by the function wp_get_object_terms which is used in several places in WordPress core and BuddyPress.

    # Query_time: 3.616238 Lock_time: 0.000808 Rows_sent: 1 Rows_examined: 215
    use edberryc_wrd1;
    SELECT DISTINCT u.ID as id, u.user_registered, u.user_nicename, u.user_login, u.display_name, u.user_email , um.meta_value as last_activity FROM wp_users u LEFT JOIN wp_usermeta um ON um.user_id = u.ID WHERE u.spam = 0 AND u.deleted = 0 AND u.user_status = 0 AND um.meta_key = 'last_activity' AND DATE_ADD( um.meta_value, INTERVAL 5 MINUTE ) >= UTC_TIMESTAMP() ORDER BY um.meta_value DESC LIMIT 0, 50

    This one is generated by BuddyPress on the activity page.

    @SooBahkDo:

    What should I inspect to determine potential source of slowness?

    If you could inspect your sql logs to find out if there are slow queries it would be a good starting point.
    Also, you can try disabling some plugins one by one to find out if one of them may be causing the issue.

  • exberry

    @Ulrich, Thanks for the information.

    Since these queries are in the core WP and BP, their slowness suggests something inside the new WP is causing the problem. I did not notice any unusual slowness until I upgraded to WP 3.04 (although 3.03 lasted such a short time I don't know if it had the same problem). I have not made any changes in my site during these upgrades.

    So, I think the significant question to ask is: Why are these two queries are taking so long?

    Thanks, Ed

  • exberry

    My site is slow again this morning. Getting to the Admin menu took several minutes. This task recorded maybe 50 slow queries. Here is one example:

    # Tue Jan 18 08:52:44 2011
    # Query_time: 9.335447 Lock_time: 5.313932 Rows_sent: 3 Rows_examined: 17
    use edberryc_wrd1;
    SELECT t.*, tt.*, tr.object_id FROM wp_27_terms AS t INNER JOIN wp_27_term_taxonomy AS tt ON tt.term_id = t.term_id INNER JOIN wp_27_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN ('category', 'post_tag') AND tr.object_id IN (4) ORDER BY t.name ASC

    Pressing "Save Menu" took so long it timed out.

  • SooBahkDo

    Similar slowness and admin access timeouts over here with no plugins active except WPMU mu-plugins. Today, I will be removing them all and going back to basic installation to test site responsiveness.

    I too noticed the slowness after 3.0.4 upgrade and wonder if it could be related to modified interaction with mu-plugins by the core security modifications.

    Can anyone suggest a tool for creating SQL query logs at GoDaddy hosting?

    Phil D

  • exberry

    @drmike,

    I am using Super Cache and it did not make a big difference. This suggests the problem is independent of the things Super Cache does.

    I must admit I suspect overload on the host server but their techs assure me that is not the case. OK, I don't totally believe them since it is very strange that my site admin is slower at certain times of the day than at other times. If I had evidence their server is overloaded then I would find a new host. But I would hate to do all the changing and find the problem has traveled with me.

    Ed

  • drmike

    Joins within php usually are (for lack of a better term) processor intensive. Wish I could give a reference to that or suggestions on how to deal with them but the word 'join' is on like every post on every forum on the net. Kind of hard to find anything to point at.

    edit: You're not using ssl on the admin side, are you? I k now that was an issue with wp.com when they first added it. Got to the point that they actually removed it for over a year and then only brought it back for the signon process.

  • Ulrich

    Did you try repair and optimize on your db tables?

    A Google search returns several related results, but without resolution:
    http://www.google.com/search?q=AS+tr+ON+tr.term_taxonomy_id+%3D+tt.term_taxonomy_id+WHERE+tt.taxonomy+IN+('category',+'post_tag')+AND+tr.object_id+IN#sclient=psy&hl=en&safe=off&q=slow+AS+tr+ON+tr.term_taxonomy_id+%3D+tt.term_taxonomy_id+WHERE+tt.taxonomy+IN+('category'%2C+'post_tag')+AND+tr.object_id+IN

  • SooBahkDo

    For whatever the intel may be worth, I eliminated all plugins (WPMU and otherwise) from three 3.04 GoDaddy installations.

    Site response time was restored to snappy levels, so I plan to slowly reintroduce plugins over time and evaluate impact on site responsiveness.

    I also plan to move one installation to a VPS, then keeping all other installation configuration factors the same, compare site responsiveness to shared hosting responsiveness.

    It occurred to me given the amount of time and energy this kind of troubleshooting probably consumes for tech support and users alike, that somewhere there must be some benchmarking tools for Wordpress or something similar to automate some kind of site/plugin sets configurations and resulting performance.

    If no such tool exists, then it seems like one would be valuable.

    Even an automated process something like the following could be a time saver that could be run on a test site to identify the source of issues.

    1) Activate a default theme
    2) Activate a default set of options
    3) User Defines a list of plugins to be tested (and in various configurations with each other to identify conflict pairing etc.)
    4) Define a default series of actions to be performed on the site with logging of all action response times
    5) Automatically activate first plugin and repeat test and log results
    6) Automatically activate second plugin and repeat test and log results
    7) Automatically activate third and fourth, etc. etc. etc. plugins and repeat test and log results
    8) Automatically activate the plugins by sequencing through multiple pairing confgurations repeating test and logging for each configuration pairing)
    9) Evaluate each plugin (or each pairings) impact on site performance and generate report for user with best to worst ratings

    Perhaps a tool like this exists that I am not aware of ( or a set of tools developers use) but it would be great to have an application that just worked a site and produced a benchmark and conflict or error report so that users did not have to go through these same steps manually.

    Does any such animal exist?
    Is this a pipe dream?

    Phil D

  • exberry

    @SooBahkDo, Please report the results of your tests. They will be especially useful if a particular plugin causes the largest delays.

    @Lance, Thank you. I am reviewing VPS hosts now and preparing a complete check list before embarking on changing hosts. The challenge is to reduce site downtime to minimum.

    I strongly suspect hostmonster has a lot of apps on my server that are slowing down my site.

  • SooBahkDo

    @exberry, will do.

    In my exploration of tools and strategies for structuring some kind of meaningful benchmarking and testing strategy, I came across this interesting free tool:

    http://www.pingdom.com (There are surely other tools like it, this one just happened to catch my attention)
    http://tools.pingdom.com/

    Just click the "Tools" tab enter a url and it displays the loading time for every element of a page in a graphical presentation. It also allows you to save your tests. Pretty interesting although it does not really touch on the issues we have been discussing, however, it may be helpful in confirming and quantifying that issues are actually occurring by providing an objective 3rd party reference. (at least for user facing pages.)

    When I come up with any meaningful progress on the other, I'll post it.

    Phil D

  • drmike

    benchmarking tools

    There is and I'm drawing a blank on what it is. It did a series of timings during each part of the output and I can;t remember the keywords to find it. Was big about 18 months ago or so.

    There is this which may be helpful but not what I was thinking of:

    http://www.codediesel.com/mysql/benchmarking-wordpress-sql-using-firephp/

    edit: Found this too but still not what I was thinking of:

    http://codex.wordpress.org/Testing_WordPress_Performance

    reedit: There is a plugin for the xdebug: http://wordpress.org/extend/plugins/performance-testing/

    This is bugging me that I can;t remember what it was.

  • teckyhead

    GD Press tools does that sort of thing. If you enable SQL logging under Settings->Debug and tick the boxes to show the log below admin and blog pages it gives you this at the bottom of each page:

    Thank you for using GD Press Tools 2.5.8 administration addon plugin.
    Page generated in: 2.611 seconds.
    Total memory used: 19.3 MB
    Total number of queries: 30
    Total execution time: 0.2237 seconds

    That is then followed by a detailed summary of timings for each included file and the queries in each of those files.

    http://wordpress.org/extend/plugins/gd-press-tools/

    Gary

  • SooBahkDo

    Thanks for the tools tips,

    Just an interesting follow-up on site responsiveness benchmarking.

    I have three different 3.0.4 multisite installations all configured with almost identical plugins all hosted at GoDaddy and each has a different statics IP address. Each is configured with 128 megs of PHP memory allocated. Each install has about 10 active sites with minimal posts, pages and images. Two of them are used primarily as live test sites to evaluate plugins, themes and SEO tactics.

    I had been having intermittent issues with all three site's responsiveness for a couple of months (different sites at different times) and had logged numerous (10+) calls to tech support and in most cases they reported no unusual server activity that should be slowing down my sites.

    There were never any server errors reported in any of my server logs.

    Based on their response that all was well in GoDaddy land, I had been deactivating all plugins on each installation, removing themes, etc. trying to identify what might be causing site responsiveness to suddenly change from a few seconds to several minutes to failing completely (server 500 errors) on different sites at different times. Sometimes responsiveness improved after taking these actions and sometimes it did not, but eventually, things would return to a usable state.

    When I responded on this thread and began planning a systematic approach to figuring out what the %3&! was wasting all my time, the first thing I did was activate free http://www.pingdom.com monitoring on each site and I set each site to be tested once per minute. I figured this would generate a steady stream of usage and thus create a reasonable graph of site responsiveness over time. I did not change any other aspects of configuration. The site reports provide good insight into the amount of time each page element takes to load and makes very clear the quantity of items being loaded across different themes, plugins, etc. Some plugins and themes add a TON of items that must be loaded.

    I also activated a VPS.NET account to test and an Amazon accout to test with plans to recreate the installations in those environments to compare responsiveness.

    FYI for anyone that wants to tackle the steep learning curve for Amazon's services, you get a year free for signing up. Probably because it will take that long to figure it all out. Geeeeezzzzz.
    http://aws.amazon.com/ec2/

    VPS.NET is much simpler and comes highly recommended by Yoast. I selected a $90 month plan for testing, but have not had time to complete a setup yet. They have a lucrative affiliate program for those interested in such. http://www.vps.net/

    Both these hosting options seem capable of serving the biggest, baddest, highest traffic site, you could ever hope for so they are probably way overkill for the majority of applications. However, I always did like souped up cars, so I figured, might as well test the hottest fastest thing out there if I am going to go to all the trouble to do this.

    MEANWHILE BACK AT THE RANCH -- Interestingly - or coincidently - or perhaps by divine intervention - about two days later all three sites became totally inaccessable via FTP, but the visitor facing pages remained accessable. A call to tech support confirmed that they had issues on all three sites (different user accounts) at GoDaddy with promise to resolve within 8 hours.

    Now I have NO IDEA what was going on at the GoDaddy corral, but my guess is that whatver was causing all the intermittent site responsiveness grief and time wasting (for me, many others I am sure and their techs) finally broke completely. I deduce this because after they fixed whatever broke FTP access, all three sites have been very responsive without fail. I even reloaded all the plugins (a barn full) on the sites and they have been responding consistenty with about a 30% memory load. (30 megs in use of 128 megs available) Pingdom reports also indicate much more consistent responsiveness across all three sites.

    Sidebar: during this ordeal I did identify some very "heavy" plugins and themes. They work ok when used alone or with only a couple of other plugins, but are too "heavy" when used with a multitude of plugins. I plan to post my findings on those as I have time.

    Sooooooooo the moral of this story so far is... (at least for me is) if you can't measure it, you can't manage it.

    Which brings us back to the very real need for some basic benchmarking tools that can stress test the hosting environment as well as the Wordpress plugin-theme interaction environment and thus save us all untold wasted hours chasing unknown causes of issues. I am sure they are already out there, just gotta find em, learn em and keep em handy to avoid these kind of mystery time sinks when the actual cause is not within our control.

    Now back to more productive matters.

    Phil D

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.