# NFS server threads



## bramvd (Mar 17, 2013)

Hi,

We have a NFS server with ~30 active clients. In Solaris and Linux it's useful to tune the amount of NFS servers threads so I also wanted to adjust it in FreeBSD.

I found two options:

setting the nfs_server_flags with -n in rc.conf: 
	
	



```
nfs_server_flags="-t -n 32"
```

sysctl also has two options: vfs.nfsd.maxthreads and vfs.nfsd.minthreads

What's the difference between these two settings?

Thanks.


----------



## bramvd (Mar 17, 2013)

Sorry for not using the code and file tags. I keep it in mind for my next posts.


----------



## nezumigeek (Mar 25, 2013)

I look at it this way: sysctl's will let you adjust on the fly. nfs_server_flags will only be read at the start. I would suggest only doing sysctl. But this is my opinion.


----------



## throAU (Mar 26, 2013)

nezumigeek said:
			
		

> I look at it this way: sysctl's will let you adjust on the fly. nfs_server_flags will only be read at the start. I would suggest only doing sysctl. But this is my opinion.




I'd suggest using sysctl until you find the setting you want, and then sticking it in rc.conf along with the bulk of your other system configuration settings.

Sure, you could stick the setting in /etc/sysctl.conf, but I try to use that only for settings that I can't put in /etc/rc.conf - so that as much of my configuration as possible is together.


----------

