Accurate Web Application Benchmarking Methodology

I recently was searching for a benchmark comparing the performance of the PDO and ADOdb Database Abstraction Libraries for PHP applicable to use in a Web application, and came up with nothing satisfactory on the subject. There were several benchmarks floating around but I noticed a flaw in the methodology used.

A Flawed Methodology

It seems as if somebody performed a benchmark this way and others repeated the process blindly:

  1. Create a separate script for each library to be benchmarked
  2. Within that script, create a time marker at the start and end of the script
  3. After the first time marker, include the library
  4. Between the time markers, execute X (example: X=500) iterations of a block of code which calls into the method(s) of the library

The benchmarkers then executed each script and calculated the time difference between the start/end time markers of each script to determine the winning library.

Why this Benchmarking Methodology is not Accurate

When benchmarking libraries to be included at runtime in a PHP driven web application, there will be varying overhead for the actual inclusion of the library. I would assume this applies not only to PHP, but to languages such as Python, Perl, Ruby, etc.

Thus any benchmarking methodology which fails to factor in the library inclusion cost in a realistic proportion to the calls to that library will be skewed, sometimes badly. Never in my experience have I needed to expose performance-critical code that iterates through 500 calls to a database abstraction library per a single hit. This would be a ration of 1 library inclusion per 500 method calls into that library.

A more accurate ratio of library includes to library method calls is 1 to 3. So on an average, for one hit to an application where the library is included, we call methods of that library three times.

The Correct Benchmarking Methodology

We are benchmarking a web application, so we need our 500 iterations on the client side, not inside a high count loop inside the application.

Each of our client side iterations will be a separate request causing our library to be loaded once, and methods of that library to be called in a realistic ratio that would simulate real application calls.

To achieve this, we use a tool such as ApacheBench on the client side and make 500 requests (example below). We still have a script for each library we wish to benchmark, but we model the method calls within that script to a more realistic number, such as three.

# Library A results
ab -n 500 http://localhost/library-a.php


# Library B results
ab -n 500 http://localhost/library-b.php

The Result

In the case of Benchmarking PDO vs ADOdb, I saw benchmarks using the flawed benchmark methodology which put PDO at only a 125% speedup over the ADOdb library.

When I benchmarked (see full benchmark here) the PDO library provide as much as a 2840% speedup over the ADOdb Library.

My conclusion - load time inclusion times in web languages makes a huge difference.

купить диплом техникума купить аттестат за 11 класс купить диплом техникума купить диплом университета купить диплом http://diplomy-originaly.com купить диплом фармацевта где купить диплом купить диплом нового образца купить диплом колледжа купить диплом о среднем образовании http://diplomsagroups.com купить диплом фармацевта купить диплом фармацевта https://gosznac-diploma.com/ купить диплом специалиста купить диплом фармацевта купить диплом с регистрацией купить диплом с занесением в реестр купить диплом в москве где купить диплом купить диплом техникума с занесением в реестр купить диплом о высшем образовании https://russian-diplom.com купить диплом с занесением в реестр реально купить диплом специалиста http://rudiplomirovanie.com купить диплом с занесен ем в реестр купить диплом института http://aurus-diploms.com купить диплом с реестром цена купить аттестат за 11 класс https://premiums-diploms.com купить диплом с занесением в реестр реально купить диплом автомеханика http://russdiplomiki.com купить диплом с реестром купить диплом автомеханика https://diplomansy.com купить диплом без реестра купить диплом о среднем образовании https://diploms-asx.com купить диплом с занесением в реестр цена купить диплом в москве https://diploms-asx.com купить диплом с занесением в реестр купить диплом фармацевта https://eonline-diploms.com купить настоящий диплом реестр купить диплом института купить диплом института купить диплом с реестром купить дипломы о высшем http://diplomrussian.com купить диплом с проводкой купить диплом университета купить диплом института купить диплом с занесением в реестр купить диплом о среднем специальном купить диплом в москве купить диплом техникума с занесением в реестр купить диплом института https://russiany-diploman.com/ купить диплом с занесением в реестр цена купить диплом кандидата наук купить диплом университета купить диплом техникума с занесением в реестр купить диплом врача https://rudiplomisty24.com/ купить диплом с реестром цена москва купить диплом фармацевта https://land-diplom.com/ купить диплом пту с занесением в реестр купить свидетельство о браке купить аттестат купить диплом с занесением в реестр купить аттестат за 11 класс https://diplomsy-landsy24.ru/ купить диплом высшем образовании занесением реестр купить диплом врача купить аттестат за 9 класс куплю диплом техникума реестр купить диплом института купить диплом о высшем образовании купить диплом с реестром цена купить диплом фармацевта купить диплом фармацевта купить медицинский диплом с занесением в реестр купить диплом о высшем образовании купить свидетельство о браке купить диплом с реестром цена купить диплом о высшем образовании http://aurus-diploms.com/kupit-diplom-farmacevta.html купить диплом с занесен ем в реестр купить диплом о среднем специальном купить диплом вуза с реестром купить диплом колледжа с занесением в реестр купить диплом автомеханика http://diploms-service.com/diplomy-po-gorodam/ufa купить диплом с реестром купить диплом о среднем образовании https://diploms-asx.com/ купить диплом техникума с занесением в реестр купить аттестат за 9 классhttps://russdiplomiki.com/kupit-diplom-v-ekaterinburge.html купить диплом врача с занесением в реестр купить диплом кандидата наук купить диплом училища где купить диплом с реестром купить свидетельство о браке купить диплом специалиста купить диплом с занесен ем в реестр