APC MediaWiki Performance Optimization

Using APC (Alternative PHP Cache) to speed up a slow MediaWiki install is a good idea. A quick before and after study of the performance gain from APC using Apache ab resulted in pages being served 4 times faster (from 328ms mean load time to 82ms, number of pages loaded in 20 seconds went from 123 to 485).

APC MediaWiki Optimization Details

Before APC (Alternative PHP Cache) this was an Apache ab benchmark with the MyErasmus.org Erasmus Program Wiki on a local test server:

This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/

Benchmarking myerasmus.org (be patient)
Finished 123 requests

Server Software: Apache
Server Hostname: myerasmus.org
Server Port: 80

Document Path: /wiki/Main_Page/
Document Length: 9949 bytes

Concurrency Level: 2
Time taken for tests: 20.165579 seconds
Complete requests: 123
Failed requests: 0
Write errors: 0
Keep-Alive requests: 0
Total transferred: 1260448 bytes
HTML transferred: 1226348 bytes
Requests per second: 6.10 [#/sec] (mean)
Time per request: 327.896 [ms] (mean)
Time per request: 163.948 [ms] (mean, across all concurrent requests)
Transfer rate: 61.00 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.9 0 10
Processing: 151 323 170.7 308 1515
Waiting: 140 303 164.7 289 1506
Total: 151 323 170.7 308 1515

Percentage of the requests served within a certain time (ms)
50% 308
66% 329
75% 348
80% 363
90% 396
95% 466
98% 696
99% 1369
100% 1515 (longest request)

This is the performance on the Erasmus Program Wiki after APC was installed and enabled:

This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/

Benchmarking myerasmus.org (be patient)
Finished 485 requests

Server Software: Apache
Server Hostname: myerasmus.org
Server Port: 80

Document Path: /wiki/Main_Page/
Document Length: 9949 bytes

Concurrency Level: 2
Time taken for tests: 20.1082 seconds
Complete requests: 485
Failed requests: 0
Write errors: 0
Keep-Alive requests: 0
Total transferred: 4958640 bytes
HTML transferred: 4825265 bytes
Requests per second: 24.25 [#/sec] (mean)
Time per request: 82.479 [ms] (mean)
Time per request: 41.239 [ms] (mean, across all concurrent requests)
Transfer rate: 242.09 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 1.0 0 10
Processing: 38 81 197.5 41 3070
Waiting: 35 78 197.3 38 3057
Total: 38 81 197.5 42 3070

Percentage of the requests served within a certain time (ms)
50% 42
66% 77
75% 80
80% 80
90% 88
95% 99
98% 351
99% 1087
100% 3070 (longest request)

Needless to say, a 400% improvement in performance for serving a MediaWiki multi-language pooled resource site, simply by installing APC to cache PHP intermediate code, is a very welcome change. Not to mention the easing of CPU and IO resources on our Xen virtualized Ubuntu 6.06 server so that there are more cycles to spare for other processes (like Ruby and Ruby on Rails).

InstallingCats.com

From its beginning of instructing others how to dual boot their Mac with Tiger and Leopard, InstallingCats.com has grown into a troubleshooting and solutions website for various Mac issues and applications.
The most popular articles include

ic_screenshot

Project Management – Interdisciplinary Requirements

parisbytrain_screenshotThe ParisByTrain.com project was a success in terms of project management because it brought together three critical perspectives and requirements:

  • Customer:
    • ParisByTrain.com fills a need for clear concise France train travel information, demanded by travelers and tourists.
  • Business:
    • ParisByTrain.com must support sufficient traffic and visibility to make it viable in terms of costs and return.
  • Technology:
    • With limited man-hour resources, ParisByTrain.com requires publishing technology with minimal cost of setup & maintenance,  providing a sufficiently powerful platform to meet the needs of search engine visibility & traffic while presenting information in an accessible format to the customer.

If any one of these perspectives and requirements were left unmet, the project could have been a failure.

Luckily, all three viewpoints were kept in mind during the planning and implementation of Paris By Train, thus giving it a better than average chance of success.  And the three viewpoints don’t necessarily have to come from three different people or groups, as in the case of ParisByTrain.com being a one-man show.

Welcome

Cru Consultants develops and publishes in-house web applications for end-user consumers (general public) as well as business clients.

We’ll be posting updates, teasers, previews, announcements and launches from this site.

Stay tuned and don’t hesitate to leave us a message or a comment.