On Sat, 19 Feb 2022, Chuck Lever III wrote: > > > On Feb 18, 2022, at 4:26 PM, Tom Talpey <tom@xxxxxxxxxx> wrote: > > > > > > On 2/18/2022 2:04 PM, Daire Byrne wrote: > >> > >> 2) Why is the default linux client slot count 64 and the server's is > >> 32? You can tune the linux client down and not up (if using a Linux > >> server). > > > > That's for Trond and Chuck I guess. > > For the Linux NFS server, there is an enhancement request open > in this area: > > https://bugzilla.linux-nfs.org/show_bug.cgi?id=375 > > If there are any relevant design notes or performance results, > that would be the place to put them. I wonder if I have a login there.. > > IIRC the only downside to a large default slot count on the > server is that it can waste memory, and it is difficult to handle > the corner cases when the server is running on a small physical > host (or in a small container). I would have a small default slot count (one page of slots??), which automatically grew when it reached some level - say 70% - providing the required kmalloc succeeded (with GFP_NORETRY or similar so that it doesn't try to hard). It would register a "shrinker" so that it could respond to memory pressure and scale back the slot count when memory is tight. Freeing slot memory would be not be quick as you might need to wait for the client to stop using it, so allocating new memory should be correspondingly sluggish. Shouldn't be too hard.... Definitely don't want a tunable for this. NeilBrown