Cartesius00
Cartesius00

Reputation: 24414

Writing to multiple file-descriptors

Is there any OS-level (Linux) speedup when writing one fixed byte buffer to many file-descriptors? When writing many buffers to one file-descriptor one can use writev(2), so I wonder if there's any analogue to this or it must be done by multiple sys-calls.

Upvotes: 10

Views: 1473

Answers (3)

dsb124
dsb124

Reputation: 21

I haven't used it but this might work: lio_listio

http://linux.die.net/man/3/lio_listio

Upvotes: 2

hroptatyr
hroptatyr

Reputation: 4829

A combination of vmsplice and tee should do what was requested, it's multiple calls thereof though, but the user-space/kernel-space barrier is crossed only once.

Upvotes: 0

I know no such syscall on Linux. Their exhaustive list is given in the syscalls(2) man page.

And I won't bother that much. For file access, the real bottleneck is the disk...

Upvotes: 2

Related Questions