Skip to content

Instantly share code, notes, and snippets.

@nicodmf
Created November 24, 2012 03:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nicodmf/4138259 to your computer and use it in GitHub Desktop.
Save nicodmf/4138259 to your computer and use it in GitHub Desktop.
Launch ab on symfony with normal compser map file and tweaked composer mapfile
In prod env without xdebug on a one core xeon 2.27GHz on a openvz on a basic form with one collection.
The difference beetween the two map file is **252** lines from 2890 lines for the normal map
and 2638 lines for the tweaked map.
The tweak is just remove dev line from Acme bundle, Behat, doctrine data fixture, and a personnal test file.
First Serie
-----------
Warming up the cache for the prod environment with debug false
Restarting PHP5 FastCGI Process Manager: php5-fpm.
Restarting web server: apache2 ... waiting .
Launch 1
Time per request: 68.993 [ms] (mean)
Time per request: 68.993 [ms] (mean, across all concurrent requests)
Launch 2
Time per request: 68.726 [ms] (mean)
Time per request: 68.726 [ms] (mean, across all concurrent requests)
Launch 3
Time per request: 68.425 [ms] (mean)
Time per request: 68.425 [ms] (mean, across all concurrent requests)
Launch 4
Time per request: 70.448 [ms] (mean)
Time per request: 70.448 [ms] (mean, across all concurrent requests)
Launch 5
Time per request: 68.823 [ms] (mean)
Time per request: 68.823 [ms] (mean, across all concurrent requests)
simple
=====After remove line for Acme bundle and Behat, doctrine data fixture bundle lines=====
Warming up the cache for the prod environment with debug false
Restarting PHP5 FastCGI Process Manager: php5-fpm.
Restarting web server: apache2 ... waiting .
Launch 1
Time per request: 68.382 [ms] (mean)
Time per request: 68.382 [ms] (mean, across all concurrent requests)
Launch 2
Time per request: 67.523 [ms] (mean)
Time per request: 67.523 [ms] (mean, across all concurrent requests)
Launch 3
Time per request: 67.220 [ms] (mean)
Time per request: 67.220 [ms] (mean, across all concurrent requests)
Launch 4
Time per request: 67.240 [ms] (mean)
Time per request: 67.240 [ms] (mean, across all concurrent requests)
Launch 5
Time per request: 66.727 [ms] (mean)
Time per request: 66.727 [ms] (mean, across all concurrent requests)
Second Series
-------------
Generating autoload files
Warming up the cache for the prod environment with debug false
Restarting PHP5 FastCGI Process Manager: php5-fpm.
Restarting web server: apache2 ... waiting .
Launch 1
Time per request: 69.701 [ms] (mean)
Launch 2
Time per request: 68.303 [ms] (mean)
Launch 3
Time per request: 68.979 [ms] (mean)
Launch 4
Time per request: 68.379 [ms] (mean)
Launch 5
Time per request: 68.493 [ms] (mean)
=====After remove Acme bundle and Behat, doctrine data fixture bundle lines=====
cp autoload_classmap.php vendor/composer/autoload_classmap.php
Warming up the cache for the prod environment with debug false
Restarting PHP5 FastCGI Process Manager: php5-fpm.
Restarting web server: apache2 ... waiting .
Launch 1
Time per request: 67.816 [ms] (mean)
Launch 2
Time per request: 67.974 [ms] (mean)
Launch 3
Time per request: 67.766 [ms] (mean)
Launch 4
Time per request: 67.026 [ms] (mean)
Launch 5
Time per request: 67.294 [ms] (mean)
Testing code
------------
#!/bin/bash
function test(){
rm -rf app/cache/prod/*
app/console cache:warmup --no-debug --env=prod
service php5-fpm restart && service apache2 restart
for i in 1 2 3 4 5;do
echo Launch $i
ab -n500 http://test.alinea.im/invoices/sf/web/invoices/invoices/1/edit 2>/dev/null | grep "Time per request:" | grep "(mean)"
done
}
php composer.phar dump-autoload --optimize
test
cp autoload_classmap.php vendor/composer/autoload_classmap.php
echo 'After remove Acme bundle and Behat, doctrine data fixture bundle lines '
echo "cp autoload_classmap.php vendor/composer/autoload_classmap.php"
test
Hello world
-----------
The same test on a hello world is less significant but it can be note that the speedest is
on the second run, and that the slower run is on the not change file, and the fastest on
the other file.
Generating autoload files
Warming up the cache for the prod environment with debug false
Restarting PHP5 FastCGI Process Manager: php5-fpm.
Restarting web server: apache2 ... waiting .
Launch 1
Time per request: 26.390 [ms] (mean)
Launch 2
Time per request: 24.957 [ms] (mean)
Launch 3
Time per request: 24.892 [ms] (mean)
Launch 4
Time per request: 24.567 [ms] (mean)
Launch 5
Time per request: 24.639 [ms] (mean)
=========After remove Acme bundle and Behat, doctrine data fixture bundle lines==============
cp autoload_classmap.php vendor/composer/autoload_classmap.php
Warming up the cache for the prod environment with debug false
Restarting PHP5 FastCGI Process Manager: php5-fpm.
Restarting web server: apache2 ... waiting .
Launch 1
Time per request: 26.143 [ms] (mean)
Launch 2
Time per request: 25.848 [ms] (mean)
Launch 3
Time per request: 25.893 [ms] (mean)
Launch 4
Time per request: 24.375 [ms] (mean)
Launch 5
Time per request: 24.047 [ms] (mean)
Generating autoload files
Warming up the cache for the prod environment with debug false
Restarting PHP5 FastCGI Process Manager: php5-fpm.
Restarting web server: apache2 ... waiting .
Launch 1
Time per request: 26.152 [ms] (mean)
Launch 2
Time per request: 25.666 [ms] (mean)
Launch 3
Time per request: 25.151 [ms] (mean)
Launch 4
Time per request: 24.810 [ms] (mean)
Launch 5
Time per request: 24.649 [ms] (mean)
===========After remove Acme bundle and Behat, doctrine data fixture bundle lines===========
cp autoload_classmap.php vendor/composer/autoload_classmap.php
Warming up the cache for the prod environment with debug false
Restarting PHP5 FastCGI Process Manager: php5-fpm.
Restarting web server: apache2 ... waiting .
Launch 1
Time per request: 25.977 [ms] (mean)
Launch 2
Time per request: 25.222 [ms] (mean)
Launch 3
Time per request: 24.968 [ms] (mean)
Launch 4
Time per request: 24.152 [ms] (mean)
Launch 5
Time per request: 23.886 [ms] (mean)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment