On 6/14/06, Francois Piette <[EMAIL PROTECTED]> wrote:
>
> >> OK, but what if I want one thread per CPU?
> >>
> >> So if I have a 4 CPU rig and 400 connections, I want to
> >> have 4 threads and 100 connections per thread.
> >> But if the load increases to 600 connections, I want to
> >> have 4 threads and 150 connections per thread.
>
> > This si not a winsock or TCP/IP component issue. It is an OS issue. I
> don't
> > know Windows has an API to force a thread to run on a given CPU. You
> have an
> > API to know the number of processors.



Sorry, I wasn't clear enough.  I want to be able to balance connections over
threads.
So instead of having 100 connections per thread, and then creating a new
thread, and then
another 100 connections, and so on...   I want to have 4 threads and have
(number of connections at this present moment) / 4 connections per thread.

It is probably too much to ask for connections to migrate threads in
response to loading,
but it would be nice if new connections picked the thread that had the
fewest connections.
So I want to have a fixed number of threads, but balance the connections
evenly over those
threads.


Also, what is the behaviour of UDP and multiple threads?


Thankyou
David Hooker
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to