GithubHelp home page GithubHelp logo

Comments (7)

haozhun avatar haozhun commented on April 20, 2024 2

To expand on what @tmikov commented.

With NCGen, Hermes reserves memories as 4MB segments. The expected outcome of this issue is not to break down the 4MB at commit time. In fact, I expect "commit" to still happen 4MB at a time. Instead, it is so that vm_unused can have meaningful impact (to reduce RSS) on Windows.

from hermes.

haozhun avatar haozhun commented on April 20, 2024

As part of this task, once vm_unused is implemented, tests that exercised vm_unused can be re-enabled. However, those tests also exercises regionFootprint, which is a test-only function that isn't implemented for Windows. regionFootprint is certainly implementable on Windows.

  • Microsoft Sysinternals provide a tool called VMMap, which provides the same kind of info that /proc/self/smaps provides. Screenshot here.
  • An open source command line equivalent of VMMap can be found by following links in this stackoverflow question.
  • Look for QueryWorkingSet in process_map.cpp in twpol/vmmap.

from hermes.

tmikov avatar tmikov commented on April 20, 2024

I think it is very important to note that Hermes is committing incrementally on Windows, only it is happening with a granularity of a single segment (4MB).

from hermes.

mganandraj avatar mganandraj commented on April 20, 2024

Thanks for the clarification. I haven't tested with NCGen yet.
vm_unused implementation would help for long running apps.

from hermes.

tmikov avatar tmikov commented on April 20, 2024

@mganandraj After a full GC we release unused 4MB segments to the OS, so you will get that behavior already, with 4 MB granularity.

from hermes.

dulinriley avatar dulinriley commented on April 20, 2024

I think this will actually be more relevant if PreAllocatedStorageProvider is used instead of VMAllocateStorageProvider.

PreAllocatedStorageProvider right now (on Windows) will reserve and commit the whole 500 MB range; however, it could be changed to only reserve the 500 MB range, and commit upon each call to newStorage.

PreAllocatedStorageProvider isn't the default yet for NCGen, but providing some experiments I'm working on go well, we might transition to using that on some platforms.

from hermes.

tmikov avatar tmikov commented on April 20, 2024

Implemented in 043f073

from hermes.

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.