Behold WordPress, Destroyer of CPUs

At the risk of starting a language war, I think you’ll find the problems start deeper, in the roots of PHP itself.

PHP on windows has long been a notorious poor performer and when I tried it with a phpnuke variant for simple blogging, it was pretty much unusuable it was so slow.

Combine that with the poor design that PHP’s flexibility encourages (and the PHP community seems to embrace as a whole) and you wonder if the main reason linux users aren’t screaming is because you aren’t supposed to complain about free software, under penalty of excommunication.

I like VB.Net based dotNetNuke for content management myself, but the blogging engine that comes with it has caused me nothing but problems thus far (outright cpu spirals into the ground site crashes that may be involved with my inability to configure it correctly, rather than a product flaw, but that still speaks to a fundamental product weakness in my mind) Shame really, otherwise I suspect it would be more popular than it is already.

I’m the student working on the gsoc wordpress project to integrate caching into wordpress out-of-the-box:
http://code.google.com/soc/2008/wordpress/appinfo.html?csaid=7E1A38664ABC103C

I’ve done some research into wordpress caching and why it isn’t in the core (yet). The penultimate reason is exactly the problem Jeff is having with the plugins - support for myriad of different Wordpress users. Sure, it may seem like everyone and their dog is running a LAMP stack on a virtualized host. In reality, a substantial portion of the users are shared-hosting users, installing from their control panel with one click. Those people can’t be expected to find and understand the “cottage industry” of caching plugins out there. 99% of these users don’t hit digg, but 1% of the wordpress userbase is a lot of people and a lot of horror stories.

On the flip side, Wordpress.com is running wordpress as well (surprise!). They host almost 3 million blogs. Yes, they have memcached clusters. The NYT runs wordpress as well.

Whatever out-of-the-box solution will need to cater to the shared-hosting, IIS users as well as flexible for the wordpress.com, blogs.nytimes.com, etc users (to implement their own solution, for example). This is difficult to do, requires a lot of time and planning and support from the community.

I’m thinking that a summer of code project would provide much of the impetus needed for such an endeavor. By August, I hope the out-of-box wordpress performance won’t be as dismal.

Read more about it at http://neodude.net/archives/2008/03/caching-in-wordpress

Your metric of 20 queries per page refresh is conservative and optimistic at best. I’ve seen Wordpress installs that do upwards of 60, and, in one particularly disheartening case, about 120.

I wonder what the CPU usage is for my oh-so-humble blog. I suspect it’s not too bad though, as (1) I have on the order of 10 hits a month, and (2) they’re not charging me anything, so how much could it be costing them? :wink:

The main problem isn’t WordPress. The main problem is that you’re using Windows.

Switch to Linux and fly!

@Seize
Why, does Linux make those 20 database calls faster?

It’s MAGIC!

I highly recommend you switch to Drupal! :wink:

Running PHP under Windows is plain old stupid, but i agree: Wordpress is quality-wise a monster. It is the perfect example where features (namely the plugin-system) are way more important than performance and correctness if you only look at market-acceptance.

Interesting stuff! I am curious as to why you have chosen to use IIS instead of the more commonly-used Linux + Apache setup for most blogs. Could you elaborate on that decision?

It’s worth noting that PHP has plenty of support for output buffering which can be fairly elegantly turned into a caching solution with a trivial amount of effort (less so on a massively complex dynamic site, but a blog’s homepage is as straightforward as they come in most respects). It’s just that…WordPress doesn’t do it.

My personal experience of WordPress is that while the UI is polished (indeed, WordPress’s admin interface is pretty exemplary for open source web-based software), a peek under the hood reveals a somewhat different picture. Perhaps that’s purely a matter of coding style (I detest mixing of code and output inline–as per “classic” PHP or ASP), perhaps not. I was put off before digging any deeper, to be honest.

Running PHP under Windows is plain old stupid,

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

http://developers.slashdot.org/article.pl?sid=08/03/04/1452232

I recall glancing over the google summer of code projects recently, wordpress said that a built in cache was something they want to work on.

Integrating caching into the core wordpress code is being worked on in this year’s summer of code

http://code.google.com/soc/2008/wordpress/appinfo.html?csaid=7E1A38664ABC103C

For my “blog” I went with a very simple solution, a 20 line shell script.
I had no interest in figuring out how to install and maintain wordpress et. al.
It performs very well :slight_smile:

http://www.pixelbeat.org/docs/web/about/

In case anyone is interested in trying to test his new setup…http://digg.com/programming/Let_s_Bring_Down_CodingHorror_Author_Jeff_AtWood_s_New_Blog

I was just discussing the WP Cache plugin with a coworker for its conceivable benefits of improving page load times for visitors, but now I’ll be installing it to protect my poor CPU, thanks Jeff!

Make your own.

Whats so intense about blogging software? Its a database with some simple forms and web pages…

This is probably my naivete from only ever looking at a few blogs and never running one though… even so, I would be surprised to find out that there is any requirement beyond some simple database tables to store the text and a simple web page which requests and displays the data… there are a number of quick and easy caching methods… especially given that whatever web development language will do all of the hard work for you…

I’ve written a simple forum using PHP and MySQL before… its a similar problem as far as I can see, although I only implemented caching for the most expensive bits as I didn’t have a big problem with it. But I am probably lacking good testing from large numbers of users…

I using my XSLT blog system to generate static html files, including a stylesheet to generate photo albums.

http://markraddatz.org/fooweb/

I recently got kicked from a shared hosting server for having a “mildly” popular wordpress blog. Not because of traffic, but because of cpu usage.

I wasn’t even aware that wordpress was using up so much resources. I didn’t get any warnings from my hosting provider or hints. Now that I switched to a virtual server, I stand before another problem. Memory usage is too high. I’ve seen a single serving of a wordpress page taking up to 30mb of ram using memory_get_usage. which means, 20 concurrent users might peak my allowed memory usage pretty fast and encouraging virtuozzo to kill my apache process. Using a caching plugin didn’t really help.

Teaches me to go for a dedicated server from the beginning.