Setting NFS tuning parameters at boot

Tactoad

Active Member
Aug 11, 2021
5
0
41
48
Sweden
www.epm.se
Hi folks,

Running NFSv3 on Netapp and need to tune sunrpc values for the mounts.
The parameters I'm trying to change are sunrpc.tcp_slot_table_entries = 128 and sunrpc.tcp_max_slot_table_entries = 128 for the sunrpc module.

I've tried to change sysctl.conf and defining entries in modprobe.d and forcing the module to load in modules-load.d.
For some reason the values does not set. I'm guessing its the order on how stuff loads. They are set if I do a sysctl -p manually.

Ideas anyone?
 
You talk about these values in OnTap or your nfs v3 clients ? Nevertheless I don't think you reach any real win by measurement of throughput or latency.
 
pve has default operating range from 2 to 65k :
sysctl -a|grep sunrpc.tcp|grep slot
sunrpc.tcp_max_slot_table_entries = 65536
sunrpc.tcp_slot_table_entries = 2

We do all on nfs so there's lot's of rpc traffic but not 1 message about in nodes: log/*, maybe you are looking at a follow on problem ?
Which event log on - which client OS or Ontap ?
 
Last edited:
pve has default operating range from 2 to 65k :
sysctl -a|grep sunrpc.tcp|grep slot
sunrpc.tcp_max_slot_table_entries = 65536
sunrpc.tcp_slot_table_entries = 2

We do all on nfs so there's lot's of rpc traffic but not 1 message about in nodes: log/*, maybe you are looking at a follow on problem ?
Which event log on - which client OS or Ontap ?
The event pops up on the netapp side. I have temporarily set the values on the PVE hosts so the errors have gone away. However they wont be applied if the node is rebooted, hence my question of a good way to define them automatically at boot.
 
Ok, so far good to know. And somethink like /etc/sysctl.d/90-mysettings.conf would be prefered without conflicting by os updates woth /etc/sysctl.conf but as you said don't work correctly ... yes, systemd boots faster than SysV init concept but the default rules which should be done after others are again and again bullshit as you see also ... and you cannot finetune all these package unit files that all works fine ... and that gone away with next update and same murks again in system. Do your own named systemd service with unit file which set the the parameter in the runtime after a reboot to solve your request.
 
Hello waltar, Tactoad,

We have exactly this issue so thank you for the guidance. I have managed to make the rpc setting take affect on reboot, i.e. make it persistent. The clues where in the manpage for sysctl.d. You need to force the sunrpc module to load at boot, otherwise the setting in the relevant sysctl.d conf file doesn't get applied. Either they are ignored because the module isn't loaded yet, or are reset to default when the module is loaded, I don't know which. Anyway, here is my recipe:

root@vmhost-dev-a-01:~# cat /etc/sysctl.d/90-ontap-max-slot.conf
# Limit number of outstanding NFS requests to 128 for ONTAP
sunrpc.tcp_max_slot_table_entries = 128

root@vmhost-dev-a-01:~# cat /etc/modules-load.d/90-sunrpc.conf
# Load the sunrpc module at boot so we can limit the max slot size using sysctl.d
sunrpc

Hope that helps others who are looking for a solution to this.

Mark
 
Hello waltar, Tactoad,

We have exactly this issue so thank you for the guidance. I have managed to make the rpc setting take affect on reboot, i.e. make it persistent. The clues where in the manpage for sysctl.d. You need to force the sunrpc module to load at boot, otherwise the setting in the relevant sysctl.d conf file doesn't get applied. Either they are ignored because the module isn't loaded yet, or are reset to default when the module is loaded, I don't know which. Anyway, here is my recipe:

root@vmhost-dev-a-01:~# cat /etc/sysctl.d/90-ontap-max-slot.conf
# Limit number of outstanding NFS requests to 128 for ONTAP
sunrpc.tcp_max_slot_table_entries = 128

root@vmhost-dev-a-01:~# cat /etc/modules-load.d/90-sunrpc.conf
# Load the sunrpc module at boot so we can limit the max slot size using sysctl.d
sunrpc

Hope that helps others who are looking for a solution to this.

Mark

We ended up defining the parameters on the grub cmdline. Not as clean as your solution so thanks for the update.