[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [Libevent-users] FD_SETSIZE - max connections in Windows - help!
- To: libevent-users@xxxxxxxxxxxxx
- Subject: Re: [Libevent-users] FD_SETSIZE - max connections in Windows - help!
- From: Nick Mathewson <nickm@xxxxxxxxxxxxx>
- Date: Mon, 15 Mar 2010 12:17:37 -0400
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: libevent-users-outgoing@xxxxxxxx
- Delivered-to: libevent-users@xxxxxxxx
- Delivery-date: Mon, 15 Mar 2010 12:17:44 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to :content-type:content-transfer-encoding; bh=/rSxGrbwngoU+ItR+4w7Jk7uOSVwTB0fxDt9RfwhbB8=; b=gDuIviHf7VUTeflmY3UzEPbfFT2Xxl/aURjS5B1Ja0/LqPma+L7OXXHvSxmmbfxJlj y7xN9Or2gp3TB/cSuXYt2yB18lhKaR2u+BnLhJ1QyfVsC2tKBnjmvd3anZtsyp1aGhJ6 /UL5j5YqN4Is41KjUIavYFXMXoigvrqm3efMk=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=G/zSlvMxzqV3zNfzZO4u00Q5WPjd8TrCfm7xrLn+HY3i6TwZEyux7ctWd2MoezuKLp Aw9o9Db29AQ8InBrlbqO3Mo+TYg2l4BnGSvctMjwpM0//5UJMoLrDTKnq20mdkLkCrsb Fpssn9BzR9eV82N2Mof9P5eOiJGh9EwbaS1n8=
- In-reply-to: <4B9E5A48.8060703@xxxxxxxx>
- References: <4B9E5A48.8060703@xxxxxxxx>
- Reply-to: libevent-users@xxxxxxxxxxxxx
- Sender: owner-libevent-users@xxxxxxxxxxxxx
On Mon, Mar 15, 2010 at 12:03 PM, Patrick Galbraith <patg@xxxxxxxx> wrote:
> Hi all,
>
> We have hit a brick wall with memcached - namely max connections with
> select.
>
> Namely, select from libvent use by memcached on windows, according to the
> documentation from MSDN you need to
> set FD_SETSIZE to the maximum number of sockets to use. By default
> FD_SETSIZE
> == 64. We set FD_SETSIZE to 2048 in win32select.c at the top prior to
> including winsock2.h, but still no success. It seems to fail at 41
> connections.
I'm not sure why you're seeing this 41-connections issue, but I don't
think it has anything to do with FD_SETSIZE. FD_SETSIZE affects the
declared size of the fd_set structure that select() uses. But
Libevent doesn't believe the size of fd_set from the winsock2.h
header; instead, it allocates its own. Look at the code for
FD_SET_ALLOC_SIZE.
(For me, win32select doesn't top out at 41 connections. It can handle
hundreds or thousands of connections easily, though the scaling gets
poor with thousands.)
yrs,
--
Nick
--
Nick
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users in the body.