5 ms·
Behold WordPress, Destroyer of CPUs
- borga 19y agoWordpress or Windows (that he is using)?
- ejs 19y agoI read this Jeff's blog as some is interesting, but I always laugh at how he is so pro-windows. When I read he was going to do some web stuff I was wondering if he would use a windows server. I admit I don't keep up on what MS offers in the server side but it seems linux + apache is still a better choice.
- pchristensen 19y agoUnless you're already extremely proficient on [your tools] but would take a lot of time and tweaking to learn the ins and outs of [other supposedly better tools].
- wanorris 19y ago> I read this Jeff's blog as some is interesting, but I always laugh at how he is so pro-windows. On the plus side, he's not pro-Windows in the sense of being an evangelist or anti-something else. He's been working for a consulting business up until now, and there's great money in .Net consultancy, just like there is with Java. It's just a very different world from the LAMP-style web community. > I admit I don't keep up on what MS offers in the server side but it seems linux + apache is still a better choice. People publish working websites all the time on Java+whatever and on .Net+Windows, and Microsoft is working to make Windows/IIS a workable platform for PHP. I would personally recommend a LAMP-style stack for someone trying to decide what web technology stack to learn, but for someone who already knows a different stack, it may not be worth the trouble unless you need immense scale.
- mtts 19y agoThe fact that he's running it on IIS through FastCGI seemed to me to be a bigger problem than the fact that he's running WP as well. Not because I don't think IIS is a capable web server, but because Wordpress seems to me to be primarily oriented towards Apache + mod_php. Maybe WP is doing something that's really stupid on IIS + FastCGI but on Apache + mod_php it seems to run fine to me. I just clicked through a poorly visited WP blog of mine while monitoring top and CPU never spiked above 9% use on a 3GHz celeron. (this very same blog until a year ago ran on a celeron 400MHz with no problem as well, btw). That said, he does have a point that WP's insistence on making everything dynamic is rather silly.
- henning 19y agoThat's relevant to his complaints about observed CPU usage but irrelevant to the observation that WordPress makes excessive database calls and doesn't cache intelligently.
- apgwoz 19y agoI'm glad someone finally spoke out against WordPress like this. This has bothered me for ages, but whenever I bring it up to people the argument is always, "cpus are cheap." But, I don't want to buy a new high end server just to run a blog. I want it to be speedy fast on shared hosting without fussing, by default.
- jrockway 19y agoIf you want a feature in an open source project, the logical idea is to send them a patch.
- phaedrus 19y agoI think most people who read HN would have thought of that; from Jeff Atwood's article, it sounds as though the primary problem is a political one, not a technical one. A plugin already exists that can be that "patch," but the project leaders are dismissive of the problem.
- mosburger 19y agoMakes me feel not-so-bad for using the tired, aging, not-as-popular Blogger platform for my blog. It's hard to have overwhelming CPU loads serving static pages.
- idea 19y agoAbout a year ago i looked at the WordPress code. My PHP knowledge is limited, but it was easy to see that the code was not very good. Perhaps it has improved, but i personally wouldn't use it, especially on a server that runs important services.
- mtts 19y agoI've looked at it on occasion as well, and while it's not exactly a work of art, it's not exactly terrible either, especially for an open source blogging product. If you really want terrible code, take a look at Pivot. That's awful. WP is just, well, spaghetti-ish, I guess, but not terribly so.
- apgwoz 19y agoEven worse is chyrp. For reasons unbeknownst to me, they designed it in such a way that it ends up making 55 queries to render http://chyrp.net/blog/ http://chyrp.net/blog/. This only increases when more content is added (so my assumption is that the authors don't know what a join is). Also, the last time I looked, it took your password, md5'd it (without a salt) and put it in a cookie for authentication to the admin. WordPress looks amazing compared to that.
- alexsuraci 19y agoDisclaimer: I'm the dumbass developer of Chyrp. I was pointed here by a follower. :P 55 queries? I see 18, and 20 when logged in. Something's weird there. Admittedly, it used to be quite high (116, nervous chuckle), but nowadays it hovers below WordPress' query count. I don't know where you're getting that whole admin authentication thing from. Nowhere in the code does it do anything remotely similar to what you said. The cookies simply hold the browsing user's ID and md5ed password (the md5 is the only information on the password that is stored), which is then authenticated. It's not a username and password for the admin area. It's just the information of the user who's logged in. Nothing new. There's no single "is_admin" check or anything of the sort. There's no "authentication to the admin". It's not an all-powerful section that checks for a single thing before giving you access to every function. The group that the browsing user is associated with must have the proper privileges to perform the various functionality that is checked throughout the administration section. As for using salts on the md5 encryptions, I don't see anywhere in WordPress's code does that either (I just downloaded the latest copy). I might add it in to 2.0, though. Should be a fairly easy change. If you want the software to improve (which doesn't exactly seem to be the case), I just think you should either file tickets or confront the developer (me, and a couple contributors in the IRC channel) instead of spouting off misinformation on other sites.
- raganwald 19y agoI confess to deeply mixed feelings about this post. I guess I don't like his tone. And there's a problem, I can't really criticize the post without descending into ad hominems of a sort. I guess I would rather read an essay about how much caching improves product X than an essay saying that the developer of product X is an idiot for writing a product that needs caching. Both essays have the same factual content, but I admit to bias towards the former, especially from one programmer to another.
- gwc 19y agoWell, remember that Coding Horror is more of a classical personal blog or online diary style work, rather than a medium for delivering essays. Jeff freely admits he tends to shoot from the hip, in contrast to guys like PG or Joel Spolsky (Jeff talked about this briefly in the first stackoverflow.com podcast). As a result from time to time you get posts that more emotionally driven by Jeff's issue du jour. For me I just tend to take Jeff's tone with a grain of salt rather than expecting each post to be dispassionate analysis. Jeff simply doesn't vet his material the same way as PG, but we end up with more of it from which occasionally really good observations and discussions result.
- pchristensen 19y agoAtwood gets a lot of crap from the HN crowd, so it's great to hear a reasoned, dispassionate argument about the pros and cons of Coding Horror. The "shoot from the hip" comment was that while Spolsky might go over one of his showcase pieces 30-40 times, Atwood would look at it maybe once or twice while he was writing it and the hit "Publish".
- jrockway 19y agoAnd as a result, Joel's writings are a lot more valuable. I have a personality like Atwood -- if I'm mad about something, I immediately feel the urge to write a scathing and negative blog entry. Every time I do this, though, I get a lot of negative feedback. So, I try to tone down my personality and stick to instructional entires now, and amazingly I get positive feedback every time. Nobody cares what I think... but if they learn something, then my blog is worth reading. "Show, don't tell." is what they teach in elementary school. It is a very valuable piece of advice. (In this case, I mean "show why foo is good", not "tell the reader that bar is bad". Criticism and snarkiness breads criticism and snarkiness.)
- henning 19y agoCaching needs to be built into WordPress? Hrm, I guess great minds think alike - http://news.ycombinator.com/item?id=168268 http://news.ycombinator.com/item?id=168268 ;) And to say that WordPress is not sloppily programmed is to say that you have never actually looked at the source code. I dare you, I double dare you. Wake up and smell the ashes.
- newt0311 19y agoBetter solution: Build caching into the DB. Then every program using the DB gets free data caching and there is more general code reuse. Interesting how RDBMS's like Postgres and Oracle already have it.
- cx01 19y agoI don't see how caching in the DB would improve performance much. The best you could do would probably be to cache the most expensive queries. The main advantage of having caching in your application is that you can cache your data in a more high-level way, i.e. taking into account the way the data is going to be used. So you can pre-process your data as much as possible and store the result of this. Compared to that a cache in the DB would be rather dumb. This isn't to say that a database cache is useless but just not a replacement for having caching directly in your app.
- ojbyrne 19y agoWhat RDBMS's don't have caching? If we're talking about mysql, there's a query cache, a data cache, more...
- pchristensen 19y agoI thought this was interesting because I have WP on a shared host. It sure is slow sometime but I didn't know if it was the host or WP. I guess the answer is probably ... both :) Makes me wonder if part of WP's success is that most people don't have it on their own server so they don't have to care as much about performance. Now I'm resolved to install WP-Cache!
- ionfish 19y agoI'd advise using WP Super Cache instead. It's based on WP-Cache, but allows you to generate static HTML files as well. I've found it vastly improves WP's performance on shared hosting. http://wordpress.org/extend/plugins/wp-super-cache/ http://wordpress.org/extend/plugins/wp-super-cache/
- revorad 19y agoIt would be interesting if he could provide similar usage graphs for Movable Type and do some real data-backed comparison instead of ranting.
- andrewdotnich 19y ago...because serving static HTML pages uses lots of database queries...