Benchmarks
infoarena has pressing issues regarding site performance. On busy days, the website crawls near to a complete halt. We need some numbers to optimize our way out.
Procedure
Though not very scientific, a simple ab (apache benchmark) will provide us some guidance. All numbers were calculated by issuing the following command line directly on the infoarena.ro host as root:
[root@infoarena ~]# ab -n 200 -c 1
Please follow the exact same procedure when doing benchmarks. For some tests, 200 requests is not accurate. Other times the test is completely off the scale because of the live traffic (i.e. normal users accessing the server). You may need to run it multiple times in order to get it right.
Note: Despite the eventual noise caused by live traffic, I think it is a good idea to run the tests directly on the production servers. That's because we also have to measure and optimize the virtual machine configuration. We can try one or more virtual CPUs, more or less RAM, different XEN/kernel versions and who knows what else.
Of course it's OK to run tests on your local machine in order to tests various improvements. However, the table below is for the production environment.
We test a bunch of different environments (SVN revisions and machine setup) against a set of URLs:
- http://infoarena.ro/utilizator/domino?action=download&file=avatar&resize=L32x32
- http://infoarena.ro/template/preoni-2006?action=download&file=hlogo.gif
- http://infoarena.ro/utilizator/domino
- http://infoarena.ro/changes
- http://infoarena.ro/clasament-rating
- http://infoarena.ro/monitor
- http://infoarena.ro/monitor?first_entry=63425
- http://infoarena.ro/monitor?task=fractii&round=arhiva&first_entry=3550
- http://infoarena.ro/monitor?user=gabitzish1&first_entry=4550
- http://infoarena.ro/monitor?first_entry=53425&round=arhiva&status=done&compiler=cpp
- http://infoarena.ro/links
- http://infoarena.ro/stiri
- http://infoarena.ro/problema/adunare
- http://infoarena.ro/preoni-2007/runda-1/9
- http://infoarena.ro/unirea-2007/rezultate-9-10
- http://infoarena.ro/plot/rating?user=gcosmin
- http://infoarena.ro/utilizator/domino?action=stats
- http://infoarena.ro/bogdan2412/cache-stress-test
Feel free to add some more relevant URLs but keep an eye on the total running time of the test. It sucks to wait half an hour for a benchmark.
Environments
An environment describes the key factors of the server setup that was in place when the benchmark was performed. Environments are referred by numbers.
| ID | SVN Revision | Concurrent Connections (-c) | Number of tests (-n) | Observations |
| 1 | 956 | 1 | 200 | |
| 2 | 956 | 5 | 200 | |
| 3 | 956 | 1 | 200 | eAccelerator enabled |
| 4 | 956 | 5 | 200 | eAccelerator enabled |
Results - bogdan-laptop
Specs:
- AMD Turion(tm) 64 X2 Mobile Technology TL-52 1600Mhz
- RAM 1408 MB
- Fedora 10
Table depicts number of requests / second.
(MP = Monitor patch from http://reviewboard.infoarena.ro/r/33/)
| URL | ENV1 | ENV2 | ENV3 | ENV4 | ENV1 + MP | ENV2 + MP | ENV3 + MP | ENV4 + MP |
| /utilizator/domino?action=download&file=avatar&resize=L32x32 | 18.50 | 33.53 | 29.86 | 50.37 | - | - | - | - |
| /template/preoni-2006?action=download&file=hlogo.gif | 18.75 | 33.05 | 28.95 | 55.69 | - | - | - | - |
| /utilizator/domino | 10.54 | 20.24 | 21.76 | 42.95 | - | - | - | - |
| /changes | 0.77 | 0.65 | 0.78 | 0.66 | - | - | - | - |
| /clasament-rating | 10.66 | 18.16 | 17.14 | 29.94 | - | - | - | - |
| /monitor | 13.26 | 23.84 | 23.16 | 40.17 | 13.10 | 25.23 | 23.00 | 43.12 |
| /monitor?first_entry=63425 | 0.42 | 0.70 | 0.43 | 0.70 | 8.82 | 17.12 | 12.30 | 22.40 |
| /monitor?task=fractii&round=arhiva&first_entry=3550 | 3.60 | 6.56 | 4.62 | 7.22 | 5.80 | 11.10 | 7.17 | 14.24 |
| /monitor?user=gabitzish1&first_entry=4550 | 3.31 | 7.41 | 4.72 | 8.41 | 11.80 | 20.97 | 19.18 | 36.19 |
| /monitor?first_entry=53425&round=arhiva&status=done&compiler=cpp | 0.18 | 0.28 | 0.18 | 0.28 | 0.30 | 0.48 | 0.30 | 0.48 |
| /links | 19.35 | 38.97 | 62.32 | 100.41 | - | - | - | - |
| /stiri | 15.57 | 31.93 | 35.30 | 58.45 | - | - | - | - |
| /problema/adunare | 8.36 | 17.02 | 16.24 | 26.17 | - | - | - | - |
| /preoni-2007/runda-1/9 | 15.63 | 31.09 | 40.12 | 70.35 | - | - | - | - |
| /unirea-2007/rezultate-9-10 | 10.17 | 20.90 | 16.47 | 32.16 | - | - | - | - |
| /plot/rating?user=gcosmin | 1.42 | 2.73 | 1.47 | 2.85 | - | - | - | - |
| /utilizator/domino?action=stats | 5.34 | 10.71 | 7.46 | 13.86 | - | - | - | - |
| /bogdan2412/cache-stress-test | 4.95 | 9.78 | 6.33 | 11.18 | - | - | - | - |
![[infoarena] development](/chrome/site/logo.png)