Forums

Multisite slowness issues (have now pulled all my hair out) (8 posts)

  1. VeeBeeGlobal
    Member
    Posted 5 months ago #

    Hi all,
    I am almost at the end of trying everything.

    I have a very modified multisite installation. (details below)
    A week ago I moved the whole site and all satellites to a 2Gb RAM VPS (3 vCPU's). It had been on a shared VPS environment with 1GB RAM.
    Although I didnt expect magic, I did expect to see some speed improvements - I saw virtually none.

    The site loads some pages quite fine, but when it displays 'listing' results for searches, or listings of categories, it generally takes 8-15secs or so to return displayed results.

    It is a quite complicated install as my client had a quite unique requirement.
    The site lists training courses, and there is approx 110,000 individual courses in the posts table, there are also over 8,000 different organisations that these courses belong to.
    Courses are set up as a custom post type.
    Organisations are set up as a custom post type.
    I have disabled the saving of revisions info.

    The slowness occurs on both the main site, and also all of the satellite sites.

    I have all the satellites configured so they look for all post and taxonomy data in the main site tables - via the use of a simple table_prefix_switch function in functions.php. (so satellites dont look at the table created for multisite, they look at the main site data)

    I installed w3 cache plugin, but it makes little difference to the speed of the searches and listings.

    The main site is http://www.nationalcoursesdirectory.com.au, and one of the satellites is http://www.tafe-courses.com (there are almost 50 sattelites set up, but the speed hasnt changed at all from having 1 to 50 satellites.)
    The intention is that there will be various satellites focussed in on different subsets of data using filters (ie one domain for photography courses, another for uni courses, etc), but at this point I need to get the results to display quicker first, before finding a solution to the filtering of data.

    I have tried a range of things that I have found on these forums, and on other sites on the web, but, there is something which I think is simple, causing this delay - just havent found it yet.

    I do have openx serving some banners in the sidebar, but this does not slow down the individual course details page - so I have excluded this as being the cause. I have changed some mysql settings, and think this may be an area I need to dig further.

    Am most appreciative for any ideas you may have...

    Vaughnn

  2. Ipstenu
    Half-Elf Support Rogue & Mod
    Posted 5 months ago #

    What caching do you have installed on your SERVER?

    Did you set up any DB caching (or opcode) with w3tc?

    It sounds like your database is what's slowing you down.

  3. VeeBeeGlobal
    Member
    Posted 5 months ago #

    Hi Ipstenu - thanks for your reply.

    I do not have any specific caching installed at this point.
    I was just looking at memcache - but have not done anything with this yet.

    I have just the basic w3tc settings, but not on many satellites as yet.

    Seems that even on the site with w3tc installed, there is no difference in speed. The significant issue is that when displaying a search result or listings page (ie, multiple results) where it needs to display a loop, it takes time to 'collate' the data.

    The next step I want to use pre_get_posts to filter results per site, but I want to be sure of the slowness is fixed first, before taking what is virtually a last step before these sites can all be live.

    I have some settings for optimising sql, which I will try today also.
    We had quite a time getting multisite to work in the configuration that we have (as it is not quite conventional the way we share data across sites), so am careful we dont break anything along the way.

    V

  4. Ipstenu
    Half-Elf Support Rogue & Mod
    Posted 5 months ago #

    Sharing data across sites is, hands down, gonna slow things up.

    w3tc works best if you're using some sort of server side caching (I use APC, Memcache works too), otherwise you're just storing static HTML files. Which works, but it's not the best way to speed up a server.

    You need to look into db caching, opcode, and APC, eaccelerator or zend for PHP.

  5. VeeBeeGlobal
    Member
    Posted 5 months ago #

    Thanks Ipstenu,

    I will do this, and report back in here...

    Sharing data across the sites will not be a big problem.
    Essentially the site is set up to have all the multisites read the same posts and taxonomy tables, by changing $wpdb->posts table reference for the multisite from xx_01_posts, xx_02_posts, to xx_posts...

    Will update apache and see what happens...

    V

  6. VeeBeeGlobal
    Member
    Posted 4 months ago #

    OK, took me a while to test a variety of things.

    A mix between optimising mysql caching settings, turning on eaccelerator, made a significant difference.
    I also did some code optimising of some plugins, so that anything admin related, was only loaded if admin was in the admin area, and this meant in some cases that the core area of the plugin was less than 50% of its original size.

    I have also used get_transient and set_transient on things like widgets so that things that change infrequently that would cause database request load is reduced.

    The various sites now consistently produce pages in 1-3 secs, where I was seeing 15-30 sec load times.

    There is quite a bit more that can be optimised.

    Cheers,

    V

  7. Andrea_r
    team pirate
    Posted 4 months ago #

    For the plugins you optimised, have you submitted your improvements back to the various developers? Cuz that would a) rock and b) help SO many people. :)

    It would make the hair loss worthwhile anyway. ;)

  8. VeeBeeGlobal
    Member
    Posted 4 months ago #

    Hi Andrea.

    The plugins I optimised were ones that had been custom written for post types. I essentially isolated all the admin only stuff (meta boxes, and settings stuff) to a seperate file and included it once someone was in the admin area.

    The solution to the multi site data set site I finally have got to work is summarised at http://wordpress.org/support/topic/large-data-set-to-be-shared-to-multiple-sites?replies=4#post-2570429

    I learnt so much about WordPress in one project, I realised most people dont use a quarter of the capability of wordpress's native abilities.

    Cheers,

    V

Reply

You must log in to post.

About this Topic

Tags

No tags yet.