Message ID | 1657815462-14069-1-git-send-email-dai.ngo@oracle.com (mailing list archive) |
---|---|
Headers | show |
Series | limit the number of v4 clients to 1024 per 1GB of system memory | expand |
> On Jul 14, 2022, at 12:17 PM, Dai Ngo <dai.ngo@oracle.com> wrote: > > This patch series enforces a limit on the number of v4 clients allowed > in the system. With Courteous server support there are potentially a > lots courtesy clients exist in the system that use up memory resource > preventing them to be used by other components in the system. Also > without a limit on the number of clients, the number of clients can > grow to a very large number even for system with small memory configuration > eventually render the system into an unusable state. > > v2: > . move all defines to nfsd.h > . replace unsigned int nfs4_max_client to int > . kick start laundromat in alloc_client when max client reached. > . restyle compute of maxreap in nfs4_get_client_reaplist to oneline. > . redo enforce of maxreap in nfs4_get_client_reaplist for readability > . use bit-wise interger to compute usable memory in nfsd_init_net. > . replace NFS4_MAX_CLIENTS_PER_4GB to NFS4_CLIENTS_PER_GB. > . use all memory, including high mem, to compute max client. Hello Dai, I applied these two to NFSD's for-next branch for early adopters and other testing and review. > --- > > Dai Ngo (2): > NFSD: keep track of the number of v4 clients in the system > NFSD: limit the number of v4 clients to 1024 per 1GB of system memory > > fs/nfsd/netns.h | 3 +++ > fs/nfsd/nfs4state.c | 28 ++++++++++++++++++++-------- > fs/nfsd/nfsctl.c | 8 ++++++++ > fs/nfsd/nfsd.h | 2 ++ > 4 files changed, 33 insertions(+), 8 deletions(-) > -- > Dai Ngo > -- Chuck Lever
On 7/14/22 10:18 AM, Chuck Lever III wrote: > >> On Jul 14, 2022, at 12:17 PM, Dai Ngo <dai.ngo@oracle.com> wrote: >> >> This patch series enforces a limit on the number of v4 clients allowed >> in the system. With Courteous server support there are potentially a >> lots courtesy clients exist in the system that use up memory resource >> preventing them to be used by other components in the system. Also >> without a limit on the number of clients, the number of clients can >> grow to a very large number even for system with small memory configuration >> eventually render the system into an unusable state. >> >> v2: >> . move all defines to nfsd.h >> . replace unsigned int nfs4_max_client to int >> . kick start laundromat in alloc_client when max client reached. >> . restyle compute of maxreap in nfs4_get_client_reaplist to oneline. >> . redo enforce of maxreap in nfs4_get_client_reaplist for readability >> . use bit-wise interger to compute usable memory in nfsd_init_net. >> . replace NFS4_MAX_CLIENTS_PER_4GB to NFS4_CLIENTS_PER_GB. >> . use all memory, including high mem, to compute max client. > Hello Dai, I applied these two to NFSD's for-next branch for early > adopters and other testing and review. Thank you Chuck, -Dai > > >> --- >> >> Dai Ngo (2): >> NFSD: keep track of the number of v4 clients in the system >> NFSD: limit the number of v4 clients to 1024 per 1GB of system memory >> >> fs/nfsd/netns.h | 3 +++ >> fs/nfsd/nfs4state.c | 28 ++++++++++++++++++++-------- >> fs/nfsd/nfsctl.c | 8 ++++++++ >> fs/nfsd/nfsd.h | 2 ++ >> 4 files changed, 33 insertions(+), 8 deletions(-) >> -- >> Dai Ngo >> > -- > Chuck Lever > > >
On 7/14/22 10:56 AM, dai.ngo@oracle.com wrote: > > On 7/14/22 10:18 AM, Chuck Lever III wrote: >> >>> On Jul 14, 2022, at 12:17 PM, Dai Ngo <dai.ngo@oracle.com> wrote: >>> >>> This patch series enforces a limit on the number of v4 clients allowed >>> in the system. With Courteous server support there are potentially a >>> lots courtesy clients exist in the system that use up memory resource >>> preventing them to be used by other components in the system. Also >>> without a limit on the number of clients, the number of clients can >>> grow to a very large number even for system with small memory >>> configuration >>> eventually render the system into an unusable state. >>> >>> v2: >>> . move all defines to nfsd.h >>> . replace unsigned int nfs4_max_client to int >>> . kick start laundromat in alloc_client when max client reached. >>> . restyle compute of maxreap in nfs4_get_client_reaplist to oneline. >>> . redo enforce of maxreap in nfs4_get_client_reaplist for readability >>> . use bit-wise interger to compute usable memory in nfsd_init_net. >>> . replace NFS4_MAX_CLIENTS_PER_4GB to NFS4_CLIENTS_PER_GB. >>> . use all memory, including high mem, to compute max client. >> Hello Dai, I applied these two to NFSD's for-next branch for early >> adopters and other testing and review. > > Thank you Chuck, I forgot to mention that I will prepare the patches for pynfs to deal with NFS4ERR_DELAY on SETCLIENIID and EXCHANGE_ID. -Dai > > -Dai > >> >> >>> --- >>> >>> Dai Ngo (2): >>> NFSD: keep track of the number of v4 clients in the system >>> NFSD: limit the number of v4 clients to 1024 per 1GB of system >>> memory >>> >>> fs/nfsd/netns.h | 3 +++ >>> fs/nfsd/nfs4state.c | 28 ++++++++++++++++++++-------- >>> fs/nfsd/nfsctl.c | 8 ++++++++ >>> fs/nfsd/nfsd.h | 2 ++ >>> 4 files changed, 33 insertions(+), 8 deletions(-) >>> -- >>> Dai Ngo >>> >> -- >> Chuck Lever >> >> >>