开发者

What would be the right fcntl flags?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜