Slow server? Don’t overthink it. (And don’t forget what’s running on it.)

I’ve just spent the better part of a week troubleshooting server performance problems for one of my clients. They’re running a number of sites on a dedicated server, with plenty of RAM and CPU power. But lately the sites have been really slow, and the server has frequently run out of memory and started the dreaded process of thrashing.

Fearing inefficient code in cms34 may be to blame, I spent a few days trying to optimize every last bit of code that I could, which did make a slight improvement, but didn’t solve the problem.

Then I spent a few more days poring over the Apache configuration, trying to optimize the prefork settings and turning off unnecessary modules. Still, to no avail, although getting those prefork settings optimized, and thus getting Apache under control, did allow me to notice that MySQL was consuming CPU like mad, which I had previously overlooked.

Hmmm… that got me thinking. I fired up phpMyAdmin and took a look at the running processes. Much to my surprise, almost every MySQL process was devoted to an abandoned phpBB forum. Within moments I realized the forum must be the source of the trouble, which was confirmed when I found that it had over 500,000 registered users and several million posts, almost all of which were spam.

As quickly as I discovered the problem, I was back in the Apache configuration, shutting down the forum. Then a quick restart of MySQL (and Apache, for good measure), and the sites were faster than I’ve seen them in months.

The moral of the story: if you have a web server that suddenly seems to be grinding to a halt, don’t spend days optimizing your code before first looking for an abandoned forum that’s been overrun by spammers.

On innovation, litigation and exasperation

I was just reading Craig Grannell’s new blog post, There’s no justification for piracy, but there are obvious reasons why it happens, and I found myself once again agreeing exactly with what he says. The post was prompted both by the amazing Matt Gemmell’s The Piracy Threshold, as well as by yesterday’s Oatmeal comic, I tried to watch Game of Thrones and this is what happened, which basically explains piracy not as justifiable, but as the inevitable result when a person exhausts every reasonable avenue for obtaining content legally.

As Grannell points out, there are arguments to the contrary, but I think what it all really comes down to is simple: People want your content. They will make a reasonable effort to obtain it legally, at a reasonable price. But when you build a wall around your content, by charging exorbitant prices, deliberately misunderstanding the concept of fair use by fighting format shifting, or simply making it unavailable altogether, a lot of people are going to find a way around that wall.

I don’t condone torrenting, nor do I participate in it. In that regard, I don’t know if I’m in the minority on the Internet or not. But I can understand why it happens. More importantly, I believe it would not be that difficult for content owners to eliminate, or at least diminsh to irrelevancy. They just need to try.

But trying means change. It means meeting content consumers halfway. First, it means recognizing them as potential customers, not as potential thieves.

Change can be hard to accept. But I just cannot comprehend how “big media” doesn’t recognize the potential here. Instead of fighting desperately to hang onto dwindling DVD and CD sales, there’s a huge potential market for online distribution. But it requires thinking differently. Prices may go down, but so will distribution costs, by a lot. Like, almost zero. Margins may be slimmer, but that can be more than made up for with volume.

Would making everything readily available online, legally, at a modest price, eliminate piracy? Probably not. But that’s not the right way to think about it. Every advancement in technology since the printing press has presented the risk of IP theft (though, granted, that’s a modern concept), but it has also presented far greater opportunity for those who aren’t afraid of it.

So, you can resent and sue your would-be customers. Or, you can respect and engage them. I think we’re all fed up with how things are working right now. Let’s be reasonable.

Winter

It’s been easy to forget it’s winter this year. Last winter we had two huge storms bury the area under a couple of feet of snow before Christmas, and we didn’t see grass again until sometime in March. As far as I know, this winter we haven’t even had a single snow emergency, and the few times we have gotten an inch or two of snow, it’s melted within a week.

What’s a snow emergency, you say? I’ll let Wikipedia explain. Suffice to say Minneapolis is the only city specifically mentioned in the article.