GithubHelp home page GithubHelp logo

Comments (3)

Feh avatar Feh commented on June 4, 2024 1

I’ll take silence as assent and merge these two commits.

from nocache.

Feh avatar Feh commented on June 4, 2024

I see three options:

  1. Change the data structure of locks to some map-like container or a search tree, using the fd as a key. This scales well for a low number of FDs, but has the same (or worse) problems when you actually want to use a billion FDs. The drawback is that you need to allocate heap memory during every system call interception.
  2. Introduce an artificial cap on max_fds – make nocache work on the first N FDs, where we could pick N to be a million or 100k. That makes the fix trivial. We can implement a flag for this if people care.
  3. Do nothing because this is a pathological case.

Given that it caused build failures for some people, 3) is not a real option I think. Option 2) is easy to implement correctly.

Thoughts?

from nocache.

shadjiiski avatar shadjiiski commented on June 4, 2024

@Feh, sorry for digging in old issues. Looking in the getrlimit documentation, I believe the off-by-one issue mentioned in your commit message was introduced (instead of fixed). Left a comment for you to review in the code: ce5c187#r39007823

from nocache.

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.