The MU forums have moved to WordPress.org

Top five optimization tips (12 posts)

  1. boetter
    Member
    Posted 17 years ago #

    I have a highly popular WPMU install going, and I need to do some optimization. What would be your best suggestions?

    I have thouht of installing eAccelerator, Zend Optimizer, ionCube or something like that - but would it help?

    What is your top five optimization tips for WPMU?

    Thanks!

  2. quenting
    Member
    Posted 17 years ago #

    1) Use a php cache system. I've had many problems with EA (segfaults parsing kses.php). I'd rather recommend APC (same segfaults, but you can configuree APC not to run on a given file).

    2) Another optimization tip would be to add expire headers in the tinymce code. Most default php installations will send no-cache headers to any php file (tinymce javascript is php-embeded), which means everytime a user enters the write page, he'll have to redownload the 100k+ of js.

    3) Be careful with sitewide plugins available. If you want to use any, make sure the query results are cached. Otherwise you'll see the number of queries run skyrocket very quickly.

    4) Use SK2. If you have a popular installation, I'm sure spam is a problem. SK2 is a bit tough to install and configure properly, but once you get it going, it is strictly awesome. And akismet for a popular install means $$$.

    5) Increase max open files in mysql. MU generates craploads of tables, you want this number high on a busy website.

  3. boetter
    Member
    Posted 17 years ago #

    Quenting: Thanks for your answers. They're great!

    Are you for hire? I am currently looking for someone to help me out with this.

    1) I saw itdamager suggest EA in another thread, but if APC is better than I'll give it a go. Where did you make your configurations and which files should be excluded?

    2) How did you do that? I tried looking at the files, but really couldn't figure it out.

    3) How do I track my queries? Is it possible to print them out in the footer just temporarily?

    4) I have SK2 enabled, but it really seems to be rather aggressive. Can you point me to another thread where I could learn about configuring it correctly? Right now it's eating a lot more comments than it should.

    5) What is your suggestion for the amount of max open files?

    My setup is a VPS with 1024 MB ram guaranteed, and 1536 MB dynamic. Running Suse 9.1.

  4. helmi
    Member
    Posted 17 years ago #

    hmm really a popular installation on such a little VPS? How many blogs do you have registered?

    Your name and the fact you're running Suse sounds a bit german ;) If you'd like we could talk a bit and share experiences. You'll find contact possibilites by clicking my nickname.

  5. quenting
    Member
    Posted 17 years ago #

    > Quenting: Thanks for your answers. They're great!
    >
    > Are you for hire? I am currently looking for someone to
    > help me out with this.

    Nope. Actually, I'm looking to hire. Or else I'd be really expensive.

    1) I saw itdamager suggest EA in another thread, but if APC is better than I'll give it a go. Where did you make your configurations and which files should be excluded?

    config's in httpd.conf, kses.php needs to be removed.

    2) How did you do that? I tried looking at the files, but really couldn't figure it out.

    I've added these to the tinymce php file:

    header("Cache-Control: max-age=77760000");
    header("Content-type: text/javascript; charset: UTF-8");
    header("Vary: Accept-Encoding"); // Handle proxy
    header("Expires: " . gmdate("D, d M Y H:i:s", time() + $expiresOffset) . " GMT");
    header("Pragma: public");

    I think I'll soon go for an even better solution which is to just access a js file with the output from this file cached into it.

    3) How do I track my queries? Is it possible to print them out in the footer just temporarily?

    <?php echo $wpdb->num_queries; ?>
    it's already included in many themes, although most of the time commented out in html.

    4) I have SK2 enabled, but it really seems to be rather aggressive. Can you point me to another thread where I could learn about configuring it correctly? Right now it's eating a lot more comments than it should.

    http://mu.wordpress.org/forums/topic.php?id=1769&replies=47

    I have yet to see SK2 eat anything it shouldn't have. I have tweaked the config though.

    5) What is your suggestion for the amount of max open files? My setup is a VPS with 1024 MB ram guaranteed, and 1536 MB dynamic. Running Suse 9.1.

    Seems really low for a "large" implementation. how many blogs do you have ? Can't remember how many open files I had, but there's another thread where I posted my mysql config. I think it was 8000 or something. But I have 4 gigs of ram, and this is likely to impact ram usage, so you need to tweak the numbers depending on your box.

  6. drmike
    Member
    Posted 17 years ago #

    If you're worried about the amount of processing, I wouldn't be using SK2 but Akismet. Sk2 does it's processing on the server while Akismet does it on Automattic's own boxes. Or at least that's how I understand it.

  7. quenting
    Member
    Posted 17 years ago #

    that's indeed how it works, but the main problem with akismet is that the monthly entreprise license for significant amounts of blogs is 10 times the price of a good server.

    I didn't notice much of an impact on server load from the day I rolled out SK2 either.

  8. drmike
    Member
    Posted 17 years ago #

    Agreed but if it's as highly popular as the poster suggests...

  9. boetter
    Member
    Posted 17 years ago #

    Currently it's not large compared to wordpress.com and other hosts, but it's from one of the largest danish newspapers and a few posts gets selected for print in the newspaper each day (approx. 700.000 readers). Right now just 961 blogs, but rising very fast - way too fast for me. :-) But with, let's say, 2500 blogs - what would be your best advice?

    You can reach the site at http://www.urbanblog.dk/

    So I don't have a big problem right now, but by new year I'll have to start considering some drastic optimization.

    I'll try configuring SK2 and see how it goes.

    I just added your suggestions to my tiny_mce_gzip.php, let's hope it works.

    Setting up APC on Suse doesn't seem very easy, I'm going to have to find someone to look into that.

    Thanks for your help, it's highly appreciated!

    -Jacob

  10. quenting
    Member
    Posted 17 years ago #

    > I just added your suggestions to my tiny_mce_gzip.php, let's hope it works.

    Using fiddler you can check wether the file is re-downloaded or served from cache by your browser.

  11. boetter
    Member
    Posted 17 years ago #

    I'm on a Mac quenting, so I can't use fiddler. Would "Tamper Data" or some other Firefox addon do the trick? I'm not a big HTTP-expert.

  12. quenting
    Member
    Posted 17 years ago #

    I'm not sure what tamper data is, but you basically need an http sniffer. There's a developper plugin in FF that allows you to view response headers, but it's not as perfect as a sniffer since you can only see the header for the page you're looking at, not all the images and stuff.

    Browsign your site with a sniffer on is a definitive must, you'll find 404 here and there of old files you forgot to remove references for, you may realize gzip compression's not working right, etc.
    404s in the case of MU are really a pain since a whole page of the blog is sent along them, with tthe ton of queries and stuff that it means.

About this Topic

  • Started 17 years ago by boetter
  • Latest reply from quenting