Sean’s Obsessions

Sean Walberg’s blog

Speeding Up Movable Type Without Mod_perl

Fedora uses Apache 2 and mod_perl2, which is completely incompatible with Movable Type. Even under Apache::compat, there are a lot of problems which I got tired of debugging.

Since I’m using it for SmokePing, I already had CGI::Speedy installed, and figured I’d try it with Movable Type. The only thing to change is the shebang line in mt.cgi (and the others, I suppose), from

#!/usr/bin/perl -w

to

#!/usr/bin/speedy -w

Instant performance increase. I didn’t take any measurements, but it’s noticeable.

BTW, SpeedyCGI can be installed from CPAN:

# perl -MCPAN -e ‘install CGI::SpeedyCGI’

I’ve also done this to mt-comments.cgi and mt-tb.cgi and all tests appear to work well. I’ve also changed the shebang line to

#!/usr/bin/speedy -w – -M5 -g

to limit speedy to using 5 worker tasks, and to have all the CGIs share one set of worker tasks. My machine doesn’t have a lot of memory, and traffic is low, so YMMV.

Comments

I’m trying something new here. Talk to me on Twitter with the button above, please.