开发者

Network File Streaming Performance Vista

How can I achieve the best file streaming performance in Vista? My goal is to read a large file (several hundred MB) over the network directly into memory.

I've allocated a memory block the same size as the file. This is also my destination buffer. I've tried ReadFile, _read, fread, ifstream::read, and boost::iostreams::mapped_file::const_data -- specifying _O_SEQUENTIAL or 开发者_StackOverflowFILE_FLAG_SEQUENTIAL_SCAN when appropriate. However, I haven't been able to match the throughput of a simple cut and paste file copy via Explorer. I routinely achieve only 50% of the performance of a file copy--profiled via Task Manager. What is Explorer doing differently, and how can I achieve the same level of performance?


How bigs are the chunks that you read each time? if they are too small or too big then your not utilizing the network to its full capacity.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜