WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] WP admin slow (12 posts)

  1. jkhongusc
    Member
    Posted 2 years ago #

    I have a sluggishness in the WP admin and would like suggestions on how to identify and fix the problem. Our institution (USC) has been running a WP (3.3.1) sub-domain multisite system for over a year now. Recently we have been noticing issues with sluggishness in the admin. There are problems in a few sites, but for this post I only want to focus on our largest site. Various functions within that site are slow, and I would like to focus on the dashboard. This is our observation:

    When the dashboard has not been access for a few hours, the next load takes over 20 seconds. Dashboard re-loads for the next hour or so are fast, <1 second.

    Some site statistics because I believe the number of objects are affecting performance:
    20,000 posts
    14 categories
    350 tags
    13,000 media objects

    This is what I have done so far:
    1) disable all plugins. No effect, dashboard still slow
    2) installed a debugging plugin - debug objects (http://wordpress.org/extend/plugins/debug-objects/). I wanted to check certain things, especially database queries. According to the plugin, database queries took .5 seconds of the 20+second dashboard loadtime.
    3) Verified php/WP memory. 128MB max, according to debug object only using 25% of the memory.
    4) restarted httpd server. That should wipe out any memory cache which would make the next dashboard load take a long time. Dashboard load was fast which tells me memory or memory cache is probably not the problem.

    So why is the dashboard taking so long to load? My guess is some type of information is being processed and probably stored back into WP (like a database cache). That is the only situation that I think of to explain our situation where the dashboard initially takes a long time to load, then is fast for the next hour or so.

    Any suggestions on what I should next? This is what I will try next:
    1) I have asked our sys admins to install a PHP profiler on our system: xdebug and xhprof. For further timing information.
    2) export problem blog and import to a brand new WP install
    3) upgrade to 3.3.2 to see if problem clears
    4) ???

  2. Which dashboard? Individual sites or the network dash?

  3. jkhongusc
    Member
    Posted 2 years ago #

    Which dashboard? Individual sites or the network dash?

    Individual site dashboard is slow.

    Just in case it matters our initial site is a 3 part hostname: define( 'DOMAIN_CURRENT_SITE', 'hostname.usc.edu' );
    Our subdomains are: sub1.hostname.usc.edu, sub2.hostname.usc.edu, etc
    The dashboard is slow for one of our sub-domains, sub1.hostname.usc.edu/wp-admin

    I have the domain mapping plugin which we use to map the sub-domain to a different hostname. For debugging purposes, I have disabled all plugins; so I debug against sub1.hostname.usc.edu/wp-admin

  4. The dashboard is slow for one of our sub-domains,

    What's different about that site? Do you have a lot of spam comments?

  5. jkhongusc
    Member
    Posted 2 years ago #

    What's different about that site? Do you have a lot of spam comments?

    Only thing different is the number of posts and media: 20k posts and 13k media.

    2 pages
    0 comments
    0 links

  6. jkhongusc
    Member
    Posted 2 years ago #

    Do Dashboard widgets get cached? Can the 'Right Now' or other widgets take a long time to render? I am disabling all dashboard widgets.

  7. The dashboard stuff can (and does) get cached. You should be okay leaving 'Right Now' in there, but the RSS feeds I usually pull.

  8. jkhongusc
    Member
    Posted 2 years ago #

    A sys-admin was able to install xdebug for me on my test system. I have identified the problem 25 of 26 seconds were spent on these two functions:
    php::is_file
    ms-functions.php::recurse_dirsize

    I havent delved into the WP code yet. My hunch is that WP is calculating the sites storage space. Our site uses over 2GB in space. WP must be storing that calculation in its database for a period of time; which is why subsequent loads are much faster.

    So my question is how can we reduce this problem? Can we eliminate storage calculations for a particular site or for our entire system if necessary?

  9. Do you limit storage per site?

    And by storage, you mean flat files, right, not DB?

    You could always run a quick DB optimize to see if that helps.

  10. jkhongusc
    Member
    Posted 2 years ago #

    Do you limit storage per site?

    And by storage, you mean flat files, right, not DB?

    You could always run a quick DB optimize to see if that helps.

    It is not a db issue, it is a media library issue. We do not directly limit storage space; WP does that by default. We set high limits because these are internal sites and need lots of storage space. In the 'Right Now' screen from the dashboard, there is a 'Storage Space' which calculates the media file upload size. For our site there are 13k files. At various times, WP will iterate through the media directory and calculate the size. Needless to say this is fairly intensive, 24s, then WP stores the value using the transient APIs.

    You can view a capture of my 'Right Now' screen here -
    http://i48.tinypic.com/a5u78.jpg

    We have allocated 3GB of space to this site. The issue is not capacity. The issue is that calculating the space limit is time and resource consuming. We have set both 'Site Upload Space Quota' and 'Blog Upload Space' to 3000 (3GB) since we didnt now what the difference was.

    We need to remove this space calculation from our site(s). Any ideas of how I can turn this off, e.g. plugin? I prefer not to modify core files if I can avoid it =)

  11. We do not directly limit storage space; WP does that by default.

    Right I was asking because you can set that to blank and have no limit, and I wonder if THAT might help... :)

    /wp-admin/network/settings.php, uncheck the "Site upload space"

    For now, we can just do this as a test to make sure that's not it.

  12. jkhongusc
    Member
    Posted 2 years ago #

    /wp-admin/network/settings.php, uncheck the "Site upload space"

    Thanks this solved our problem. Now we have to live with all of our blogs being unlimited upload. We just have to set some policy.

    Thanks again! Now I have to track down why saving a menu takes 2-3 mins for one of our content developers =)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.