Skip to contentSkip to conversation

NFS over TCP: random drop

DISCUSSION Olaf Kirch 2 participants 2 messages Mar 16, 2004

Subsystems (2)
lore
Share & tools
lore

Olaf Kirch

author
#0 lore raw

Hi,

I am looking into an NFS problem at one of our customers. They are running NFS over TCP, and the client is some kind of mainframe OS.

What happens is this:

client: initiates connections, 3way handshake completes
server: closes connection (FIN)
client: (at the same moment) sends data to server
server: RST
client: argh (reports EIO to application)

What seems to happen here is the random connection drop in svcsock.c, where we randomly drop a connection if the total number of TCP connections exceeds (nrthreads + 3) * 10. "Randomly" here means either the oldest connection, or the newest one (which happens to be the one we just accepted).

The specific problem we have here is that the client doesn't grok TCP RSTs generated by the server. It's arguably a client bug, but I'm nevertheless thinking about a way to work around this

Possible solutions:

- always drop the oldest connection. The current strategy doesn't
help much against DoS anyway, because rather than dropping old connections for _every_ new one, we drop them for every two new connections. Big improvement :)

- Create a sysctl that allows to set a hard limit for active
TCP connections.

- increase the "random drop" threshold to something like
(nrthreads + 3) * 100.

Any comments?

Olaf

Signature · 13 lines
Olaf Kirch     |  Stop wasting entropy - start using predictable
[email protected]   |  tempfile names today!
---------------+ 


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
NFS maillist  -  [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
#1 lore raw

P=E5 ty , 16/03/2004 klokka 06:11, skreiv Olaf Kirch:

Quoted 7 lines

Hi,
=20
I am looking into an NFS problem at one of our customers. They are running NFS over TCP, and the client is some kind of mainframe OS. =20
What happens is this:
=20

Quoted 8 lines

client: initiates connections, 3way handshake completes
server: closes connection (FIN)
client: (at the same moment) sends data to server
server: RST
client: argh (reports EIO to application)
=20
What seems to happen here is the random connection drop in svcsock.c, where we randomly drop a connection if the total number of TCP connection=

s

Quoted 5 lines

exceeds (nrthreads + 3) * 10. "Randomly" here means either the oldest connection, or the newest one (which happens to be the one we just accepted).
=20
The specific problem we have here is that the client doesn't grok TCP RST=

s

Quoted 2 lines

generated by the server. It's arguably a client bug, but I'm nevertheless thinking about a way to work around this

It would be a client bug if this was happening on hard mounts, but I assume this is "soft"?

Cheers,
Trond

-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs