I wrote two little programs to compare the performance between IO Completion Port 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 some 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. And the IOCP server works just fine, no matter how many concurrent connections are posted.
So what's going on with select() on windows? Please help Gurus!!
to poll socket status, every time when the number of connections reaches some 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. And the IOCP server works just fine, no matter how many concurrent connections are posted.
So what's going on with select() on windows? Please help Gurus!!