LAMP/NAMP/OAMP with WordPress just needs CPU

According to the Google robot, my actual configuration serves WordPress pages in about 1-2 seconds. I was looking on improving this a bit.
So I tried various OSes on various machines:

  • A VIA Nehemiah @1GHz
  • An Intel Atom N450 @1.66GHz
  • An Intel Core2Duo T7300 @2.00GHz
  • NetBSD 5.1
  • OpenBSD 4.9
  • Debian GNU/Linux 6

I tried using the same software with no particular optimization (other than the system’s defaults). All of them where using Apache2 (did an extra test with Apache1 on OpenBSD), PHP5 and MySQL. I dumped my production SQL and WWW data. Then browsed a bit with Safari and Firefox to get a “human feeling” on the user experience. Then ran a ab -n 20 -c 5 "" on those.

The conclusion is quite simple: You don’t really get speed improvement towards OSes. But the faster your CPU is, the faster Apache serves WordPress pages. The conclusion was a bit different on static HTML pages. Especially OpenBSD’s native Apache which was faster than lightning.

Natural WordPress benchmarking

I am planning on benchmarking various OS and HTTP daemons to host my WordPress site. A well-known (free) tool to benchmark Web servers is ApacheBench. But it can only use a single URL for each benchmark session. A trick to achieve natural benchmarking on WordPress, or “simulate real users browsing as much as possible”, is to use a random generated content ; using the ?orderby=rand parameter. This will allow the Web server to be used as if several users were doing real things ; that is, reading various content:

# ab -n 20 -c 5 ""
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Concurrency Level:      5
Time taken for tests:   31.190 seconds
Complete requests:      20
Requests per second:    0.64 [#/sec] (mean)
Time per request:       7797.489 [ms] (mean)
Time per request:       1559.498 [ms] (mean, across all concurrent requests)

Joomla on Mac OS X

I have to take care of Frederic Mejias’ Martial Arts School website. It historically runs on Joomla. I personally probably wouldn’t have use that piece of … software but the choice isn’t mine :p
So starting using/modifying that beast, I installed an instance of my MacBook Pro. What you’ll need is a Web server capable of running PHP and a SQL database. Once you finished saying that, the quickest thought is Macintosh, Apache, Mysql and PHP.
Continue reading “Joomla on Mac OS X”

WordPress, HungryFEED and (french) accented words.

Last time I moved my (WordPress) Web site, I started from scratch ; mostly because I did a lot of testings on the previous instance. Anyway… On the “News” page, I use the HungryFEED plugin to aggregate on a single page the few RSS feeds I daily read. Some are written in English and some are French. Since I moved the WP instance, the accented words were messy.
Continue reading “WordPress, HungryFEED and (french) accented words.”

Chroot Apache 2.2 on NetBSD

The Apache 2.2.17 package shipped in pkgsrc 2010Q4 comes with a nice ChrootDir directive that allows simple chroot configuration.

First, you will need Apache in at least version 2.2.10. Then:

# vi /usr/pkg/etc/httpd/httpd.conf
#DocumentRoot "/usr/pkg/share/httpd/htdocs"
ChrootDir "/usr/pkg/share/httpd"
DocumentRoot "/htdocs"
# ln -s /usr/pkg/share/httpd/htdocs /htdocs

Continue reading “Chroot Apache 2.2 on NetBSD”