[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [Libevent-users] Benchmarking Fun



On Mon, Jan 16, 2012 at 3:05 AM, harry <harry@xxxxxxxxxxxx> wrote:
> Hi,
>
> I've been playing around with libev and libevent and knocked up a
> benchmarking tool for them both. It's been a while since I've used C but you
> can produce some graphs using the tool etc and I've had some odd results ie
> for my use case, lots of file descriptors and I'm not using any timers,
> libevent appears to be faster than libev. I fully suspect I've coded this
> incorrectly so it's a work in progress but if someone want to play with it
> you can find it on github here:
>
> https://github.com/harryjackson/benchmark_libev_libevent
>
> I have included the tar.gz of both the libs under test and there's a build
> script that'll install these in your directory ie it won't pollute your host
> machine. Any comments especially if you find if I've gone wrong would be
> most welcome.

Some other stuff to test might be different build options.  ISTR that
libev has the ability to compile in an "embedded" mode that ought to
be faster if you have only one event_base equivalent.  For Libevent,
it would be good to know whether you get better results by disabling
debugging support and/or thread support at configure time, assuming
that you're not using those.

Have you tried profiling libevent at all to see where the time goes?
It's nice to be fast for your load, but I'd very much doubt that we're
optimal.

How does the current git master branch of libevent compare?

How does your load compare to the loads currently generated by the
benchmark programs in test/ ?

There are also other libraries on the block to consider; I'd like to
see how boost::asio and libtorque do here, as well.

How would you describe your load verbally?  I could try to figure out
what the code _does_, but I'm not seeing any documentation for what
it's _supposed to do_, which makes it harder to tell if you've got it
right.  (One of the things I've had trouble with in coming up with
good benchmarks generally is that it's hard to come up with a
realistic load where the main event loop is close to being in the
critical path.)

yrs,
-- 
Nick
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.