Skip to content

Enable parallel marking in boehm-gc#168

Merged
edolstra merged 4 commits intomainfrom
parallel-mark
Aug 7, 2025
Merged

Enable parallel marking in boehm-gc#168
edolstra merged 4 commits intomainfrom
parallel-mark

Conversation

@edolstra
Copy link
Collaborator

@edolstra edolstra commented Aug 4, 2025

Motivation

Previously marking was done by only one thread, which takes a long time if the heap gets big. Enabling parallel marking speeds up evaluation a lot, for example (on a Ryzen 9 5900X 12-Core):

  • nix search nixpkgs from 24.3s to 18.9s.
  • Evaluating the NixOS/nix/2.21.2 flake regression test from 86.1s to 71.2s.

Context

@edolstra edolstra added the flake-regression-test Run the flake regressions test suite on this PR label Aug 4, 2025
@edolstra edolstra closed this Aug 4, 2025
@edolstra edolstra reopened this Aug 4, 2025
@github-actions
Copy link

github-actions bot commented Aug 4, 2025

@github-actions github-actions bot temporarily deployed to pull request August 4, 2025 19:20 Inactive
@github-actions github-actions bot temporarily deployed to pull request August 4, 2025 19:20 Inactive
If the mark stack size is too small, it greatly inhibits parallel
marking, which is very bad for performance on multi-core systems.
@github-actions github-actions bot temporarily deployed to pull request August 4, 2025 19:42 Inactive
@github-actions github-actions bot temporarily deployed to pull request August 6, 2025 10:02 Inactive
@github-actions github-actions bot temporarily deployed to pull request August 6, 2025 14:34 Inactive
@edolstra edolstra enabled auto-merge August 7, 2025 10:02
@edolstra
Copy link
Collaborator Author

edolstra commented Aug 7, 2025

Upstream PR: NixOS#13708

@edolstra edolstra added this pull request to the merge queue Aug 7, 2025
Merged via the queue into main with commit 888ba24 Aug 7, 2025
42 checks passed
@edolstra edolstra deleted the parallel-mark branch August 7, 2025 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

flake-regression-test Run the flake regressions test suite on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants