Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trigger GC for actors after they process a number of app msgs
Prior to this commit, GC would only be triggered if an actor's heap grew to reach the next heap size cutoff for GC. This would potentially result in some actors not getting GC'd (and so holding on to memory for longer than necessary) because they happen to not allocate large amounts of memory even when processing lots of application messages and take a very long time to reach the next heap size for GC to occur. This commit adds an alternate way that GC for an actor can be triggered in order to force actors that don't allocate large amounts of memory to GC and free up memory more frequently. This is done by keeping track of the number of application messages processed since the last GC and forcing a GC if the number of messages handled passes a threshold (10x actor batch size).
- Loading branch information