Libev vs. libevent benchmark (enterprise)

common at gmx.ch common at gmx.ch
Wed Apr 14 16:01:48 CEST 2010


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
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: dat.t0
URL: <http://lists.schmorp.de/pipermail/libev/attachments/20100414/8cb3bba9/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: dat.t1
URL: <http://lists.schmorp.de/pipermail/libev/attachments/20100414/8cb3bba9/attachment.asc>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bench.sh
Type: application/x-sh
Size: 3117 bytes
Desc: not available
URL: <http://lists.schmorp.de/pipermail/libev/attachments/20100414/8cb3bba9/attachment.sh>


More information about the libev mailing list