开发者

What would be the right fcntl flags?

开发者 https://www.devze.com 2023-04-06 18:36 出处:网络
What would be the right fcntl flags when reading from a disk and writing to a file ov开发者_运维技巧er the network for best speed?

What would be the right fcntl flags when reading from a disk and writing to a file ov开发者_运维技巧er the network for best speed?

perhaps the issues is with the fcntl flags set on the file descriptor?


I don't think fcntl offers you anything that would affect performance. Perhaps you're looking for posix_fadvise, but I think the main key is just to use reasonably large buffers.


I am assuming that you are using NFS (or something like that) to read/write to a file across the network. The best option is to read/write as large as necesssary parts of the file. Then the NFS has more options as to dividing the data up into the larger size packets - hence less overhead in terms of the network stack.

0

精彩评论

暂无评论...
验证码 换一张
取 消