Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

8-)winsock question on select() and IOCompletionPort

Status
Not open for further replies.

tzhong

MIS
Mar 22, 2001
11
US
I'm going to port some program from solaris to win32, and wrote two little programs to compare the performance between IOCompletionPort and windows select() with only ONE worker thread. As expected, their performance are close. But to my surprise, for the one using select()to poll socket status, every time when the number of connections
reaches 400~800, connection requests begin to get refused. I am using select() with zero timeout to emulate Non-Blocking I/O, the server machine(win2000 server) has 4G memory and 2 933M cpus.

MSDN says that we can redefine FD_SETSIZE to set the max number of File handles. I tried both bigger number (1024) and leaving it alone(default: 64), but alway get the same behaviors: It doesn't matter at all, and the limit is
not a fix number either.

The IOCP works just fine, no matter how many concurrent connections are posted. But once I return from GetQueuedCompletionStatus(), how do I know whether it's a read or write?

Please help, Gurus!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top