Hi,
  Im away to do a IOCP TCP application. I read that its recommended to only have the NumberOfConcurrentThread parameter within the CreateIOCompletionPort(..) to 0, informing the system to allow as many threads as there are processors in the system. Does this mean that I can only have same number of worker threads that are processors? Or does it mean that the operating system only creates itself, these number of threads to deal with the IOCP before the worker threads are passed the info.?
 
I am then going to create working threads to service the IOCP.  Within my application service routines, there will be database activities, so I was going to create 4 working threads, hopefully to get good throughput speed. Is this a feesable thing to do? or is it better to only have 1 worker thread per processor too? 
IIRC the recommended number was 2 * CPU count.  You can get away with any number (including 0 which gives the control to the OS) but 2 * CPU count must give you the best performance.  There are several decent articles in the MSDN on this topic.  Search for "I/O Completion Ports".
Behold the believers of all beliefs! Whom do they hate most? The man who breaks up their tables of values, the breaker, the law-breaker - yet he is the creator.
-Thus Spoke Zarathustra, F. W. Nietzsche
_______________________________________________
msvc mailing list
[EMAIL PROTECTED]
See http://beginthread.com/mailman/listinfo/msvc_beginthread.com for 
subscription changes, and list archive.

Reply via email to