Comments (5)
One potential fix could be to follow what knfsd does and keep the expired sessions in memory. i.e.
NFSv4 "Courteous Server" as part of Linux 5.19 NFSD.
https://www.phoronix.com/news/Linux-5.19-NFSD-Courteous
With the current Ganesha code design, solution for this issue would be to keep expired clients until the number of expired clients is within some limits (like knfsd does).
- We need to keep track of all expired clients in LRU fashion.
- Pick the oldest expired clients when the number of clients exceeds the max limit, and clean them up
- Also, if required, may need to keep track of the amount of state the client owns. If it has large number of opened files, we may not want to hold the memory for a client that has gone away.
from nfs-ganesha.
Hmm, this actually sounds like a client bug that happens to be masked by the kernel's Courteous Server implementation.
I do want to get Courteous Server implemented sometime, but we have limited resources for Ganesha development.
Not expiring clients without a Courteous Server implementation however is not a good solution. Another client would be prevented from acquiring conflicting state (locks and opens) while an unexpired (but hasn't renewed in time) client holds state.
from nfs-ganesha.
Yeah, agree...
In continuation with the solution discussed above, with our Ganesha code/design we should as well, be able get the above logic of granting states to new client(conflicting with the expired client)...Will spend some time on it...
from nfs-ganesha.
Have implemented the courteous server features by keeping the expired client in memory and avoiding expiring clients post lease period, unless the number of unresponsive clients go over a limit. Ganesha keeps track of all expired clients in LRU fashion and picks the oldest expired client when the number of clients exceeds the max limit. This allows Ganesha to retain the open & lock state and thereby helping certain client workloads like MLPerf to run smoothly, even after a network partition or client bugs...
Also with this courteous server implementation, a client would be allowed acquiring conflicting state (locks and opens) while an unexpired (but hasn't renewed in time) client holds state...
Have verified above mentioned scenarios of avoiding expiring client retaining the open & lock states, then expiring then after reaching threshold and also conflicting access from another clients...
Posting the patch for review : https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/1169897
from nfs-ganesha.
Merged in V6-dev.2, closing
from nfs-ganesha.
Related Issues (20)
- possible lock starvation in lock conflict scenerio HOT 2
- Add testing instructions to CONTRIBUTING_HOWTO.txt HOT 1
- Using the DBUS to dynamically update protocols of export, changed from 3 to 3, 4, not in effect. HOT 15
- Ha cluster config HOT 1
- [Question] How does nfs-ganesha avoid state reclaimed in edge conditions? HOT 13
- [Question] Is there replay cache for NFS v3 or NFS v4.0 in nfs-ganesha? HOT 2
- Unable to git clone on top of NFS share with Ganesha v6. HOT 2
- How to close socket when socket idle ? HOT 4
- NFSv4 ACL support in FSAL_VFS but without VFS_POSIX_ACL / USE_ACL_MAPPING HOT 8
- 5.7: build fails with `USE_GTEST=ON` HOT 1
- Potential bug: lost export_ops->unexport() if export_ops->lookup_path() fails HOT 2
- ganesha crash in Protocols/NFS/nfs3_create.c HOT 3
- ganesha crash while deleting lock_entry->sle_list in 4.3 HOT 3
- v5.7 packages for SLES15 ? HOT 1
- 5.9: FileNotFoundError: [Errno 2] No such file or directory: 'dist/ganesha-top-5.9-py3-none-any.whl' HOT 4
- ganesha thread is stuck HOT 9
- NFS3/NFS4 -> NFS3 proxy listdir not working HOT 2
- Ha cluster config v2 HOT 14
- Cannot create new virtual disks in ESXi 6.7, 7 or 8 on a Datastore served over NFS from CephFS HOT 4
- Coredump with Gluster 11.1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nfs-ganesha.