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

Recycle actor heap chunks after GC instead of returning to pool #4531

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Oct 15, 2024

  1. Recycle actor heap chunks after GC instead of returning to pool

    Before this commit, any unused chunks after actor heap garbage
    collection would be destroyed and returned to the memory pool
    immediately for reuse by the runtime or any actor.
    
    This commit changes things so that instead of destroying and
    returning the chunks immediatelly, we assume the actor will likely
    need more memory as it runs more behaviors and keep the recently
    unused chunks around in case that happens. This is generally more
    efficient than destroying a chunk and getting a new one from the
    memory pool because both destorying a chunk and allocating a new
    one involve updating the pagemap for the chunk to indicate which
    actor owns the chunk. Updating the pagemap is an expensive operation
    which we can avoid if we recycle the chunks instead. The main
    drawback is that since actors will no longer return chunks to the
    memory pool immediately after a GC, the overall system might end
    up using more memory as any freed chunks can only be reused by the
    actor that owns them and the runtime and other actors can no longer
    reuse that memory as they previously might have been able to.
    dipinhora committed Oct 15, 2024
    Configuration menu
    Copy the full SHA
    9672f4a View commit details
    Browse the repository at this point in the history