HomeFreeBSD

nfscl: Add vfs.nfs.maxalloclen to limit Allocate RPC RTT

Description

nfscl: Add vfs.nfs.maxalloclen to limit Allocate RPC RTT

Unlike Copy, the NFSv4.2 Allocate operation does not
allow a reply with partial completion. As such, the only way to
limit the time the operation takes to provide a reasonable RPC RTT
is to limit the size of the allocation in the NFSv4.2
client.

This patch adds a sysctl called vfs.nfs.maxalloclen to set
the limit on the size of the Allocate operation.
There is no way to know how long a server will take to do an
allocate operation, but 64Mbytes results in a reasonable
RPC RTT for the slow hardware I test on, so that is what
the default value for vfs.nfs.maxalloclen is set to.

For an 8Gbyte allocation, the elapsed time for doing it in 64Mbyte
chunks was the same as the elapsed time taken for a single large
allocation operation for a FreeBSD server with a UFS file system.

(cherry picked from commit 9ebe4b8c67bf823e62617ba9fbd3c9c1768c8b3b)

Details

Provenance
rmacklemAuthored on Sep 16 2021, 12:29 AM
Parents
rG501cf43202a2: UPDATING: Add entry for commit a599f9f7620b
Branches
Unknown
Tags
Unknown