Skip to content

perf: increase Dune's default minor heap - #15729

Open
rgrinberg wants to merge 1 commit into
ocaml:mainfrom
rgrinberg:push-nxoqukqvtptp
Open

perf: increase Dune's default minor heap#15729
rgrinberg wants to merge 1 commit into
ocaml:mainfrom
rgrinberg:push-nxoqukqvtptp

Conversation

@rgrinberg

Copy link
Copy Markdown
Member

Dune's no-op self-builds allocate enough short-lived data to collect the
standard 256K-word minor heap almost a thousand times. A 512K-word heap reduces
that GC work and lowers promotion.

Set the default before the native OCaml runtime starts, while treating either
OCAMLRUNPARAM or CAMLRUNPARAM as an explicit user choice. The temporary
environment setting is removed after startup and filtered from Env.initial,
so commands run by Dune do not inherit it.

Across 40 alternating warmed pairs, task-clock improved by 1.4% on @install
and 2.8% on @check; minor collections fell by about 48% and promoted words by
about 1.9%. Maximum RSS increased by approximately 2%. This is internal runtime
tuning and does not require a changelog entry.

Set a 512K-word default before the native OCaml runtime starts, while
preserving explicit OCAMLRUNPARAM and CAMLRUNPARAM settings. Remove the
temporary setting from Dune's process and child environments after startup.

Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant