winapi - API for monitoring individual files IO performace on Windows -


what windows api can use monitor i/o performance metrics specific file or set of files? performance counters seem offer higher level objects such logicaldisk , physicaldisk. i'm looking windows resource monitor uses under disk->disk activity, i.e read/write bps , response time.

i did quick search "perfmon individual files" , didn't see promising.

but i'm not sure measuring performance of individual files meaningful. i/o activity coalesced in i/o stack in several places, result being @ different levels os can't distinguish file i/o 1 file versus another.

assuming app isn't doing buffering/caching on it's own, first place can in buffering happens in "c" (or similar) runtime libraries. place coalescing occurs in file system (i'm assuming ntfs). i/o file directories can coalesced across multiple files in same directory. i/o can coalesced based on file system's block size. if multiple mft entries share block can read/written @ once. ntfs implements caching , other i/o optimizations (read ahead). performance of cache can affected other processes running @ same time either accessing same file(s) want measure (helping keep file in cache) or accessing other files (helping evict file cache).

coalescing happens below file system @ logical disk level. single i/os may service multiple files.

at disk driver level single i/o requests may again involve multiple files. additionally driver (or more drive firmware) can reorder disk i/os based on knowledge has drive "geometry" gain additional throughput @ (possible) expense of response time. in case i/o files may suffer compared see if other processes weren't doing i/o @ same time.

many disks implement caching in dram. cache affected other processes in same way window's cache is. again affecting measured performance due other process's activity.

if still want measure though, 1 way circumvent limitations in perfmon put files or sets of files on different drives. drives don't have different physical drives, vhds, or other kind of virtual disk-on-physical disk. know volume snapshot service (vss) sdk has little utility create virtual drives out of files.

but putting files on own physical disks give more consistent results.


Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -