Peter Higginson wrote:
> I don't think Linux can do that even if SIPp had the code. A few ports you
> could do with multiple processes but that is all without a coding exercise.
> Most times (in similar software we have) Linux gets overloaded above 1000
> ports in current use.
> 

That's true. I tested with up to 50k UDP sockets (multiple processes)
and a 2.6.x kernel and Linux showed a bad performance with high number
of sockets.

The kernel code for identifying a socket for incoming UDP has a hash
with size 256 entries and uses the UDP dest-port as key. This tends to
have lots of collisions with high number of sockets and decreases the
performance.

But, using UDP, one process can support lots of users with only one
UDP socket and lots of alias IP addresses.

Configure the alias IP addresses.
Create a socket() and bind() to INADDR_ANY with port 5060 (or so).

Using sendmsg() you are able to set the src-IP of the outgoing UDP
packet, so that it fits to the IP address of the Contact.

Using recvmsg() you can extract the dest-IP of the incoming UDP
packet, so that you can identify the addressed user.

Both functions are POSIX.

So the most performing way to have UDP and to handle lots of
different users is to have different IP addresses with same port.

The new encapsulation of the socket stuff "structure (sipp_socket)"
by Charles P. Wright might allow an easy integration of this approach
(I didn't have the time to look into the new code).

N.B.: the kernel's hash for TCP also uses the dest-IP for calculating
      the key into the hash. The hash size is about 4k entries then.

N.B.: recvmsg() can trigger the kernel to insert a time-stamp, when the
      IP packet has arrived from the NIC.

Best regards,
Tony

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Sipp-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sipp-users

Reply via email to