GithubHelp home page GithubHelp logo

Comments (8)

plajjan avatar plajjan commented on June 10, 2024

I suppose one thing I'm interested in understanding is what sort of overhead one can expect from the incremental collector and its various VDB options?

Using parallel mark I get a significant performance improvement, like a test program goes from close to 13 minutes to running in less than 4. However, if I instead enable incremental collection I end up at around 10 minutes, i.e. ~3 minutes better. Using incremental + parallel (with GC_TIME_LIMIT=GC_TIME_UNLIMITED) I end up around 11 minutes, so worse than just the incremental and a lot worse than just parallel. I was really hoping that detecting dirty pages and only scanning them would be a lot more efficient than scanning whole heap. Am I doing something wrong? What are the general expectations when it comes to parallel + incremental? Is it supposed to be fast? :) Am I tuning it wrong?

from bdwgc.

ivmai avatar ivmai commented on June 10, 2024

I haven't seen any benchmarking of parallel mark + incremental/generational yet.

Probably Unity folks did benchmarking (https://blog.unity.com/technology/feature-preview-incremental-garbage-collection, e.g. @jechter).

/cc @hboehm

from bdwgc.

ivmai avatar ivmai commented on June 10, 2024

Parallel marking disabled due to stop_func != GC_never_stop_func
I don't understand the logic around stop_func. What happens that disables the parallel marker?

True incremental mode (when a collection is interrupted after a delay) with multiple markers is not implemented yet. It requires a change in GC_do_local_mark and related functions. Might be not difficult to implement, but I haven't estimated it. See issue #151.

from bdwgc.

ivmai avatar ivmai commented on June 10, 2024

I haven't seen any benchmarking of parallel mark + incremental/generational yet.

And nobody tried to optimize it I suppose.

from bdwgc.

ivmai avatar ivmai commented on June 10, 2024

various VDB options

On Linux/x64 there are only 2 variants of automatic incremental mode - SOFT_VDB (using /proc/self/pagemap, implemented in #265) and MPROTECT_VDB (using mprotect and fault handler). The first one is the default one (provided the kernel supports it). The 2nd one could be selected either but compiling with -D NO_SOFT_VDB or at runtime by setting env GC_USE_GETWRITEWATCH=0.

from bdwgc.

ivmai avatar ivmai commented on June 10, 2024

Using parallel mark I get a significant performance improvement, like a test program goes from close to 13 minutes to running in less than 4.

It's a bit out of topic, but did you benchmark it with different number of markers? The current strategy is to have same number of markers as the number of cores available (but not more than 16).

from bdwgc.

plajjan avatar plajjan commented on June 10, 2024

@ivmai let's say I don't care about interrupting a collection after some delay. I can run a "complete collection" but I want it to run through only the dirty pages instead of the whole heap. And I want to run through with parallel markers. Shouldn't this be possible today? That's what I understood -DPARALLEL_MARK + incremental mode with GC_TIME_LIMIT=GC_TIME_UNLIMTED should do? Maybe it does, but it is much slower than plain PARALLEL_MARK. Is this expected?

from bdwgc.

ivmai avatar ivmai commented on June 10, 2024

I can run a "complete collection" but I want it to run through only the dirty pages instead of the whole heap.

No, this works differently (as explained in gcdescr.md): the collector may run for a small amount of time not stopping other threads, periodically, and later performs stop-the-world collection of dirty pages only (thus each collection is shorter but totally the collection work takes longer time because the collector needs to rescan dirty pages). Thus, according to your description what you need, the incremental/generation mode is not beneficial for you.

from bdwgc.

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.