> ## Content Index
> Fetch the complete content index at: https://blog.mebooks.co.nz/llms.txt
> Use this file to discover other available public pages before exploring further.

# Improving WAMP Performance
- URL: https://blog.mebooks.co.nz/improving-wamp-performance/
- Published: 2013-11-25T03:44:00.000Z
- Updated: 2017-10-01T03:46:21.000Z
- Author: Jason Darwin
- Tags: #Import 2026-09-23 10:11

One of the painful points of doing PHP development is the time that one has to wait for the PHP scripts to render the page, especially when using CMSes and frameworks which involve a lot of server-side PHP processing.

Of course, PHP can be cached as bytecode, though in development we often need to flush the cache in order to see the results of our changes.

Looking into other peoples' experiences (such as [this](http://task3.cc/1441/apache-php-mysql-slow-under-windows-8-how-to-fix/?ref=blog.mebooks.co.nz) and [these](https://drupal.org/node/348202?ref=blog.mebooks.co.nz)), there seems be a number of tuning solutions to make a local WAMP installation serve faster.

I decided to put a few of these suggestions to the test on my development machine (a Windows 7 64 bit Core i5-3470 CPU @ 3.20GHz, with 8Gb RAM), specifically:

- Adding `EnableMMAP` on and `EnableSendfile on` to the apache conf
- Adding `realpath_cache_size = 2M` to php.ini
- Adding the following entries to the hosts file:  
```
  127.0.0.1     localhost
  127.0.0.1     127.0.0.1  
```

The results really speak for themselves in the following graph, where I used [Apache's ab tool](http://httpd.apache.org/docs/2.2/programs/ab.html?ref=blog.mebooks.co.nz) with a [Silverstripe](http://www.silverstripe.org/?ref=blog.mebooks.co.nz) installation to perform the tests. The ab string used was:

```
$ ./ab -n 10 http://localhost.nppa/?flush=1

```

where:

- `-n 10` means ten successive requests
- the `?flush=1` parameter forces Silverstripe to serve a non-cached version of the page

### Impact on performance  
 (shorter bars = faster Time per Request)

![Performance results](https://res.cloudinary.com/mebooks/image/upload/v1407054010/wamp_speedup_i49rnh.jpg)

Shorter bars equals a faster performance, as measured by Apache ab's Time per Request, and the only solution that made a significant difference was the addition of the following entries into the hosts file (though it seems increasing `realpath_cache_size` in the php.ini also helps marginally):

```
127.0.0.1     localhost
127.0.0.1     127.0.0.1

```