1821067 Members
2531 Online
109631 Solutions
New Discussion юеВ

sendq size

 
SOLVED
Go to solution
Manoj P.U._1
New Member

sendq size


Hello
Can anybody help to find the maximum size of Send-Q that it can grow before closing the socket connection?

This problem (dropping socket connection) is occurring in hp-ux 11.00 with Java based Application (Socket programming)

Thanks

Manoj


9 REPLIES 9
T G Manikandan
Honored Contributor

Re: sendq size

U.SivaKumar_2
Honored Contributor

Re: sendq size

Hi,

To find the current max value do this,
#ndd -get /dev/tcp tcp_connec_request_max

Increase the value .
#ndd -set /dev/tcp tcp_connec_request_max 2048

Make entries in /etc/rc.config.d/nddconf file
TRANSPORT_NAME[]=tcp
NDD_NAME[]=tcp_connec_request_max
NDD_VALUE[]=2048

to make setting permanent even after
reboot.

regards,
U.SivaKumar



Innovations are made when conventions are broken
Manoj P.U._1
New Member

Re: sendq size

Hi Sivakumar

you are telling about the maximum number of request from a client that can be accepted by server tcp_conn_request_max.

But I need the maximum limit of Send_Q in tcp socket in server client tcp communication.


Thanks for reply

Manoj

U.SivaKumar_2
Honored Contributor

Re: sendq size

Hi,

DO this please.

#/usr/sbin/ndd -set tcp_syn_rcvd_max 2000

Make approriate entries in nddconf also

regards,
U.SivaKumar


Innovations are made when conventions are broken
Manoj P.U._1
New Member

Re: sendq size

Hi shivakumar

You are giving solution to keep the socket connection for long time. But I don't want to do that because the application is developed in that way, it will close the connection if it cannot write to the socket.


In which location you are working in HCL, I am in Mumbai, HCL.

Thanks

Manoj
Helen French
Honored Contributor

Re: sendq size

Daa Manoj,

Just got the message from CTK. Did you check the command 'netstat'. This command will tell you the value of Send-Q at the third column:

# netstat
Life is a promise, fulfill it!
U.SivaKumar_2
Honored Contributor
Solution

Re: sendq size

Hi,

I think you can understand that parameter tcp_syn_rcvd_max perfectly now.

Maximum SYN received parameter limits the socket queue because it will drop connections
when it exceeds the value.

Moreover I have done lot of R&D on this paramter . So you have to belive me ;-)

To Reinforce my arguments , I would like to quote a reference from my collection:-

"While great effort is undertaken to defend any network from those with malicious intent, several ports (largely TCP) must remain open to conduct business. Internet vandals may attempt to exploit these ports to launch a denial of service attack. One of the most popular attacks remains the SYN flood, wherein the socket queue of the attacked host is overwhelmed with bogus connection requests. To defend against such attacks, certain UNIX variants maintain separate queues for inbound socket connection requests. One queue is for half-open sockets (SYN received, SYN|ACK sent), the other queue for fully-open sockets awaiting an accept() call from the application. These two queues should be increased so that an attack of low to moderate intensity will have little to no effect on the stability or availability of the server.

A. AIX

/usr/sbin/no -o clean_partial_conns=1

This setting will instruct the kernel to randomly remove half-open sockets from the q0 queue to make room for new sockets.

B. Solaris

/usr/sbin/ndd -set /dev/tcp tcp_conn_req_max_q 1024

The q queue holds sockets awaiting an accept() call from the application.

/usr/sbin/ndd -set /dev/tcp tcp_conn_req_max_q0 2048

The q0 queue contains half-open sockets.

C. Tru64 UNIX

/sbin/sysconfig -r socket sominconn=65535

The value of sominconn determines how many simultaneous incoming SYN packets can be handled by the system.

/sbin/sysconfig -r socket somaxconn=65535

The value of somaxconn sets the maximum number of pending TCP connections.

D. HP-UX

/usr/sbin/ndd -set tcp_syn_rcvd_max 1024
/usr/sbin/ndd -set tcp_conn_request_max 200


I know you , I was working in mumbai now transfered to Coimbatore. I was with sudheesh varma in RBI.

regards,
U.SivaKumar


Innovations are made when conventions are broken
Manoj P.U._1
New Member

Re: sendq size



Hi

Shiju, Ethu message anu nokkendathu ?

Shiva, Now I got yoy and nice to meet you in this forum. How is your health??

Warm regards

Manoj


U.SivaKumar_2
Honored Contributor

Re: sendq size

Hi,

My health is almost OK now. Thanks . Keep in touch. Convey my regards to all.

regards,
U.SivaKumar
Innovations are made when conventions are broken