Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Why libev replaced libevent
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  16 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
galfy  
View profile  
 More options Apr 26 2011, 11:43 am
From: galfy <galfyo.pun...@googlemail.com>
Date: Tue, 26 Apr 2011 08:43:44 -0700 (PDT)
Local: Tues, Apr 26 2011 11:43 am
Subject: Why libev replaced libevent
I saw that in the recent months most of the development was going
towards replacing libev with libevent. Probably there is a reason for
this and I, and I guess the other gevent fans, will be happy to learn
it. Is libev faster, simpler to use, has http server that supports
streaming, etc?

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jan Persson  
View profile  
 More options Apr 26 2011, 3:09 pm
From: Jan Persson <jan.pers...@gmail.com>
Date: Tue, 26 Apr 2011 21:09:35 +0200
Local: Tues, Apr 26 2011 3:09 pm
Subject: Re: [gevent] Why libev replaced libevent
I might be totally wrong, but the thing that worries me the most, is
that switching to libev will make it impossible to get decent
performance from gevent on Windows. I personally don't care much about
that platform, but my customer has decided to use it for their
applications and I have to support them.

http://doc.dvgu.ru/devel/ev.html#win32_platform_limitations_and_worka...

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.

On Tue, Apr 26, 2011 at 17:43, galfy <galfyo.pun...@googlemail.com> wrote:
> I saw that in the recent months most of the development was going
> towards replacing libev with libevent. Probably there is a reason for
> this and I, and I guess the other gevent fans, will be happy to learn
> it. Is libev faster, simpler to use, has http server that supports
> streaming, etc?

--
Jan Persson - Esentus Technology AB - www.esentus.com - +46 702 854132 (mobile)

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Travis Cline  
View profile  
 More options Apr 27 2011, 3:32 am
From: Travis Cline <travis.cl...@gmail.com>
Date: Wed, 27 Apr 2011 00:32:08 -0700 (PDT)
Local: Wed, Apr 27 2011 3:32 am
Subject: Re: Why libev replaced libevent
On Apr 26, 2:09 pm, Jan Persson <jan.pers...@gmail.com> wrote:

> I might be totally wrong, but the thing that worries me the most, is
> that switching to libev will make it impossible to get decent
> performance from gevent on Windows. I personally don't care much about
> that platform, but my customer has decided to use it for their
> applications and I have to support them.

> http://doc.dvgu.ru/devel/ev.html#win32_platform_limitations_and_worka...

> 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.

AFAICT you're basically correct. In order to support windows and unix
well, 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.

Travis


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jan Persson  
View profile  
 More options Apr 27 2011, 6:20 am
From: Jan Persson <jan.pers...@gmail.com>
Date: Wed, 27 Apr 2011 12:20:11 +0200
Local: Wed, Apr 27 2011 6:20 am
Subject: Re: [gevent] Re: Why libev replaced libevent

On Wed, Apr 27, 2011 at 09:32, Travis Cline <travis.cl...@gmail.com> wrote:
> On Apr 26, 2:09 pm, Jan Persson <jan.pers...@gmail.com> wrote:
> AFAICT you're basically correct. In order to support windows and unix
> well, 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.

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?

--
Jan Persson - Esentus Technology AB - www.esentus.com - +46 702 854132 (mobile)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Equand  
View profile  
 More options Apr 27 2011, 4:50 pm
From: Equand <equ...@gmail.com>
Date: Wed, 27 Apr 2011 13:50:12 -0700 (PDT)
Local: Wed, Apr 27 2011 4:50 pm
Subject: Re: Why libev replaced libevent
seems like problem with DNS arises with libevent only (their DNS
resolving is not fixed yet even in 2.0.)

On Apr 27, 12:20 pm, Jan Persson <jan.pers...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
CryptWizard  
View profile  
 More options Apr 27 2011, 9:06 pm
From: CryptWizard <cryptwiz...@gmail.com>
Date: Thu, 28 Apr 2011 11:06:59 +1000
Local: Wed, Apr 27 2011 9:06 pm
Subject: Re: [gevent] Re: Why libev replaced libevent
I think a workaround for DNS would be easier than a workaround for Windows.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Denis Bilenko  
View profile  
 More options Apr 28 2011, 1:32 pm
From: Denis Bilenko <denis.bile...@gmail.com>
Date: Fri, 29 Apr 2011 00:32:52 +0700
Local: Thurs, Apr 28 2011 1:32 pm
Subject: Re: [gevent] Why libev replaced libevent

On Tue, Apr 26, 2011 at 10:43 PM, galfy <galfyo.pun...@googlemail.com> wrote:
> I saw that in the recent months most of the development was going
> towards replacing libev with libevent. Probably there is a reason for
> this and I, and I guess the other gevent fans, will be happy to learn
> it. Is libev faster, simpler to use, has http server that supports
> streaming, etc?

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.pers...@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.cl...@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 must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
James Simmons  
View profile  
 More options Apr 28 2011, 1:45 pm
From: James Simmons <ja...@avatrion.com>
Date: Thu, 28 Apr 2011 10:45:15 -0700 (PDT)
Local: Thurs, Apr 28 2011 1:45 pm
Subject: Re: Why libev replaced libevent

> 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).

I've only had a chance so far to use gevent under Windows XP. I have
my DNS settings pointing to a localhost instance of BIND9 and I've
noticed that about 10% of the HTTP GET requests I send (using the non-
monkey patched httplib) fail with DNS errors. The majority of the
failures are either "unknown" or "request timed out." Is this a
symptom of the poor performance under Windows or do you believe my
problem lies elsewhere (perhaps with my BIND configuration -- which is
default in all ways)?

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Denis Bilenko  
View profile  
 More options Apr 28 2011, 1:58 pm
From: Denis Bilenko <denis.bile...@gmail.com>
Date: Fri, 29 Apr 2011 00:58:03 +0700
Local: Thurs, Apr 28 2011 1:58 pm
Subject: Re: [gevent] Re: Why libev replaced libevent

On Fri, Apr 29, 2011 at 12:45 AM, James Simmons <ja...@avatrion.com> wrote:
>> 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).

> I've only had a chance so far to use gevent under Windows XP. I have
> my DNS settings pointing to a localhost instance of BIND9 and I've
> noticed that about 10% of the HTTP GET requests I send (using the non-
> monkey patched httplib) fail with DNS errors. The majority of the
> failures are either "unknown" or "request timed out." Is this a
> symptom of the poor performance under Windows or do you believe my
> problem lies elsewhere (perhaps with my BIND configuration -- which is
> default in all ways)?

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).

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
James Simmons  
View profile  
 More options Apr 28 2011, 2:47 pm
From: James Simmons <ja...@avatrion.com>
Date: Thu, 28 Apr 2011 11:47:56 -0700 (PDT)
Local: Thurs, Apr 28 2011 2:47 pm
Subject: Re: Why libev replaced libevent
On Apr 28, 10:58 am, Denis Bilenko <denis.bile...@gmail.com> wrote:

> 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).

Yes I'm using 0.13. Glad to hear that the issues I'm experiencing are
fixed in trunk. I probably won't be of much use in fixing the issues
though unless it's something specific to the Python portion of the
project. I haven't had any luck getting it to compile (though I never
have any luck getting things to compile in Windows).

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jan Persson  
View profile  
 More options Apr 28 2011, 3:50 pm
From: Jan Persson <jan.pers...@gmail.com>
Date: Thu, 28 Apr 2011 21:50:05 +0200
Local: Thurs, Apr 28 2011 3:50 pm
Subject: Re: [gevent] Why libev replaced libevent

> 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).

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.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Galfy Pundee  
View profile  
 More options Apr 29 2011, 8:31 am
From: Galfy Pundee <galfyo.pun...@googlemail.com>
Date: Fri, 29 Apr 2011 14:31:41 +0200
Local: Fri, Apr 29 2011 8:31 am
Subject: Re: [gevent] Why libev replaced libevent
Thanks for the information. Let's hope that simplification can lead to
cleaner and faster code :)

Regards,
 Gal


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andy  
View profile  
 More options Apr 30 2011, 11:42 am
From: Andy <selforgani...@gmail.com>
Date: Sat, 30 Apr 2011 08:42:28 -0700 (PDT)
Local: Sat, Apr 30 2011 11:42 am
Subject: Re: Why libev replaced libevent

On Apr 28, 1:32 pm, Denis Bilenko <denis.bile...@gmail.com> wrote:

> 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.

What http server will gevent 0.14 be using then?

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jaime  
View profile  
 More options May 14 2011, 6:27 am
From: Jaime <jjja...@gmail.com>
Date: Sat, 14 May 2011 03:27:36 -0700 (PDT)
Local: Sat, May 14 2011 6:27 am
Subject: Re: Why libev replaced libevent
I'm also very interested in the impact of libev regarding wsgi support
of gevent. We've used libevent2 wsgi module instead of pure wsgi in
order to maximize the overall performance (which is really
noticeable).
Denis, do you have any plan to support fast, native wsgi when porting
to libev? Perhaps using third-party projects like https://github.com/jonashaag/bjoern
which is also based on libev?

On 30 abr, 17:42, Andy <selforgani...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Denis Bilenko  
View profile  
 More options May 16 2011, 3:19 am
From: Denis Bilenko <denis.bile...@gmail.com>
Date: Mon, 16 May 2011 14:19:33 +0700
Local: Mon, May 16 2011 3:19 am
Subject: Re: [gevent] Re: Why libev replaced libevent

On Sat, May 14, 2011 at 5:27 PM, Jaime <jjja...@gmail.com> wrote:
> Denis, do you have any plan to support fast, native wsgi when porting
> to libev? Perhaps using third-party projects like https://github.com/jonashaag/bjoern
> which is also based on libev?

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.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jaime  
View profile  
 More options May 16 2011, 11:35 am
From: Jaime <jjja...@gmail.com>
Date: Mon, 16 May 2011 08:35:23 -0700 (PDT)
Local: Mon, May 16 2011 11:35 am
Subject: Re: Why libev replaced libevent
Thanks Denis. You are doing a great job!

On 16 mayo, 09:19, Denis Bilenko <denis.bile...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »