Comments (8)
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.
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.
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.
I haven't seen any benchmarking of parallel mark + incremental/generational yet.
And nobody tried to optimize it I suppose.
from bdwgc.
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.
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.
@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.
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)
- Remove dependency on CoreFoundation or make it optional HOT 4
- Unexpected heap growth in gctest on Linux with malloc redirection HOT 2
- Regression: support of macOS before 10.7 HOT 8
- Soft-dirty bit is not supported by kernel on Ubuntu 22.04/x86_64 HOT 4
- Test crash on Windows if GWW mode and checksums
- gctest fails if shared build by Zig HOT 5
- Zig support improvement HOT 11
- Too many heap sections: Increase MAXHINCR or MAX_HEAP_SECTS HOT 5
- compile fail on Win10/MSVC HOT 2
- Bad maximum heap size on large initial heap HOT 4
- Zig warning of "large atomic operation may incur significant performance penalty" on 32-bit arm HOT 7
- Assertion violation of GC_stop_count&THREAD_RESTARTED in GC_restart_all running disclaimtest
- Illegal instruction in GC_clear_stack in tests built by Zig on Linux HOT 7
- disclaimtest, weakmaptest or middletest fail in zig build on Linux if enable_gc_debug and enable_redirect_malloc HOT 5
- Unexpected bus error on Linux/powerpc (32-bit) HOT 9
- weakmap test fail on Ubuntu/x64 (zig build) if malloc redirection and gc-debug enabled HOT 1
- autogen.sh is incomplete HOT 16
- Downstream libgc releases (Feb 2024) HOT 21
- GC hangs with "parallel mark" if using `GC_allow_register_threads()` HOT 11
- Debugging an issue with GC seemingly not happening on Emscripten/WebAssembly
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bdwgc.