Gabriel Kerneis wrote:
Marc,

On Mon, Apr 12, 2010 at 05:10:29PM +0200, Marc Lehmann wrote:
If you ran the code unmodified, how did you do that? :)

See the attached script.  You might need to tweak it a bit (especially
the cpufreq-set call) but otherwise, it automates completely the
benchmark (provided you have the expected tools installed).

The script failed for me, libevent2 needs a proper install.
See attached version.

Please, double-check my patching of runbench just in case.

Now, since libevent does an enourmous number of pointer operations,
mutex ops, syscalls etc. per watcher setup in 2.0, I find this a bit
questionable (but it's possible).

The results are available here:
http://wwww.pps.jussieu.fr/~kerneis/software/files/libev-vs-libevent

http://www.pps.jussieu.fr/~kerneis/software/files/libev-vs-libevent

Same results here on my intel q9550.
libevent2 needs much less time on the second (or more) run_once calls.

./bench-le2  -n 100000 -a 100
  141014      585
   66985      565

./bench -e  -n 100000 -a 100
  134657      554
   89967      538


Things get interesting, when going to less powerfull plattforms: my amd geode-lx, which is limited to 20k pipes and the nice command does not work over there.

./bench-le  -n 10000 -a 1000
  136627    15216
  193398    15298

libevent 1.4, the first iteration is the cheapest

./bench-le2  -n 10000 -a 1000
  152804    15713
   97690    15610

libevent2, initially expensive, iterations are cheaper

./bench  -n 10000 -a 1000
  137627    16222
   90082    14814
   90275    15178
   89708    15114

libev emul perfoms even better than native?

./bench  -e -n 10000 -a 1000
  136538    14289
   92104    14528
   91380    14897
   90796    14810

I've attached the dat files for the geode, the graphs look totally different.
libev dominates in general, sometimes even libev-emul.


Markus
100 5122 2861 4249 2813 4209 2744 4468 2882 - - - - - - - -
200 6932 3227 5225 3172 5205 3130 5565 3294 - - - - - - - -
300 8402 3280 5937 3224 5904 3174 6269 3353 - - - - - - - -
400 9759 3279 6504 3209 6491 3172 6871 3345 - - - - - - - -
500 11149 3291 7125 3240 7127 3184 7511 3370 - - - - - - - -
600 12750 3280 7712 3210 7674 3152 8083 3329 - - - - - - - -
750 14626 3267 8598 3212 8616 3163 9163 3309 - - - - - - - -
1000 18612 3255 10135 3227 10198 3174 10785 3330 40241 14910 32217 14746 31967 
14414 32602 15156
2000 34789 3379 16573 3323 16641 3265 17942 3433 57019 15207 38497 14602 38548 
14397 40085 15432
3000 50865 3408 22871 3363 23078 3359 24992 3494 72852 15286 44854 14702 45061 
14471 47239 15538
4000 68305 3489 29284 3376 29743 3329 32149 3479 90071 15274 51344 14738 51759 
14550 54517 15552
5000 83109 3415 35532 3353 36268 3307 39143 3487 104696 15266 57726 14690 58378 
14495 61597 15583
6000 99916 3518 41865 3396 42803 3371 46222 3491 121452 15216 63995 14736 64858 
14484 68294 15591
7500 126362 3482 51593 3320 52606 3265 56758 3588 148847 15307 73538 14719 
75158 14492 79211 15550
10000 168348 3380 67165 3308 69058 3263 74543 3426 190000 15152 89477 14659 
91078 14471 96743 15525
20000 334133 3461 131453 3368 136600 3295 146799 3440 355262 15258 153276 14692 
158766 14435 169840 15491
100 9634 5883 5429 3862 4469 3030 7540 4483 - - - - - - - -
200 13129 6341 6537 4209 5496 3428 10240 4919 - - - - - - - -
300 16361 6507 7397 4289 6202 3482 12633 5002 - - - - - - - -
400 19379 6499 8111 4257 6767 3493 14726 5005 - - - - - - - -
500 22449 6533 8829 4292 7385 3487 17199 5056 - - - - - - - -
600 25766 6606 9560 4268 8027 3489 19291 5032 - - - - - - - -
750 30045 6587 10679 4244 8906 3465 22598 5032 - - - - - - - -
1000 38116 6708 12579 4287 10490 3486 28406 5060 73775 32658 41652 22924 33181 
15856 58893 25742
2000 70094 7099 20403 4479 17059 3587 51581 5276 106883 33702 47863 21314 40185 
16090 82667 26062
3000 101178 7297 28273 4462 23430 3720 74765 5265 138330 34442 56030 21400 
46560 16156 106585 26625
4000 133627 7417 36187 4536 29884 3627 98376 5351 171248 34648 64067 21532 
53336 16190 130499 26607
5000 164472 7524 44051 4547 36510 3643 122259 5370 202225 34837 72142 21539 
59759 16161 153627 26818
6000 197045 7464 51836 4519 43015 3686 145530 5304 235803 35212 80026 21584 
66334 16260 176338 26700
7500 246818 7501 63812 4545 52996 3646 180660 5298 286279 35738 92323 21739 
76134 16258 212700 27094
10000 327630 7662 84205 4587 69580 3690 243949 5326 365876 35952 112317 21767 
93580 16325 275919 26921
20000 650198 7676 164732 4564 137098 3638 476799 5365 689878 36598 193065 21883 
160659 16315 509644 27481

Attachment: bench.sh
Description: Bourne shell script

_______________________________________________
libev mailing list
[email protected]
http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev

Reply via email to