http://www.dslreports.com/forum/r20368916-maximum-number-of-open-sockets-files-threads-etc
1. Re: rollback (Ryan Williams (Which))
2. Re: rollback (Sergey Shepelev)
3. Re: rollback (Ryan Williams (Which))
<wbr></wbr>------------------------------<wbr></wbr>----------
Message: 1
Date: Mon, 01 Mar 2010 21:18:41 -0800
From: "Ryan Williams (Which)" <
rdw@lindenlab.com>
Subject: Re: [Eventletdev] rollback
To: Amir Yalon <
yxejamir@gmail.com>
Cc: eventlet <
eventletdev@lists.secondlife.<wbr></wbr>com>
Message-ID: <
4B8C9FB1.6040903@lindenlab.<wbr></wbr>com>
Content-Type: text/plain; charset=UTF-8; format=flowed
On 3/1/10 9:00 PM, Amir Yalon wrote:
> Hi,
>
> On Sat, Feb 13, 2010 at 08:20, Ryan Williams (Which) <
rdw@lindenlab.com> <mailto:
rdw@lindenlab.com>> wrote:
>
> def serve(sock, handle, concurrency=1000):
>
> The value in *concurrency* controls the maximum number of
> greenthreads that will be open at any time handling requests. When
> the server hits the concurrency limit, it stops accepting new
> connections until the existing ones complete.
> """
> pass
>
>
> Being able to limit the number of concurrent handlers is a reasonable
> requirement, but why do you want to force such a small value by default?
> What is the bottleneck here, actually?
>
> As I see it, the whole idea of greenlet, Stackless etc. is to enable
> concurrency in the hundreds of thousands on common hardware.
Yeah, that's a reasonable point; I just picked essentially a random
round number. My experience is that my own apps have gotten CPU-bound
quickly with actual work and so can't meaningfully use more than about
1000 concurrently. (tagline for Eventlet: "it helps you get to 100% CPU
utilization!") I probably have pretty CPU-bound workloads though, and
should probably bump that number up. What about 10000?
Thoughts from other folks on what concurrencies they use?
------------------------------
Message: 2
Date: Tue, 2 Mar 2010 09:22:40 +0300
From: Sergey Shepelev <
temotor@gmail.com>
Subject: Re: [Eventletdev] rollback
To: "Ryan Williams (Which)" <
rdw@lindenlab.com>
Cc: eventlet <
eventletdev@lists.secondlife.<wbr></wbr>com>
Message-ID:
<
2d8fb9951003012222s282b2246m5<wbr></wbr>1c1aa109e3b83c8@mail.gmail.com<wbr></wbr>>
Content-Type: text/plain; charset=UTF-8
On Tue, Mar 2, 2010 at 8:18 AM, Ryan Williams (Which) <
rdw@lindenlab.com> wrote:
> On 3/1/10 9:00 PM, Amir Yalon wrote:
>> Hi,
>>
>> On Sat, Feb 13, 2010 at 08:20, Ryan Williams (Which) <
rdw@lindenlab.com>> <mailto:
rdw@lindenlab.com>> wrote:
>>
>> ? ? def serve(sock, handle, concurrency=1000):
>>
>> ? ? ? ? ?The value in *concurrency* controls the maximum number of
>> ? ? ? ? ?greenthreads that will be open at any time handling requests. ?When
>> ? ? ? ? ?the server hits the concurrency limit, it stops accepting new
>> ? ? ? ? ?connections until the existing ones complete.
>> ? ? """
>> ? ? ? ? ?pass
>>
>>
>> Being able to limit the number of concurrent handlers is a reasonable
>> requirement, but why do you want to force such a small value by default?
>> What is the bottleneck here, actually?
>>
>> As I see it, the whole idea of greenlet, Stackless etc. is to enable
>> concurrency in the hundreds of thousands on common hardware.
>
> Yeah, that's a reasonable point; I just picked essentially a random
> round number. ?My experience is that my own apps have gotten CPU-bound
> quickly with actual work and so can't meaningfully use more than about
> 1000 concurrently. (tagline for Eventlet: "it helps you get to 100% CPU
> utilization!") ?I probably have pretty CPU-bound workloads though, and
> should probably bump that number up. ?What about 10000?
>
> Thoughts from other folks on what concurrencies they use?
1. (that's why i don't like default values: people tend to think they
are somehow "proper") Man, it's an argument to the function. Just
forget that it has a default value and pass your favourite 300000
there. You only have 64K of sockets so enjoy IOError in the middle.
2. (about the number)
The guy forgot that serve() is about network connections. greenlet is
about 100-s of thousands *threads*. And it does handle that many. The
proposal to increase default size would actually make sense for
`GreenPool`, not for `serve`.
You have to do a lot of job to handle >20K of connections on a single
box. Because each connection take perceptible amount of system
resources, both RAM and CPU wise. Igor Sysoev (nginx author) once
posted a sample nginx configuration (along with highly tuned FreeBSD
kernel configuration) that sustain 9K active req/s along with 45K
passive keep-alive connections. So sum is 54K connections. This is
about an extremely optimized web server in C!
3. Sure, bumping default limit up to 10K would be a fun pun to C10K
problem [1]. :)
Leaving it same 1K or removing the default value ? all make equal
sense to me ? it's just not relevant so much as long as it's not a
constant but a setting. There are more important things.
[1]
http://www.kegel.com/c10k.htmlP.S.: list still is not configured properly (to add Reply-To header)
so people still send you private e-mails, right? ;)
> ______________________________<wbr></wbr>_________________
> Click here to unsubscribe or manage your list subscription:
>
https://lists.secondlife.com/<wbr></wbr>cgi-bin/mailman/listinfo/<wbr></wbr>eventletdev>
------------------------------
Message: 3
Date: Tue, 02 Mar 2010 00:08:15 -0800
From: "Ryan Williams (Which)" <
rdw@lindenlab.com>
Subject: Re: [Eventletdev] rollback
To: Sergey Shepelev <
temotor@gmail.com>
Cc: eventlet <
eventletdev@lists.secondlife.<wbr></wbr>com>
Message-ID: <
4B8CC76F.2000701@lindenlab.<wbr></wbr>com>
Content-Type: text/plain; charset=UTF-8; format=flowed
On 3/1/10 10:22 PM, Sergey Shepelev wrote:
> 3. Sure, bumping default limit up to 10K would be a fun pun to C10K
> problem [1]. :)
> Leaving it same 1K or removing the default value ? all make equal
> sense to me ? it's just not relevant so much as long as it's not a
> constant but a setting. There are more important things.
Yeah, my thoughts exactly on the pun.
> [1]
http://www.kegel.com/c10k.html>
> P.S.: list still is not configured properly (to add Reply-To header)
> so people still send you private e-mails, right? ;)
I prefer it that way because accidentally sending personal email on-list
is way worse than having to re-send if you forget to include the list.
------------------------------
______________________________<wbr></wbr>_________________
Eventletdev mailing list
Eventletdev@lists.secondlife.<wbr></wbr>comhttps://lists.secondlife.com/<wbr></wbr>cgi-bin/mailman/listinfo/<wbr></wbr>eventletdevEnd of Eventletdev Digest, Vol 27, Issue 1
******************************<wbr></wbr>************
相关推荐
[逆向工程资源].Syngress.Sockets.Shellcode.Porting.And.Coding.Reverse.Engineering.Exploits.And.Tool.Coding.For.Security.Professionals
Sockets-2.3.9.8.tar.gz
精彩编程与编程技巧-用Sockets发送电子邮件 ...
chrome.sockets.tcpServer.pdf, cordova-plugin-chrome-apps-sockets-tcpserver api文档,手册
Addison.Wesley.UNIX.Network.Programming.Volume.1.3rd.Ed.The.Sockets.Networking.API.eBook-LiB
Windows Sockets 规范及应用.pdf
C++ Sockets 2.3.9.9 修复了 HttpGetSocket 在获取内容字节为0时无法正常退出的问题,新编译器下一些 include 的问题。 C++ Sockets 是一个跨平台的 Sockets 库,实现包括 TCP、UDP、ICMP、SCTP 协议。已实现的应用...
UNIX Network Programming Volume 1 3rd Ed The Sockets Networking API 2004.chm
TCPIP.Sockets.in.Java.Second.Edition.pdf
Windows Sockets 规范及应用.doc 本教程适应了Windows、Internet及计算机网络普及的潮流,介绍了一套在Windows下网络编程的规范-Windows Sockets。这套规范是Windows下得到广泛应用
TCP.IP.Sockets.in.Java.2nd.Edition - 2008
Sockets-2.3.9.3第三方库,很强,很方便,值得一学
Sockets-2.3.9.8-doxygendocs.zip
This book is for people who want to write programs that communicate with each other using an application program interface (API) known as sockets. Some readers may be very familiar with sockets ...
Sockets-tutorial.tar.gz
To build today's highly distributed, networked applications and services, you need deep mastery of sockets and other key networking APIs. One book delivers comprehensive, start-to-finish guidance for ...
本书介绍了WINDOWS SOCKETS编程规范。