Skip to content

[DOC] Add best practices/advice with respect to using pool allocators #1694

Open
@wence-

Description

@wence-

RMM has multiple pool-like allocators:

  • a pool_memory_resource that wraps a coalescing best fit suballocator around an upstream resource;
  • an arena_memory_resource that similarly wraps around an upstream resource but divides the global allocation into size-binned arenas to mitigate fragmentation when allocating/deallocating;
  • and a cuda_async_memory_resource that uses the memory pool implementation provided by cudaMallocAsync. This one can avoid fragmentation because it is in control of the virtual address space.

Since these are all composable, one can happily wrap a pool_memory_resource around a cuda_async_memory_resource (or an arena, ...). But should one?

It would be useful if the documentation provided some guidance on which combinations make sense, and what typical allocation scenarios best fit a particular pool.

We should also recommend best practices for picking initial pool sizes: a bad choice here can lead to overfragmentation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    docDocumentation

    Type

    No type

    Projects

    Status

    To-do

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions