[SDL] [SDL_net] Limits
clemens at 1541.org
Sun Jan 8 02:56:41 PST 2006
"IraqiGeek" <geek at IraqiGeek.com> wrote:
> On Sunday, January 08, 2006 1:38 AM GMT,
> Simon <simon.xhz at gmail.com> wrote:
> > Can you tell me how you can handle more than 2000 connections to you
> > server, without the need for maxing out the amount of RAM in the PC?
i don't see why 2000 should be the limit in any way. yes, if you expect
to have really many simulatanious connections to the server all the
time (tens or hundreds of thousends), another solution might be better
because each connection means an additional thread with its seperate
process context, stack aso.
> forget about maxing memory, how the heck is he able to handle up to
> 4GB body the MTU is 1500 bytes on LAN (8KB if you use jumbo frames on
> GbE), not to count all the TCP overhead, and still maintain "minimum
how much data you send is up to you you, it's just that the library
does not force any unnecessary low limits on you. minimum latency
means your application gets the data as soon as it is available
(completely). of course there are other ways to implement this (select)
but i prefered to use the blocking thread method. having only thread
is nice but then, if you have high traffic on your server and packets
get bigger (fragmented) and thus read() does not return the whole packet
(of your higher level protokoll) at once (what you never can rely on
anyway), things start to get complicated.
i wanted two things from my network lib: packets should always be
complete when deliverd and receive buffers should not be memcopied.
best regards ...
More information about the SDL