|
-
September 26th, 2011, 09:44 AM
#1
Server to Client(s) best performance approach question
I just have a question out of curiosity :
whats the best approach when dealing with massive clients and a select() call?
as far as i know if we got about 1000+ connections and call select() to read and select() to write all the time it's gonna consume a looot of CPU right?
since i cannot test this myself, does any of you know if asynchronous methods kill your cpu the same way?
whats by your oppinion the best approach on dealing with such things?
-
September 26th, 2011, 04:41 PM
#2
Re: Server to Client(s) best performance approach question
Which OS?
On Windows, the size of the FD_SETs is limited to 64, and hence the maximum number of clients that can be checked in a single call to select() is also 64. (It's possible to change the max size, but hardly worth it because of performance issues.)
In Windows, therefore, a select-based architecture is a poor choice for a server designed to serve 1000+ connections simultaneously.
For this, the hands-down winner in Windows is IOCP.
See this thread for a chart showing a comparison of various architectures (e.g., select, WSAAsyncSelect, WSAEventSelect, overlapped completion routines, IOCP) available under Windows: http://www.codeguru.com/forum/showth...05#post1182005
Mike
-
September 26th, 2011, 07:10 PM
#3
Re: Server to Client(s) best performance approach question
thanks mike
i'll give it a look
---
but do u have any suggestion for UNIX OSes ?
Last edited by JacobNax; September 26th, 2011 at 07:13 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|