Threaded Server Load Capacity



Hi there
I'm just new to socket programming and my new work forces me to have
immediate proficiency with it. I am currently reading Beej's tutorials
and hopefully finish it ASAP. But I have few questions to ask first:
1) can a multithreaded server be able to handle 1600 clients
concurrently using TCP connections? If not how many? I need to create
a prototype server and benchmark how many connections it can have? I
have found a source here: http://cs.ecs.baylor.edu/~donahoo/practical/CSockets/textcode.html
I used the ff. sources:
HandleTCPClient.c
CreateTCPServerSocket.c
AcceptTCPConnection.c
TCPEchoServer-Thread.c

Basically from what I have understand, I will just customize the
HandleTCPClient.c for what I need. Is the code really all I need?

2) The second problem is how can I simulate about 1600 clients
connecting concurrently to the server? I found a code in a book, i
forgot the title (something like Unix Socket Programming), a TCP
client can "spawn" connections using fork to benchmark different
socket programming approach (ie. fork, threading, pre-threading, etc).
However I always got an error if I i spawn about 15 children. I really
don't know if the problem is with the client or with the server. I
found it weird, when i run the server in one box and 2 clients (same
box and another one) with 10 child spawns, the program ended without
an error. However if I run the server and run 1 client with 15 spawn
(either in the same box or another) I encounter "cannot allocate
memory", basically having problems with pthread_create(). Does anyone
have another client program that can simulate multiple connections? Or
any suggestions on how to test the server's load?

Sorry for bothering but I really need help. Thanks in advance!

.



Relevant Pages

  • Re: Network intermittently dropping the connection to shared files on server
    ... what we were using with our SBS2000 server with no problems. ... It's a small Server plus 4 Client W/S set up in one office. ... All users that have current connections to the shared files are ... We have a small network < 5 clients connected to a new Dell ...
    (microsoft.public.windows.server.sbs)
  • Re: Socket programming in asp.net ?
    ... about the client itself is often complex. ... server, and your client machines will more than likely be behind NATs, ... this data received from IIS server machine. ... socket programming concepts in c# will be ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: TCP server stop receiving new connections
    ... reset the event mask of your listening socket each time you ... I have a strange problem in my class library used by all our client ... server applications. ... incomming connections, but keeps current connections. ...
    (microsoft.public.win32.programmer.networks)
  • Re: RTC remoting > Explained in 11 minutes
    ... transport components for connections between clients and servers. ... server response but also server request (to client) -> client response) ... handed off to the different attached plugin command handlers which have ...
    (borland.public.delphi.thirdpartytools.general)
  • Re: Network intermittently dropping the connection to shared files on server
    ... ISA Server detected routes through adapter Loopback that do not correlate ... It's a small Server plus 4 Client W/S set up in one office. ... All users that have current connections to the shared files are ... We have a small network < 5 clients connected to a new Dell ...
    (microsoft.public.windows.server.sbs)