Under Windows in a project, the use of a large number of large file transfers the UDT agreement, the sender and the receiver on different machines, the receiver can receive data, but can not feedback to the sender, receiver, after receipt of the documents called standard I/O library function fwrite () to write documents, know the entire file after, just return, if the receiver running on a machine performance is poorer, receive after a period of time memory will rise sharply, leading to receive errors, preliminarily concluded that is caused by disk I/O is too slow, is there a technology, Windows can be pretty high efficiency of disk I/O operations, or to avoid the problem of insufficient this disk I/O performance
CodePudding user response:
How slow disk I/O is too slow?CodePudding user response:
To keep up with the speed of receiving data my programCodePudding user response:
If the receiving end run on a better machine, this kind of phenomenon is improved,CodePudding user response:
In solid-state drives,CodePudding user response:
1. Optimization of read and write filesCan increase the data Cache, using asynchronous mode to write files;
Also can consider to use memory mapping file to operate, higher efficiency than fwrite affirmation;
2. If the optimization performance after the file is written to still do not amount to mark
That in addition to change the hardware
Really nothing can optimize
CodePudding user response:
Reduce machine machine instructions, especially the IO instruction,CodePudding user response:
If it is a burst of can rely on large memory buffer, otherwise let's upgrade hardware