Skip to content

[Future Work] Promote DirectMemmoveBuffer into Standard Bucket Path #888

Description

@googlyrahman

ZonalFile manages concurrency through an in-house buffer that preallocates space, allowing workers to write directly to memory. It uses the ctypes.pythonAPI library to execute GIL-free writes, which avoids unnecessary data copies and prevents the global interpreter lock from creating a bottleneck. We call it DirectMemmoveBuffer as of today.

The standard path, by comparison, relies on b"".join. In this process, each worker generates its own byte object, and a new, combined copy is created when the join operation executes. This overhead limits throughput for standard buckets.

As for why we are addressing this now: we initially held off on integrating this with regional buckets due to concerns from the fsspec maintainers regarding the use of the ctypes API. If we are confident in the stability of our buffer, it is time to promote it to the standard bucket

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions