Skip to content

Commit

Permalink
fix(xsnap): start with expected heap (32MB) and grow by 4MB
Browse files Browse the repository at this point in the history
flamegraph/perf/zoe.xnap/1814.66/1815.66 shows a lot of time
spent in gc (fxRunID / fxNewChunk / fxMarkValue). This is likely
a result of earlier tweaks to heap parameters (11795de).

We observe that vats usually use around 30MB RSS, so let's start with
that size heap (even though RSS is probably not all XS heap). If we
need more, grow a substantial amount (4MB) at a time.
  • Loading branch information
dckc authored and kriskowal committed May 4, 2021
1 parent e1ae41b commit 2e59868
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/xsnap/src/xsnap.c
Original file line number Diff line number Diff line change
Expand Up @@ -298,10 +298,10 @@ ExitCode main(int argc, char* argv[])
}
}
xsCreation _creation = {
1 * 1024 * 1024, /* initialChunkSize */
512 * 1024, /* incrementalChunkSize */
16 * 1024, /* initialHeapCount */
256 * 1024, /* incrementalHeapCount */
32 * 1024 * 1024, /* initialChunkSize */
4 * 1024 * 1024, /* incrementalChunkSize */
256 * 1024, /* initialHeapCount */
128 * 1024, /* incrementalHeapCount */
4096, /* stackCount */
32000, /* keyCount */
1993, /* nameModulo */
Expand Down

0 comments on commit 2e59868

Please sign in to comment.