Skip to content
This repository has been archived by the owner on Mar 22, 2023. It is now read-only.

FEAT: Multiple regions support #74

Open
igchor opened this issue Jan 17, 2022 · 1 comment
Open

FEAT: Multiple regions support #74

igchor opened this issue Jan 17, 2022 · 1 comment
Labels
Type: Feature New feature or request

Comments

@igchor
Copy link
Contributor

igchor commented Jan 17, 2022

FEAT: Multiple regions support

Rationale

  • Increasing concurrency (there is no need for heavy-weight synchronization between appends to different regions)
  • Logical division of entires
  • Grouping objects of different sizes together (can improve performance for concurrent append - appending similarly sized entires will result in bigger overlap for memcpy)

Description

  • Persistent allocator
    • Store alloc/free actions on PMEM (which allow rebuilding the state), do compaction regularly
  • Synchronization between iterators and region_free needed
    • Use delayed free / garbage collection?
  • Region discovery TBD (optional)
    • Named regions?
    • Root region?

API Changes

No changes - region allocate and free is already supported.

Implementation details

Most of the code is ready to handle multiple regions. There are a few global variables which should be made per-region (move to region_runtime), e.g. region_lock from region_runtimes_map

First steps

  • trivial persistent allocator based on free list
  • no synchronization for iterators and region_free
  • no region discovery (only iterators)
@igchor igchor added the Type: Feature New feature or request label Jan 17, 2022
@igchor
Copy link
Contributor Author

igchor commented May 12, 2022

Next steps:

  • assign timestamp for each allocation (can be easily done if each allocation/free is logged as an entry in dedicated region). This will allow using region allocations with appends in a single transaction
  • allow iterating over regions in order of allocation (based on timestamps)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Type: Feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant