WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] high traffic crashing usmagazine.com (52 posts)

  1. davidchait
    Member
    Posted 8 years ago #

    Note:

    the site has more than 1.2MB of locally-stored images on the homepage... if the site has a daily visitorship >10K, and depending on user cache settings, that's many gigs of overhead per day. on a low bandwidth, memory limited VPS, apache serving up that much content could be a real factor. I'm not speaking from experience, I'm speaking in general terms having done a ton of research on VPS' at one point and deciding to stick with shared hosting until I outgrew it.

    Maybe mark (or others) can speak to the issues of huge content like that; someone with lighttpd or alternate serving approaches would be helpful. Also be good if Will could provide us with the VPS specs, so we know exactly what the min and burst CPU, RAM, and pipe are, and what processes are running on the box aside from LAMP.

    I noticed the homepage is now showing it is cached, with a dynamic-serve time of 0.320 seconds. Given other feedback above, seems like things weren't getting and staying cached...

    -d

  2. Michael Bishop

    Posted 8 years ago #

    This might be inconsequential, but is the fact the site's running 2.0.1 a factor?

  3. pcmt
    Member
    Posted 8 years ago #

    Speaking of images, as an example there's a photo of Keira Knightley on the homepage (55382117.jpg). The image filesize is about 100Kb. Without any discernable loss of quality I was able to reduce this to 30Kb with the same image dimensions (on my machine).

  4. carbontwelve
    Member
    Posted 8 years ago #

    For that amount of bandwidth running on a VPS is a stuipid idea.

    Firstly you would probably need two servers, one dedicated MySQL and one dedicated Apache webserver. You will need a lot of ram, even with any other CMS anything less than 2GB ram for that number of visits per day and your server is going to burn!

    Also Email should have its own dedicated server, I made that mistake a while back, great thing is for me with only 20 or so email users I was able to set up the box easily.

    The Webhost should have offered you better hosting instead of blaming your choice of software. Your their customer and they have a duty to serve you, not boss you around!

    Get a dedicated server on a good webhost, you should see an improvement in service then. Its not the software its a hardware issue.

  5. manstraw
    Member
    Posted 8 years ago #

    I tried to say more or less the same thing earlier carbontwelve, but you've outlined it better. Trying to shoehorn a large and busy commercial site into a VPS is a challenge at best. I'm sure it could be somewhat improved with the various performance enhancements discussed, but it's still a bus trying to be a beamer. He wouldn't need a monster server, but I'd still recommend he get the best his budget allowed. Unless he doesn't expect to grow in populatity.

  6. WillHines
    Member
    Posted 8 years ago #

    Thanks for all the advice, everyone. I will be better prepared the next time I try to install WP on a highly-trafficked site, and I'm sure I will try again.

    I think the front page was not caching because of comment counts changing. I've turned comments off and the front page seems to cache.

    For many of these changes -- trying lightttpd, more RAM, analyzing queries, determining if big images are a factor -- you need your ISP to be on board. I wasn't successful in getting them on board.

    [edited to add]: angsuman, that's a handy change for wp-cache to prevent regeneration with every new comment. Very cool. If someone does that, they should probably add a message telling the person posting that their comment won't show up right away, or else people will post repeatedly.

    Thanks again for all the advice. It will be a big help on my next attempt.

  7. davidchait
    Member
    Posted 8 years ago #

    Will, can you please furnish your current VPS specs, as it'll help us a lot when similar issues (or questions of need) come up in the future? Thanks!

    -d

  8. WillHines
    Member
    Posted 8 years ago #

    I can't find a useful spec. It (was/is) a mediatemple DV-Extreme plan. Can't find the specs you need. Here's what their site has about the hardware:

    HP ProLiant DL360 G4s, featuring dual 3.0 GHz Xeon Processors and RAID-1 SCSI drives.
    1 gig ram, 18 gig hard drive storage, 500 gig bandwidth (we had purchased an addition 500 gig on top of that).
    Red Hat Enterprise Linux 3 with PHP 4.3.2

    Not the numbers you're looking for, I know.

  9. davidchait
    Member
    Posted 8 years ago #

    Ummm, actually that's some of the numbers. HOLY CRAP. That's a lot of server.

    Though, they don't say what cpu min/max you actually get (i.e., how they load up the server) -- and whether they have overcommitted resources (which happens a lot with VPSes...).

    1GB of ram should be decent -- I think people here have been trying to squeeze into 256MB or 384MB accounts.

    Then again, given the price, you could easily have a dedicated box.

    My suggestions remain true even if you move to another 'blog program':
    - you have GOT to shrink your images. my guess is you could shrink 50% easily, maybe up to 60-65% average over all of them.
    - you probably want to look at lighttpd and other fast content servers. serving up images will be greatly enhanced (which if you want to keep apache in the mix will keep it from being crushed by image requests...).
    - you will still need to look at overall configuration and balancing, if you have heavy spikes of traffic and comments. a 'static based' system will STILL have to regenerate content when things change! it is just that it serves the content as vanilla html rather than spawning php and having php do a little processing to hand you back a cached page.

    Best of luck!

    -d

  10. BlogHawk
    Member
    Posted 8 years ago #

    I hope MT will be the solution to your problems; although it looks like your performance issues are hardware related.

    I thought this bit of info would put things into perspective. These guys run MT on high-traffic sites and it sounds like they have server load issues as well.

    http://www.nickdenton.org/002191.html

  11. familopia
    Member
    Posted 8 years ago #

    found this link on a site that was previously mentioned in comments. Dunno if it it could help how to improve performance on heavily commented blogs

  12. davidchait
    Member
    Posted 8 years ago #

    I don't think that (really short) article is of any use compared to the discussion here. WP-Cache has been extensively discussed, any major site with comment traffic NEEDS comments content to be 'live', updating more frequently than the average cache refresh (of hours...)

    Frankly, the other topics of content optimization (images which should be shaved to 50% or less of current sizes!), general memory use, apache optimizations, Mysql's query cache, mysql optimizations, things like APC, memcached, other php opcode caches, etc., are what's really key to the discussion of tuning performance of really high use sites. And, again, alternate webservers like lighttpd/thttpd (on the free side...) which can be much faster than apache on static content serving, where we've been discussing a site with huge bandwidth of static images...

    and, just imho, not very 'supportive' to say "I'll post over on my blog a suggestion, everyone go there to see it." it was a one-line change that could have been discussed in the thread.. (and again all it does is disable comment posting from refreshing the cache, which as I said would be detrimental to the type of 'live' site being run...).

    -d

  13. WillHines
    Member
    Posted 8 years ago #

    Thanks to everyone for the suggestions.

    I've tried to talk to the blog authors about reducing image sizes, David, so I hope I can get that to happen. They're not too savvy, but hopefully I can make it happen.

    I think the main lesson I've learned is that you can only go where your server admin (be it yourself or an ISP) wants to go.

    My ISP (or the people my boss talked to), for reasons I do not know, thinks that WP is not worth the trouble and that MT is easier. The only real diffrence will be that MT was THEIR idea and I assume they will put the legwork into making it work.

    Most frustrating: I laid out my plan for the site with my ISP before we launched at the start of March, including WordPress. The guy I talked to then approved of the choices.

    But once the traffic slammed us -- it got bumped to a higher manager, who blamed the one component that the ISP did not specifically install, WordPress. Classic "not my problem" problem solving. WordPress? I didn't install that -- so it must be the problem.

    To be fair, they took SOME steps: increased clients in apache, and shortened the session time. One guy suggested WP-Cache, which I installed. But how about isolating some SQL queries? Increasing RAM? Moving to a dedicated box? Checking that we'd maximized the use of the caching plugin? Nope. Suddenly, flat HTML was the only solution.

    Know your ISP. Get them on board with your plan. Or be your own sys admin.

  14. manstraw
    Member
    Posted 8 years ago #

    A few years ago I began managing my own servers for reasons just like this. I was quite frustrated with the problems I had when relying on someone else for support, even when they had the best of intentions. I finally had some relief when I took on the server management for the sites I design.

    and btw, wordpress doesn't cause a blip on my servers. (no, not as busy as yours) But I'll tell you what does. Mail. With all the filtering and processing you now need to email, my server load picks up because of it. I'd ask your IT dudes if email is being processed on this server. And if true, I ask they stop doing that.

  15. bloodylamer
    Member
    Posted 8 years ago #

    I just went through the same issues just last week.

    Dedicated server is the only solution for you.

    Also, if you get around 400+ comments a day & you want to display comment activity, make sure you grab this:
    http://freepressblog.org/wordpress-plugins/recent-comments-plugin/

    I've literally tried out every other plugin & they all crashed the web server, but for some odd reason, this plugin handles high loads wonderful (high loads around 180k daily pageviews w/ around 500-700 comments/day)

    godspeed!

  16. Malach
    Member
    Posted 8 years ago #

    While I realise it's not particularly relevant in this case, I thought I might throw this out there in case it's useful for someone else.

    Previously, I've had server load issues with a different PHP app (Beehive forums) which was hammering the server into the ground. The same server also runs a few WordPress sites. At one point, the last thing I got out of the server was a 'cat /proc/loadavg' which returned an answer of '431'.

    After installing Turck-mmcache, the server easily handled the load, and the wordpress sites seemed significantly more responsive. Load now sits under 1 most of the time. The box is a 1.7GHz celeron with 512 meg of ram, and IDE disk.

  17. davidchait
    Member
    Posted 8 years ago #

    Glad to see more specific instances of particular resources helping manage load. Keep it up everyone! ;)

  18. WillHines
    Member
    Posted 8 years ago #

    We might have saved WordPress for usmagazine.com. We've moved to a beefy dedicated physical server. 2 gig of RAM and only the one site on the box. We don't run any email on this guy (we didn't run any on the last one, but we weren't the only site on the box).

    The IT rep is still in favor of MT, but I've argued that the simpler interface is a reason to stay with WP. Plus I kinda begged, because it's so much easier to tweak and develop in PHP and with WordPress' plugin system. We're staying WP for now.

    He says he's enabled query caching -- a built in feature of MySQL 4.x? He made these changes to the my.cnf file:

    old_passwords=1
    set-variable = max_connections=250
    query-cache-type = 1
    query-cache-size = 256M

    Plus we still have WP-Cache running.

    I'm staying on the blog authors about keeping posted images down to size, and I'm redoing the front page to get the Flash files off of it.

    And we have that 2 gig of RAM.

    I guess the next step would be some kinda low-level PHP caching component.

    We discussed lighttpd -- and we're trying to avoid setting up a custom-installed box. The out-of-the-box setups here have Plesk control panels managing everything and he's hesitant to give that up for lighttpd and the work of installing/maintaining a custom config.

    Earlier, I cited 36,000 to 72,000 sessions a day. I found out that on the day we crashed, we recorded 230,000 sessions. That spike is what killed us. Pray for me if Jessica Simpson kisses someone in public and we get a picture.

    Thanks again for all the great advice. I've said it a bunch, but obviously having such a caring community is a priceless asset. I hope to pay it back -- maybe with a slick, powerful site running WP.

  19. manstraw
    Member
    Posted 8 years ago #

    Best of luck to you Will. I hope you report back here to let us now how things work out for you.

    It sounds like you've got some more breathing room now. It's still important to make it run as efficiently as possible, so you don't outgrow the new box too soon. I've found I often 'forget' the problems I've had when the spike is gone and things are cruising fine again. If I don't continue to make efforts to watch and improve efficiency, it comes back and bites me in the rump. I hope you don't fall into that trap!

    Oh, and this says a lot right here ->
    <!-- Dynamic Page Served (once) in 0.366 seconds -->
    <!-- Cached page served by WP-Cache -->

    btw, anything happening with Tom Jones lately? :)

  20. akc
    Member
    Posted 7 years ago #

    Just want to add as of August 2006 the said site's still running WP (2.0.1).

  21. WillHines
    Member
    Posted 7 years ago #

    I forgot I was only at 2.0.1 - I have to upgrade that.

    But that is correct, akc. We upgraded servers and that solved a lot of our problems. We went to a dedicated server (actual physically dedicated server, not a virtually dedicated one) with 2 gig of RAM. Even that was getting slammed so we went to 3 gig of RAM, and now we're working on putting a load-balanced solution into place (2 web servers with MySQL on its own box).

    In short: WP-Cache, getting a ton of RAM, and letting MySQL have huge chunks of RAM were the main things that saved us. Also, the authors like the clean interface so I got some others to help me lobby to keep WP in place.

    The site is probably going to be featured on Good Morning America tomorrow (8/3/2006), so we're bracing for a spike. Cross your fingers for me.

  22. Robert Accettura
    Member
    Posted 7 years ago #

    Some have found Apache 2 and PHP to be slower than Apache 1.3.x... you could consider a switch unless you need something in Apache 2.

    Also take a look at squid for caching. In some cases that can be much quicker than just caching from within wordpress, since you still need to create an apache/php request. Not sure how much millage you'd get, but might be worth looking into.

Topic Closed

This topic has been closed to new replies.

About this Topic