Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trigger GC after a set number of messages #3031

Closed
wants to merge 5 commits into from

Commits on Jul 11, 2022

  1. 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).
    dipinhora committed Jul 11, 2022
    Configuration menu
    Copy the full SHA
    1d4e8a5 View commit details
    Browse the repository at this point in the history
  2. Trigger GC for actors when they tell the cycle detector they're blocked

    Prior to this commit, if an actor blocked, it did not run GC to free
    any memory it no longer needed. This would result in blocked actors
    holding on to (potentially lots of) memory unnecessarily.
    
    This commit causes GC to be triggered when the cycle detector asks
    an actor if it is blocked and the actor responds telling the cycle
    detector that it is blocked. This should result in memory being
    held by blocked actors to be freed more quickly even if the cycle
    detector doesn't end up detecting a cycle and reaping the actors.
    dipinhora committed Jul 11, 2022
    Configuration menu
    Copy the full SHA
    b551411 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8833a1b View commit details
    Browse the repository at this point in the history
  4. Undo trigger GC if blocked

    dipinhora committed Jul 11, 2022
    Configuration menu
    Copy the full SHA
    ccf02aa View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    6a3a450 View commit details
    Browse the repository at this point in the history