Git Product home page Git Product logo

Comments (5)

alpire avatar alpire commented on May 22, 2024

👍

It looks like this function is the one creating lots of file on my machine: https://github.com/BinaryAnalysisPlatform/bap/blob/master/src/server/mmap_server.ml#L37

from bap.

ivg avatar ivg commented on May 22, 2024

yep, the only problem, is to define a policy. The rest is trivial.
The easiest to implement would be to clean all at_exit, and (in case if we hadn't a chance to do this), clean at_startup.

from bap.

alpire avatar alpire commented on May 22, 2024

I don't really understand the purpose of the mmap_server, so I can't really be of help defining a policy. But what you mentioned (cleanup at exit and at startup) sounds reasonable. Also, if those files are used like a cache, limiting the numbers of files might be necessary for long running servers.

from bap.

ivg avatar ivg commented on May 22, 2024

It is used to send bytes from client (qira) to server (bap) and vice verse. Since, sending memory chunks through http (that is also possible) is too expensive. As name suggests, there is no copying involved, we just share memory between client and server. The file entry is used as a symbolic address, nothing more. The reason, why we do not delete them, is because memory chunks can be reused later and by different instances. If we're going to delete this files in the runtime (we can't just limit, this will result on DoS), the we also need to implement eviction policy in resource manager, so that it can refetch memory if it is later required. Since, qira doesn't allow this (it gives memory chunk only once, and assumes that we will store it infinitly), we need to implement some non-trivial eviction policy, like storing this memory chunk on a file system or in a database. The former approach will not help us if we are hitting maximum file entries bound (it will make things even worser). The latter approach is non-trivial and requires extra dependencies. That's basically the reason, why I did choose current policy - do nothing, as OOM-killer will kill qira before bap.

from bap.

ivg avatar ivg commented on May 22, 2024

this issue must be moved to a bap-server repository

from bap.

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.