[Serdev] TCP problems

Katty Xiong cyyxiong at yahoo.com
Wed Jan 17 22:30:02 UTC 2007


Hi Andrei,

I am trying to root cause the problem that one CPU at
SER is saturated when using one TCP connection between
UAC and SER. I have 8 TCP child process, and I notice
two TCP child processes are doing work, the others are
idle. The two child processes are doing many send()
and read() system calls, and one TCP child process is
doing many more read() than the other one. I guess the
one doing more read() causes one CPU saturated at SER.


My understanding about this 2 child processes is: one
TCP child process is responsible for receiving data
through the connection between UAC and SER, another
one is responsible for receiving data through the
connection between UAS and SER. Both TCP child
processes can use either two connections to send data.
Is this understanding correct? If this is correct, how
can I explain why one TCP process is doing more read()
than another one? 

I don't quite understand how SER relays data using TCP
connections. Is the following right? The TCP main
processes keeps a complete list of all TCP
connections. TCP child process has a partial list of
TCP connections. When a TCP child needs a connection
to send data, it will first check its own list to see
if it has the connection. If not, it then asks the
main TCP process for the connection information.

Thanks a lot,
Joy

--- Andrei Pelinescu-Onciul <andrei at iptel.org> wrote:

> On Jan 16, 2007 at 11:28, Katty Xiong
> <cyyxiong at yahoo.com> wrote:
> > 
> > Hi Andrei,
> > 
> > > 
> > > > I notice SER and UAS always has one
> > > > connection whether we have one or 2 SIPp
> instance
> > > for
> > > > UAC. Is this tunable?
> > > 
> > > No, ser would always try to use an already
> existing
> > > connection (as
> > > recommended by the rfc) => only one connection
> will
> > > be used for the same
> > > UAS (there is an exception, if there is no
> > > connection open and two
> > > connection request come simultaneously, 2
> different
> > > connections might be
> > >  temporarily opened, but only one of them will
> > > survive).
> > 
> > I understand SER always tries to use an existing
> > connection to the same UAS. But in my case, I
> > configure SIPp UAC to invite multiple UASes, which
> is
> > simulated in one SIPp instance. I don't quite
> > understand I still see one connection between SER
> and
> > SIPp in this case.
> > 
> > Could you help me understand this?
> 
> If the sipp instance uses the same ip and port for
> all the simulated
> UASes, then ser will use a single connection.
> When ser wants to send a message over tcp to some
> address:port, it first
> checks if a connection already exist and if it does
> it uses it.
> If you use tcp aliases (e.g. force_tcp_alias() or
> tcp_accep_alias=yes + 
>  alias in the incoming messages Via), then ser will
> also look in the
>  aliases list (e.g. if 1.2.3.4:32768 is an alias for
> 1.2.3.4:5060 and
>  a connection to 1.2.3.4:32768 is already open, ser
> will use this
>  connection also for messages for 1.2.3.4:5060).
> 
> 
> Andrei
> 



 
____________________________________________________________________________________
No need to miss a message. Get email on-the-go 
with Yahoo! Mail for Mobile. Get started.
http://mobile.yahoo.com/mail 


More information about the Serdev mailing list