Apache benchmarks using module for hosting

With module for hosting you will achieve better performance:
Number of hosts hosted Requests per second w/o mod_hosting Requests per second w/ mod_hosting Time to complete w/o mod_hosting Time to complete w/ mod_hosting Increased performance with mod_hosting
2000 1032 2392 9.6 seconds 4.1 seconds 134%
4000 696 2436 14.3 seconds 4.1 seconds 248%
8000 433 2414 23.7 seconds 4.1 seconds 478%

The test is performed with a plain HTML request (no php or mysql) with 100 simultaneous requests to that site and 10 000 requests as total. The final result and conclusion is: while without module for hosting apache2 web server is slowing down its performance with the number of virtual hosts growing on that server, the performance with module for hosting remains the same, no matter of how many virtual hosts are hosted on the server.

Restart performance. Without module for hosting the apache2 restart takes the following time:
with 2000 hosts: 10.7 seconds
with 4000 hosts: 25.6 seconds
with 7000 hosts: 40.3 seconds

With module for hosting the restart time with 16 000 virtual hosts is 2.4 seconds.

If you restart your apache 48 times a day in order to get insert new virtual hosts in the apache config, you will generate about 8-9 minutes downtimes (with 2000 hosts, which is completely ordinary number for small to medium size hosting server) per day. With module for hosting you will reduce this time to 0 seconds, since there is no need to restart or reload the apache2 web server in order to add new virtual hosts.

If you run your storage via NFS or similar network file system the times without module for hosting are many times higher (depending on the storage load) and could reach 10 minutes for apache2 restart if you have about 10 000 virtual hosts. With module for hosting the times again depends, but while it takes 10 minutes for ordinary apache2 to restart without mod_hosting, with mod_hosting it takes less than 5 seconds.

Here are the benchmark details:

1. Server with 2000 virtual hosts (about 500 hosting customers). Results are:

without mod_hosting:
Server Software:        Apache/2.2.3
Server Hostname:        domain.com
Server Port:            80

Document Path:          /
Document Length:        4 bytes

Concurrency Level:      100
Time taken for tests:   9.682410 seconds
Complete requests:      10000
Failed requests:        18
   (Connect: 0, Length: 18, Exceptions: 0)
Write errors:           0
Total transferred:      4402062 bytes
HTML transferred:       39928 bytes
Requests per second:    1032.80 [#/sec] (mean)
Time per request:       96.824 [ms] (mean)
Time per request:       0.968 [ms] (mean, across all concurrent requests)
Transfer rate:          443.90 [Kbytes/sec] received

with mod_hosting:

Server Software: Apache/2.2.3
Server Hostname: domain.com
Server Port: 80

Document Path: /
Document Length: 4 bytes

Concurrency Level: 100
Time taken for tests: 4.179977 seconds
Complete requests: 10000
Failed requests: 0
Write errors: 0
Total transferred: 4422348 bytes
HTML transferred: 40112 bytes
Requests per second: 2392.36 [#/sec] (mean)
Time per request: 41.800 [ms] (mean)
Time per request: 0.418 [ms] (mean, across all concurrent requests)
Transfer rate: 1033.02 [Kbytes/sec] received

2. Server with 4000 virtual hosts (about 1200 hosting customers). Results are:

without mod_hosting: 
Server Software:        Apache/2.2.3
Server Hostname:        domain.com
Server Port:            80

Document Path:          /
Document Length:        4 bytes

Concurrency Level:      100
Time taken for tests:   14.356944 seconds
Complete requests:      10000
Failed requests:        15
   (Connect: 0, Length: 15, Exceptions: 0)
Write errors:           0
Total transferred:      4403385 bytes
HTML transferred:       39940 bytes
Requests per second:    696.53 [#/sec] (mean)
Time per request:       143.569 [ms] (mean)
Time per request:       1.436 [ms] (mean, across all concurrent requests)
Transfer rate:          299.51 [Kbytes/sec] received

with mod_hosting:
Server Software: Apache/2.2.3
Server Hostname: domain.com
Server Port: 80

Document Path: /
Document Length: 4 bytes

Concurrency Level: 100
Time taken for tests: 4.103675 seconds
Complete requests: 10000
Failed requests: 0
Write errors: 0
Total transferred: 4410441 bytes
HTML transferred: 40004 bytes
Requests per second: 2436.84 [#/sec] (mean)
Time per request: 41.037 [ms] (mean)
Time per request: 0.410 [ms] (mean, across all concurrent requests)
Transfer rate: 1049.55 [Kbytes/sec] received

 

3. Server with 8000 virtual hosts (about 2400 hosting customers). Results are:

without mod_hosting: 
Server Software: Apache/2.2.3
Server Hostname: domain.com
Server Port: 80

Document Path: /
Document Length: 574 bytes

Concurrency Level: 100
Time taken for tests: 23.73215 seconds
Complete requests: 10000
Failed requests: 17
(Connect: 0, Length: 17, Exceptions: 0)
Write errors: 0
Non-2xx responses: 9983
Total transferred: 9274207 bytes
HTML transferred: 5730242 bytes
Requests per second: 433.40 [#/sec] (mean)
Time per request: 230.732 [ms] (mean)
Time per request: 2.307 [ms] (mean, across all concurrent requests)
Transfer rate: 392.49 [Kbytes/sec] received

with mod_hosting:
Server Software: Apache/2.2.3
Server Hostname: domain.com
Server Port: 80

Document Path: /
Document Length: 4 bytes

Concurrency Level: 100
Time taken for tests: 4.141114 seconds
Complete requests: 10000
Failed requests: 0
Write errors: 0
Total transferred: 4414410 bytes
HTML transferred: 40040 bytes
Requests per second: 2414.81 [#/sec] (mean)
Time per request: 41.411 [ms] (mean)
Time per request: 0.414 [ms] (mean, across all concurrent requests)
Transfer rate: 1040.78 [Kbytes/sec] received