Skip to content

[Sidecar] Generic and faster memory manager #102

Description

@majunze2001

Currently, the memory management in Sidecar relies on a provided chunk size for memory allocation, and it uses a very simple algorithm that searches for free memory from the head. When the communication sizes are not multiples of the chunk size, there will be significant internal fragmentation if the chunks are too large. However, using a smaller chunk size can hurt allocate performance. This problem is highlighted by Gemma3, which has projectors with different hidden sizes. There hasn't been a microbenchmark on the performance of the memory manager, but we will need a more generic memory manager with better performance (latency) and less fragmentation.

https://github.com/cornserve-ai/cornserve/blob/master/python/cornserve/services/sidecar/shm_manager.py#L105

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions