http://doc.dvgu.ru/devel/ev.html#win32_platform_limitations_and_workarounds
Libevent on Windows, uses I/O Completion Ports (IOCP) and scales
beautifully. From the link above, it looks like libev is using the old
select call and it is well known that this will not scale beyond a few
hundred sockets, on either Windows or Linux.
It looks like switching to libev will make gevent a UNIX-library only,
but I might be wrong.
--
Jan Persson - Esentus Technology AB - www.esentus.com - +46 702 854132 (mobile)
Thanks for the explanation. So the plan is basically to first make a
transition to libev and then to liboio?
I hope that those of us who still needs to support Windows will have
the possible to change backend, in spite of this posting:
"Only libev will be supported in 0.14. However, other than gevent.core
the interface of gevent package is not changed, so transition should be smooth."
I (and the original poster) still wonders why there is a switch to
libev in the first place, when libevent is working? I rest assured
that there are good reasons for this, but could Denis care to explain?
faster - probably somewhat, but that wasn't the reason for switch.
simpler to use - yes, the API is really nicer.
has http server - no, although a few servers have been written by 3rd parties.
I put some details in a blog post:
http://blog.gevent.org/2011/04/28/libev-and-libevent/
On Wed, Apr 27, 2011 at 2:09 AM, Jan Persson <jan.p...@gmail.com> wrote:
> Libevent on Windows, uses I/O Completion Ports (IOCP) and scales
> beautifully. From the link above, it looks like libev is using the old
> select call and it is well known that this will not scale beyond a few
> hundred sockets, on either Windows or Linux.
Libevent2 has support for IOCP, but it's not automatic, you need to
use asynchronous bufferevents to use it.
Gevent does not wrap bufferevents, let alone asynchronous. The
libevent itself does not use async bufferevents in DNS, HTTP client
and HTTP server.
Thus there's no way to take advantage of IOCP in gevent 0.13 and so
switching to libev does not imply degraded performance on Windows (it
remains poor).
> It looks like switching to libev will make gevent a UNIX-library only,
> but I might be wrong.
It won't become UNIX-only, I think gevent 0.14 will support Windows at
least to the same extent as gevent 0.13 supported it.
> On Wed, Apr 27, 2011 at 09:32, Travis Cline <travis...@gmail.com> wrote:
> ry (node.js author) is working on https://github.com/joyent/liboio
> which he announced at CodeConf.
>
> Once it matures it's probably not unreasonable for gevent to target it
> and get the ability to support both windows and file i/o well.
It wasn't the plan to use liboio as I started using libev before that
was announced, but that's an interesting project to watch and when it
matures we can consider using as a base layer for gevent.
You are talking about gevent 0.13, right?
I think this the kind of problem that is fixed in the trunk by
switching to c-ares for DNS.
However you have to wait while trunk's Windows bugs fixed before you
can try that (or help fixing them).
Thanks for the answer. I was under the impression that IOCP was being
used, since gevent has scaled so good for our Windows project (which
has hundreds of clients) and this discussion made me a bit worried
that the good days were over.
Thanks again for this excellent library.
Regards,
Gal
Yes, I do want to have fast implementations of gevent.httplib and
gevent.wsgi in 0.14 that are at least as
good as in 0.13. Not sure about the specifics yet.