writev · shipping · also writev(), vectored write, gather write

writev

writev is a vectored I/O operation that writes an ordered array of buffers to a file descriptor and reports the total number of bytes transferred.

Related Observatory article: Read on hesela.com

Buffers are consumed in array order; the return value counts bytes, not completed buffers. [2] Hesela's three controlled Linux child processes submitted AB and CDEF with file-size limits of 2, 3 and 6 bytes. The middle case returned 3 and read back ABC, leaving DEF rather than the entire second buffer. The two incomplete cases then reported EFBIG on retry. These are deliberate limits, not measured device failures. [3] A single vectored call is distinct from several write calls; neither its interface nor a full count alone establishes post-crash persistence. [1]

Relations

related
Short write, pwrite, O_APPEND, Torn write, fsync, readv, preadv

Advantages

  • Accepts separate buffers without requiring the application to concatenate them into one byte string.

Limitations

  • A successful return can stop inside an individual buffer; retries must advance by bytes.
  • No performance benchmark, concurrency test, direct I/O or power interruption was performed in the Hesela observation.

Citations

  1. Linux man-pages 6.19: readv(2), writev ordering and return-value semantics (accessed 2026-10-17)
  2. Python 3.12 documentation: os.writev (accessed 2026-10-17)
  3. Hesela: controlled vectored-write observation with environment and source SHA-256 (accessed 2026-10-17)

Further reading

  1. Hesela: Atomic rename is not a durable commit (accessed 2026-10-17)

JSON: /data/terms/writev.json

Published by Hesela team · Updated

Report a correction · Editorial standards · Reuse guidance

Cite this page
Hesela team. writev. Hesela. 2026-11-02. https://hesela.dev/terms/writev/