Re: poll(2) vs kqueue(2) performance

2008-04-26 Thread Marco Peereboom
I found the doxygen docs far less useful than the man page. On Apr 23, 2008, at 10:31 PM, "Niels Provos" <[EMAIL PROTECTED]> wrote: On Mon, Apr 21, 2008 at 2:05 PM, Gilles Chehade <[EMAIL PROTECTED]> wrote: Yay, I too fell in love with it and it's various API's despite the lack of documen

Re: poll(2) vs kqueue(2) performance

2008-04-23 Thread Niels Provos
On Mon, Apr 21, 2008 at 2:05 PM, Gilles Chehade <[EMAIL PROTECTED]> wrote: > Yay, I too fell in love with it and it's various API's despite the lack > of documentation for most of them, header help understanding how things > work but I wasted quite some time on bufferevents ;-) The documentatio

Re: poll(2) vs kqueue(2) performance

2008-04-21 Thread Gilles Chehade
On Mon, Apr 21, 2008 at 09:43:43AM -0500, Marco Peereboom wrote: > On Mon, Apr 21, 2008 at 02:31:26PM +0200, Henning Brauer wrote: > > programming w/ libevent is convenient at times, the decision poll vs > > libevent should not be made based on performance considerations, > > exception beeing the

Re: poll(2) vs kqueue(2) performance

2008-04-21 Thread Marco Peereboom
On Mon, Apr 21, 2008 at 02:31:26PM +0200, Henning Brauer wrote: > programming w/ libevent is convenient at times, the decision poll vs > libevent should not be made based on performance considerations, > exception beeing the above massive concurrent connection case. I spent a lot of time doing l

Re: poll(2) vs kqueue(2) performance

2008-04-21 Thread Edwin Eyan Moragas
Marc, Henning, thank you for the insight. On Mon, Apr 21, 2008 at 8:38 PM, Marc Espie <[EMAIL PROTECTED]> wrote: > > On Sat, Apr 19, 2008 at 11:43:20AM +0200, Jonathan Schleifer wrote: > > "Edwin Eyan Moragas" <[EMAIL PROTECTED]> wrote: > > > > > the question is, which one is more useful when

Re: poll(2) vs kqueue(2) performance

2008-04-21 Thread Marc Espie
On Sat, Apr 19, 2008 at 11:43:20AM +0200, Jonathan Schleifer wrote: > "Edwin Eyan Moragas" <[EMAIL PROTECTED]> wrote: > > > the question is, which one is more useful when writing new servers? > > kqueue or poll? > > poll is more portable, while kqueue should be more performant (at > least, that's

Re: poll(2) vs kqueue(2) performance

2008-04-21 Thread Henning Brauer
* Edwin Eyan Moragas <[EMAIL PROTECTED]> [2008-04-19 07:34]: > been reading the select(2) man pages and it mentions poll(2) > being more efficient in most cases. this makes it obvious to > discard the use of select(2) in writing new servers. yes. poll is the way better API, easier to use, easier k

Re: poll(2) vs kqueue(2) performance

2008-04-19 Thread Edwin Eyan Moragas
On Sat, Apr 19, 2008 at 5:43 PM, Jonathan Schleifer <[EMAIL PROTECTED]> wrote: > "Edwin Eyan Moragas" <[EMAIL PROTECTED]> wrote: > > > > the question is, which one is more useful when writing new servers? > > kqueue or poll? > > poll is more portable, while kqueue should be more performant (at >

Re: poll(2) vs kqueue(2) performance

2008-04-19 Thread Jonathan Schleifer
"Edwin Eyan Moragas" <[EMAIL PROTECTED]> wrote: > the question is, which one is more useful when writing new servers? > kqueue or poll? poll is more portable, while kqueue should be more performant (at least, that's why it was invented). If your app only needs to run on OpenBSD, NetBSD and FreeBS

Re: poll(2) vs kqueue(2) performance

2008-04-19 Thread Edwin Eyan Moragas
Hi Eric, On Sat, Apr 19, 2008 at 4:17 PM, Eric Faurot <[EMAIL PROTECTED]> wrote: > > the question is, which one is more useful when writing new servers? > > kqueue or poll? > > The more useful is event(3). i've been looking also at libevent and libev, both of which are excellent libraries. how

Re: poll(2) vs kqueue(2) performance

2008-04-19 Thread Eric Faurot
On Sat, 19 Apr 2008 13:27:34 +0800 "Edwin Eyan Moragas" <[EMAIL PROTECTED]> wrote: > Hi all, > > been reading the select(2) man pages and it mentions poll(2) > being more efficient in most cases. this makes it obvious to > discard the use of select(2) in writing new servers. > > i've come across

Re: poll(2) vs kqueue(2) performance

2008-04-18 Thread Edwin Eyan Moragas
thank you, Theo. On Sat, Apr 19, 2008 at 1:50 PM, Theo de Raadt <[EMAIL PROTECTED]> wrote: > > been reading the select(2) man pages and it mentions poll(2) > > being more efficient in most cases. this makes it obvious to > > discard the use of select(2) in writing new servers. > > select requir

Re: poll(2) vs kqueue(2) performance

2008-04-18 Thread Theo de Raadt
> been reading the select(2) man pages and it mentions poll(2) > being more efficient in most cases. this makes it obvious to > discard the use of select(2) in writing new servers. select requires that you set up a bit array correctly. but often people just use a fd_set, and cause a variety of st

poll(2) vs kqueue(2) performance

2008-04-18 Thread Edwin Eyan Moragas
Hi all, been reading the select(2) man pages and it mentions poll(2) being more efficient in most cases. this makes it obvious to discard the use of select(2) in writing new servers. i've come across some performance benchmarks which is trying to use kqueue(2). the question is, which one is more