Skip to content

Add guide to mmap - #805

Draft
lanceu0128 wants to merge 4 commits into
Blosc:mainfrom
lanceu0128:mmap-guide
Draft

lanceu0128 wants to merge 4 commits into
Blosc:mainfrom
lanceu0128:mmap-guide

Conversation

@lanceu0128

Copy link
Copy Markdown
Contributor

No description provided.

@FrancescAlted

Copy link
Copy Markdown
Member

That's a very nice starting point! The structure and topic are great additions to the docs, and I like the graphics that you are adding. Meanwhile, some notes:

  • Line 59: mmap_mode=r is missing quotes — should be mmap_mode="r".
  • Line 28 ("mmap_mode overrides mode"): True for SChunk/NDArray, but EmbedStore, BatchArray, and CTable only accept mmap_mode="r" together with mode="r" (raising ValueError otherwise). Also worth explicitly noting that blosc2.open(..., mmap_mode="w+") raises ValueError ("w+" is constructor-only) and that urlpath is required.
  • Concurrency section: Should explicitly call out that mmap_mode="r" is for concurrent readers, and that file locking (locking=True) cannot be combined with mmap_mode (raises ValueError, while BLOSC_LOCKING is ignored). Also worth summarizing the RSS vs. USS measurement caveat when profiling mmap memory (already noted in sharing_across_processes.md), since this guide has a memory-profiling section.

Keep the good work!

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants