Can somebody please help understand the working and usage difference between accept() vs qsostartaccept() in ? To me it appears like i can live with accept and qsostartrecv, IOCP and bunch of worker threads in a never ending loop to support simultaneous clients. What am I missing if am not using qsostartaccept ?
WHILE(ServerSwitch == *On)
client_sd = accept(listen_sd.....)
This topic has been locked.
2 replies Latest Post - 2012-09-03T13:38:49Z by Prithiviraj
Pinned topic High performance scokets : Accept() Vs QSOStartAccept()
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2012-09-03T13:38:49Z at 2012-09-03T13:38:49Z by Prithiviraj
Kent_Bruinsma 060000AHAY1 PostACCEPTED ANSWER
Re: High performance scokets : Accept() Vs QSOStartAccept()2012-08-31T19:02:45Z in response to PrithivirajUsing QsoStartAccept() eliminates dedicated threads that spend 99% of their time blocked on an accept() call. The dedicated threads have a "cost" in system/process resources. Dormant threads incur a cost as they wake up and have their resources paged into memory and cache lines. Having "hot" threads process the intermittent new connections along with the more consistent data processing is more efficient. Conceptually it is easy to see the benefits but in practice it is difficult to measure or quantify.
If high performance is important, then working QsoStartAccept() into the design is helpful to the overall picture. However, QsoStartAccept() will not make or break the performance of the application on its own.
Prithiviraj 270001CEBX3 PostsACCEPTED ANSWER
Re: High performance scokets : Accept() Vs QSOStartAccept()2012-09-03T13:38:49Z in response to Kent_BruinsmaThanks for the reply Kent,
While I understand that QsoStartaccept() isn't blocking I/O plus threads are dormant, i dont get how qsostartRecv() should work after the qsostartaccept() call... i took the example from IBm site and changed it to support complete Async I/O, where qsostartrecv gets control and fails with return code -1 / 3450 when no active clients. But ideally server should go back to listening mode.
Do you have a C example to share ?