Repository navigation
0.8.0: write without fsync or OS locks, file I/O sized apart, create timed out - #13
Merged
Merged
Conversation
…eate (0.8.0) Measured 2026-10-23 against zarr-python on real CellMap data: tensorstore's fsync cost 6.5 ms a chunk on local disk and nothing on NFS; its "os" file locking about 10 ms a chunk on NFS; and one file I/O thread made a one-thread worker write a block's chunk files one NFS round trip after another. Contexts the package makes now set file_io_sync false and file_io_locking "none" (fsync=True, locking="os" restore them; whole-unit writes stay atomic), and the default context's file I/O pool is at least 8 while decoding stays at thread_budget(). capped_context gains file_io=. From one-thread workers: an NFS label block 159 to 66.5 ms (zarr-python 2: 102), a local one 51.5 to 4.1 ms. The create open is timed out under retries too (cellmap-analyze's question); a retry that finds the array its own timed-out attempt made adopts it after the usual comparison, and that open keeps OS locking so create-if-absent stays atomic. tensorstore>=0.1.68, the first release with file_io_locking. Claude-Session: https://claude.ai/code/session_0141wgF8mkGbjGfBFKfKhp64
Claude-Session: https://claude.ai/code/session_0141wgF8mkGbjGfBFKfKhp64
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
0.8.0: faster writes from the contexts the package makes, and the create open timed out. No placement change and no unit table change. It requires tensorstore 0.1.68 or later (was 0.1.60), the first release with
file_io_locking.All of this was measured on 2026-10-23 on real CellMap data, against zarr-python 2.18 and 3.1, on local NVMe and NFS.
fsync and locking.
shared_contextandcapped_contextnow setfile_io_sync: falseandfile_io_locking: {"mode": "none"}.fsync=Trueandlocking="os"restore tensorstore's defaults."os"locking cost about 10 ms per chunk on NFS: a 64³ label chunk took 21.7 ms with it and 12.0 ms without, against zarr-python 2's 12.7 ms."none"keeps and gives up. A whole-unit write stays atomic, as a temporary file renamed into place. Only concurrent read-modify-writes of one unit lose their guarantee, and Behaviour 13 never gave that."lockfile". A lock file left behind by a killed worker blocks every later write to that unit.File I/O threads. The default context's file I/O pool is
max(thread_budget(), 8); decoding stays atthread_budget().capped_context(file_io=)sizes the file I/O pool separately. Its default is unchanged.Before and after, one-thread workers (
OMP_NUM_THREADS=1), default context:Create open timed out (cellmap-analyze's question).
wa.createis now timed out and retried underretries.exists="error"."os"locking, so create-if-absent stays atomic.Tests.
mkdocs build --strictis clean.https://claude.ai/code/session_0141wgF8mkGbjGfBFKfKhp64