Issue READIRPLUS calls with a sensible dircount maxcount ratio
The NFS spec states: "The ratio of the directory entry size to the size of the attributes plus the size of the file handle is usually at least 8 to 1." Though implementation dependent the spec implies that the previous 1 to 1 ratio could have a detrimental impact on the performance of the server due to most of the data per VOP_READDIR call being wasted. The Linux kernel uses the 8 to 1 ratio. Signed-off-by: Stefan Blanke <stefan.blanke@framestore.com> Signed-off-by: Mark Hills <mark.hills@framestore.com>libnfs-4.0.0-vitalif
parent
ab1af6953c
commit
4a58e61455
|
@ -697,7 +697,7 @@ int rpc_nfs_readdirplus_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3
|
|||
args.cookie = cookie;
|
||||
memcpy(&args.cookieverf, cookieverf, sizeof(cookieverf3));
|
||||
args.dircount = count;
|
||||
args.maxcount = count;
|
||||
args.maxcount = count * 8;
|
||||
|
||||
return rpc_nfs3_readdirplus_async(rpc, cb, &args, private_data);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue