[YBA] TCP connection rate

[YBA] TCP connection rate

Gilad Ben-Yossef gilad at codefidence.com
Mon Feb 2 16:29:23 IST 2009


Jonathan Ben Avraham wrote:

> Dear list members,
> What limits the rate that the Linux kernel TCP stack can accept new 
> connections? How is that rate related to the rate that the application 
> listening on a port can handle the connections? That is, if I try to 
> connect and get ECONNREFUSED is there a way for me to know if I got it 
> because the kernel could not handle the connection rate or if I got it 
> because I had more connection attempts than the backlog parameter of 
> my listen() call? In other words, do I need to tune the kernel or the 
> application (MySQL) for the desired high connection rate and how would 
> I know?

Just check what the value of the backlog parameter is and then use 
netstat to watch the application connections when you get ECONNREFUSED 
error. If the number of connections in netstat is equal (or at least 
very close to) the backlog parameter then it's the backlog parameter, 
otherwise it's something else.

Gilad

-- 
Gilad Ben-Yossef 
Chief Coffee Drinker

Codefidence Ltd.
The code is free, your time isn't.(TM)

Web:    http://codefidence.com
Email:  gilad at codefidence.com
Office: +972-8-9316883 ext. 201
Fax:    +972-8-9316885
Mobile: +972-52-8260388

	The Doctor: Don't worry, Reinette, just a nightmare. 
	Everyone has nightmares. Even monsters from under the 
	bed have nightmares, don't you, monster?
	Reinette: What do monsters have nightmares about?
	The Doctor: Me! 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.cs.huji.ac.il/pipermail/linux-il/attachments/20090202/872804d6/attachment.html>


More information about the Linux-il mailing list