Re: RPC UDP message size limit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> On Jun 4, 2018, at 11:26 AM, Robbert Eggermont <R.Eggermont@xxxxxxxxxx> wrote:
> 
>> 8KB seems to be a documented limit for UDP.
> 
> I tried to find documentation for this limit, but all I found was one reference to SunOS (of course), because of incompatible network hardware.

The text I quoted you is from the Linux man page for clnt_create(3).


> The real limit (based on the 16-bit length field defined in RFC 768, 1980) is 65507 bytes (plus headers, for UDP over IPv4).

That's the architectural limit. There's also a practical limit
that is much lower.

UDP datagrams have to be re-assembled from smaller frames. The IP
layer does that using a 16-bit ID header field and verifies the
re-assembly with a weak checksum. It's pretty easy to fool the
checksum by assembling the frames out of order, which can happen
if the ID header value wraps.

There are other problems that make UDP problematic for any RPC
program that relies on the datagram to contain the correct data
in the correct order.

To mitigate these problems, the maximum size of UDP frames is
reduced. IMO 8KB + a handful is about as large as we ever want to
go in the general case.


>> However, using TCP would immediately work around the UDP message size
>> limit. But perhaps the filer is not allowing a TCP connection for the
>> MNT service?
> 
> TCP is not working for us at this moment (because of firewalling), so UDP is used as the fallback (as designed).
> 
> In our case, I'ld rather have the fallback fail because of a real hardware incompatibility than of an artificial software limit... ;-)

Making a library change that impacts all RPC consumers is IMO
quite inappropriate, for the reason explained above. The
preferred way to address this is to increase the UDP message
size limit only for showmount.


>> IIUC showmount could use the clnt_{vc,dg}_create(3) APIs instead of
>> the generic clnt_create(3) API to specify a larger message size limit.


Can you try this suggestion and let us know if it's effective?


--
Chuck Lever
chucklever@xxxxxxxxx



--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux