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!!
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!!