Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Nov : Re: Support a large amount of clients and lower CPU cost?

www.cryer.info
Managed Newsgroup Archive

Re: Support a large amount of clients and lower CPU cost?

Subject:Re: Support a large amount of clients and lower CPU cost?
Posted by:"Remy Lebeau (TeamB)" (no.spam@no.spam.com)
Date:Thu, 1 Nov 2007 11:45:47

"H Visli" <h_visli@gmail.com> wrote in message
news:956105b314d018c9eab6ba88789e@newsgroups.borland.com...

> Anybody can give me some advice or experience, can
> support a large amount of clients at the same time, and
> the CPU expenses can control more low?

For large scale servers, don't use a single thread per client.  If a lot of
clients are connected at the same time, that is a lot of threads running,
and a lot of task switching for the CPU to do.  Look into using sockets in
asynchronous Overlapped I/O mode for maximum scalability (I don't know if
Synapse supports that - you may have to code for WinSock directly).  You may
also want to investigate using fibers instead of threads as well, as you can
have multiple fibers running in the context of a single thread.


Gambit

Replies:

none

In response to:

www.cryer.info
Managed Newsgroup Archive