How to empty/flush Windows READ disk cache in C#?

后端 未结 5 2029
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-01 13:12

If I am trying to determine the read speed of a drive, I can code a routine to write files to a filesystem and then read those files back. Unfortunately, this doesn\'t give

5条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-01 13:52

    Why DIY?

    If you only need to determine drive speed and not really interested in learning how to flush I/O buffers from .NET, you may just use DiskSpd utility from http://research.microsoft.com/barc/Sequential_IO/. It has random/sequential modes with and without buffer flushing.

    The page also has some I/O related research reports you might find useful.

提交回复
热议问题