Behold WordPress, Destroyer of CPUs

Hi Jeff,

Have you looked at turning on dynamic caching in IIS 7.0?
Taking the load of the static content, scripts, styles, and images off of the FastCGI interface?
And setting the expires header to one week?

I was in a similar situation as you were with IIS 6.0 and FastCGI and all reduced the load of the server to next to nothing.

I’m in agreement, platform aside, given enough stress WordPress falls on its face. I have seen a site driven by WP on a LAMP install fall on its face without caching enabled. The load average on the machine was HUGE compared to while caching was on so it is not just a Windows/IIS thing.

While I agree that having caching out of the box (as a non-default option at the very least) would be a -good- thing, I still have to ask “What have you done to clean up your wordpress theme?”. My not-fully-optimized theme has 12 queries for a single-post page and 6 for the frontpage. Could I drop it lower? No idea, but when I’m done I’ll let you know.

Kevin

Hi Jeff,

I have to ask, what did you do about permission settings for wp-cache? By this I mean it’s almost asking for a chmod 777 (for the *nix world) on the wp-content folder, which I find extremely scary…

I read it as Fake Plasticrock. (say it like plasti-crock)

And yeah, if the website hits the database 20 times a request, that’s bad regardless of the OS. You’re still HITTING THE DATABASE 20 TIMES!

It’s seriously time to refactor Wordpress. I use it a lot, it’s lovely to use and deploy for all kinds of projects, but under the hood it is a POS.

Classic PHP amateur hour. And I love PHP by the way, and I love to cite Wordpress as one of PHP’s success stories, but the code is awful.

The problem is, besides the huge task of refactoring itself, it’s impossible to change WP into something well structured without breaking all plugins and templates, and it’s this ecosystem of add-ons that is major part of WP’s success in the first place.

I’m afraid that no matter how successful today, WordPress is a dead end.

**
You said: It’s frustrating, because caching is a completely solved problem in other programming communities. For example, the .NET framework has had page output caching and page fragment output caching baked into ASP.NET for years.
**

You’re confusing applications and frameworks. The above statement is the equivalent of asking MS Word to handle talking to your disks instead of the operating system.

PHP is the language here, and yes, it has caching solutions aplenty.

Quit dicking around and install BlogEngine.NET or Graffiti.

I will admit that I am a fan of Wordpress and Linux, but I do also use Windows for some services at work. I’ll try to not be biased.

I concede that you having a problem with WP not caching at all would be a problem, but it seems that you are complaining that you have to install a plugin?

Not being a default feature being is not so horrible (i.e. plugin installs are easy), but what is “absolutely irresponsible” is the idea that you used google (or perhaps msn.com?) as a reputable source. Saying Look how many hits I get when typing this in, is a sad new step for the thoroughness I once loved about you blog.

I think it should also be noted that MT is only FOSS at its most basic level. Jeff, if you say wanted to start an online community (add supported) with MT (stack overflow?), and have more than 20 users, it seems that you could be running into a initial fee of over $1000, and around $300 for upgrades.
http://www.movabletype.com/download/purchase.html

Just last week you wrote an entire article to how dual-core+ machines are a Developers right, so having a Quad-core for a server goes without saying, but why didn’t you put a 64bit OS on that processor. (Or was that just a failure to mention?)

You also say that it is a virtual machine, dedicated solely to running this. If it is a virtual machine it isn’t solely doing anything. You should consider how much CPU bandwidth is being dedicated to running you machine virtually (and other services).

In other words the CPU graph is also monitoring itself, so before you make the claim that it is WP (or any other service) try and isolate the process statistics. A before and after at an arbitrary time isn’t indicative of what process is used and how much, but that the system is under a load at point A, and not the same load at point B, regardless of the plugin/cache state.

Textpattern (http://www.textpattern.com) anyone? highly configurable, free, and has a good plug-in community too :slight_smile:

You’d be surprised, I think, to find out that Windows Server 2008 is an excellent PHP platform. This is a new development.

Not really new – Windows has been an excellent PHP platform for quite a long time. Previously it roared with the ISAPI runtime, and now it is roaring with FastCGI. Zend and Microsoft have been working on various sales pitches for some time.

And really, all of the Apache/Linux vs Windows comments completely miss the point – the difference between the two OS’ is almost invisibly small relative to the gross inefficiency of Wordpress in a default install.

I like all the arm-chair experts suggesting the slowness of WordPress would be remedied by switching operating systems…all based upon one anecdote and a picture of Task Manager.

"brainlessly stupid"
Flamy flamy…

Ba-a-a-a-d Wordpress. I hope your post pushes someone that has anything to say in WP.

Are you planning on deploying some ASP or ASP.NET app on the server? If not, at best you’re wasting your money, at worst both wasting money and harming performance. I recommend a BSD-Apache-MySQL-PHP setup, or Debian if you prefer Linux.

I didn’t see this mentioned - but PHP itself needs to be cached - you can get 10x performance with a “bytecode” cache.

Every dynamic language is CPU intensive.

@JohnW

With Jeff getting 37,000 unique hits a day, I think you’re going to need to do more than a Digg article to do a stress test, I believe 37,000 a day is a nice test just in itself.

But what do I know, I’ve never been a creator of a site with more than 10-20 unique visitors a day anyways, so whatever. :slight_smile:

After upgrading www.kellytadams.com to MovableType 4.1, I’ve been very impressed. The AJAX editing, the support of Markdown, and the rendered output makes it run fast with minimal CPU load. Although I haven’t been able to get dynamic rendering to work to compare (problems with host and PHP safe_mode); for someone who adds a new entry maybe twice a month, it works fabulously. The template inheritance and widgets made customization a snap. Judicious use of in-line callbacks (like a call to the Picasa API) can make the pages seem dynamic, but spread the load to the clients. PHP baaad, mmmkay?

@Jeff - “For example, the .NET framework has had page output caching and page fragment output caching baked into ASP.NET for years.”

But you have to turn the caching on; it’s not on by default.

I’m not sure I see the difference, really… If the wp-cache was distributed by WordPress, people would still need to turn it on (and wouldn’t) … until they saw a problem, that is.

Our Drupal site has a minimum of 200 database requests on each page and some have more than 500. As I see it, that’s the price of using a general purpose system. I could have developed the site from scratch and it would have been much more efficient but it would have taken four times as long. However, Drupal’s built in caching does a great job (unless you’re logged in). And don’t forget that MySQL’s cache should be effective on a blog that doesn’t change much.

@Jesse: True, Caching isn’t turned on by default in ASP.NET, but without caching, you aren’t getting CPU results like you would in WordPress without caching.