Skip to content

Conversation

@qinsoon
Copy link
Member

@qinsoon qinsoon commented Sep 19, 2025

The heap size for concurrent immix was set to 7x, as initially it was non-moving. Later we allowed moving for the full pause in concurrent Immix. This PR reduces the heap size for our concurrent immix tests.

@k-sareen
Copy link
Collaborator

Wouldn't this just make it into a STW GC? Does it do any concurrent collections for 2.5x min heap?

@wks
Copy link
Contributor

wks commented Sep 19, 2025

Wouldn't this just make it into a STW GC? Does it do any concurrent collections for 2.5x min heap?

This is a valid concern. If the heap is too small (I mean having the same heap size as the STW Immix plan), it may end up triggering only STW GCs. For example, when I run lusearch locally, if I set the heap size to 40MB or 80MB, ConcurrentImmix will trigger a few concurrent GC when the test harness is starting. But when the formal benchmark starts, it only triggers full GCs. But if I set the heap size to 120MB, it can run to the end, only triggering concurrent GCs.

(Edit: I did the experiments with fastdebug, in which case the GC usually cannot keep up with the mutator. If we run with release build, it may be different. We need to refactor our statistics to show the number of concurrent and full GCs, too, like we count major and minor GCs.)

So we may want to test Concurrent GC with two heap sizes, one small and one large. Make sure both concurrent and full-heap GCs are triggered. If that's too time-consuming, we can run all benchmarks with one heap size, and run lusearch (or another selected benchmark) with a different heap size.

@qinsoon
Copy link
Member Author

qinsoon commented Sep 19, 2025

Wouldn't this just make it into a STW GC? Does it do any concurrent collections for 2.5x min heap?

I will check this.

So we may want to test Concurrent GC with two heap sizes, one small and one large.

I don't feel that is necessary. I think this is similar to generational GCs -- when we use a smaller heap size and when we have memory pressure, it triggers way more full heap GCs, and may not do any nursery GC either.

But we could use a larger heap size for generational and concurrent plansso they will do more nursery/concurrent GCs.

@qinsoon
Copy link
Member Author

qinsoon commented Sep 22, 2025

I checked two benchmarks: fop and lusearch. For fop, there are two concurrent GCs at the beginning, then it always does full GC for the rest. For lusearch, almost all the GCs are concurrent.

I think running with small heap sizes won't 'make it into a STW GC' -- more full GCs would be triggered if there is memory pressure, but this depends on the workload and the minimal heap size for the work load.

@qinsoon qinsoon marked this pull request as ready for review September 22, 2025 00:55
@qinsoon qinsoon requested a review from wks September 22, 2025 00:55
Copy link
Contributor

@wks wks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@qinsoon qinsoon merged commit e350a01 into mmtk:master Sep 22, 2025
54 of 56 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants