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

Re: [Libevent-users] select() call overflow from libevent for different OS



I think I will have to alter the connections amount for test conditions to fit all servers.

With tuning the FD_SETSIZE, I remember it was one of the options for setting up httperf tests, http://www.hpl.hp.com/hosted/linux/mail-archives/httperf/2003-December/000128.html that's why my first guess was that it might work here as well.

Thank you all for the explanations guys.

Quoting Thor Lancelot Simon <tls@xxxxxxxxx>:

On Sun, Jun 02, 2013 at 03:57:28PM -0700, William Ahern wrote:
On Sun, Jun 02, 2013 at 02:05:20PM -0600, J. Scott Dorr wrote:
> Yeah, FD_SETSIZE is supposed to be informative, not a tuning parameter.
>

Under POSIX, yes. But some implementations allow the user to define this
macro, including OS X, OpenBSD, and Solaris. It looks like Linux/glibc
stopped allowing this--or at least stopped making it easy--from what I can
tell of the header file in Ubuntu.

It's a bad idea, of course. Though OS X allows the user to set FD_SETSIZE,
you still need other magic for the kernel to accept the larger value. And I

What magic, exactly?

This interface originated in BSD Unix, and FD_SETSIZE has always been
adjustable by the application.  The problem is when one runs into library
interfaces that want to pass fd_sets around; there, if you don't use the
same FD_SETSIZE as they did, you lose.  Such interfaces are broken, but
they exist.

But if there is a problem with the kernel (which I doubt) it is a new
problem and whoever caused it should fix it.

On the other hand it is almost always a very bad idea to use select() in
new code, for performance reasons.  Even poll is much better.

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




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