Giter Club home page Giter Club logo

Comments (5)

rojingeorge avatar rojingeorge commented on June 19, 2024

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).

  1. We need to keep track of all expired clients in LRU fashion.
  2. Pick the oldest expired clients when the number of clients exceeds the max limit, and clean them up
  3. 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.

ffilz avatar ffilz commented on June 19, 2024

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.

rojingeorge avatar rojingeorge commented on June 19, 2024

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.

rojingeorge avatar rojingeorge commented on June 19, 2024

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.

ffilz avatar ffilz commented on June 19, 2024

Merged in V6-dev.2, closing

from nfs-ganesha.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.