Presentation is loading. Please wait.

Presentation is loading. Please wait.

On Windows File Access Modes : A Performance Study Jalil Boukhobza & Claude Timsit laboratory Versailles Saint Quentin University.

Similar presentations


Presentation on theme: "On Windows File Access Modes : A Performance Study Jalil Boukhobza & Claude Timsit laboratory Versailles Saint Quentin University."— Presentation transcript:

1 On Windows File Access Modes : A Performance Study Jalil Boukhobza & Claude Timsit jalil.boukhobza@prism.uvsq.fr laboratory Versailles Saint Quentin University (France)

2 01/04/2005PRiSM / UVSQ2 Outline 1. Motivations 2. Windows file access strategies 3. Read performance analysis 4. Write performance analysis 5. Conclusions and guidelines 6. Perspectives

3 01/04/2005PRiSM / UVSQ3 Motivations Windows I/O systems  very used BUT very poorly studied ! CreateFile() function  Many file access modes  different caching algorithms  big performance variations Disk subsystems built independently from OS Interaction with the OS are not easily predictable How does the performance vary with the access strategy and the storage subsystem and why ?

4 01/04/2005PRiSM / UVSQ4 Previous work Riedel et al., Microsoft (1998) : global performance measurements for some architectures (operating systems, disks, RAID configurations, etc.) Chung et al., Microsoft (2000) : continuation of the first one with more recent architectures. Not all the access modes have been studied and performance fluctuations have not been explained

5 01/04/2005PRiSM / UVSQ5 Windows file access strategies Different file access modes in the CreateFile() function: Without using the file system cache: no buffer mode Using the file system cache: sequential, normal, write through modes. Achieved experiments : accessing sequential blocks with different I/O strategies (access modes and request sizes) File System Driver Storage Device Driver Storage Device Cache Manager Virtual Memory Manager I/O request FastIO Page fault

6 01/04/2005PRiSM / UVSQ6 Read performance analysis Pentium IV 1.8GHz / 256MB RAM Win 2K professional SP3 / FAT32&NTFS Disk: Fujitsu Man3184mp / Ultra SCSI / 18.4 GB / 8MB cache / 10025 Rpm seek: min: 0.4ms, avg 4.5 ms, max : 11ms track size : 221KB ~ 370KB Transfer rate int: 84MB/sec, ext : 160MB/sec Pentium III 500 MHz / 192MB RAM Win 2K professional SP2 / FAT32&NTFS Disk: Toshiba MK6012MAP/ ATA 4 / 6GB / 1MB cache / 4200 rpm seek: min: 3ms, avg 13 ms, max : 24ms Track size : unknown Transfer rate int: 24Mo/sec, ext : 66.7Mo/sec

7 01/04/2005PRiSM / UVSQ7 KB Response time measurements 2 1

8 01/04/2005PRiSM / UVSQ8 Normal mode response times  Periodic response times  They depend on request sizes.  They are due to : File system prefetching algorithms Disk prefetching algorithms Interactions between them

9 01/04/2005PRiSM / UVSQ9 Example of normal mode read (Fujitsu disk) Response time (ms) B1 B3 B2 B5 B4 +B5,B6,B7,B8,B9,B10,B11 B1 B3 B2 B6 B5B7 B8 B9 B10 B11 B10 B9B8 B7 B6 B11 B4 +B5,B6,B7,B8,B9,B10,B11 Block 1 Block 2 Block 3 1 2 3 Optimal access Normal mode access Block 1 Block 2 Block 3 1 2 3 Disk prefetching 4 System process Application process Wait System prefetching Disk prefetching 7.37.20.0912.7 0.81.50.120.7 0.81.31.1 Application

10 01/04/2005PRiSM / UVSQ10 Example of normal mode read (Toshiba) Response times for one period: t1 = 8,5ms t2 = 15,6ms t3 = 0,16ms t4 = 16,9ms The tested architecture characteristics: Disk cache throughput ~30MB/sec Memory throughput : ~400MB/sec Track revolution time: 14,28ms Seek time track/track: 3.5ms Track size : 182KB Block1 Block2 Block3 3 Optimal access Normal mode access Block1 Block2 Block3 1 2 3 Disk prefetching t1: The application requests the block 1 t1 = Reading of a 64KB block + track/track seek = 64 * 14.28/182 + 3.5 = 8.5ms t2: The system asks for the block 3 (prefetching), then the application asks for the block 2: t2 = reading of the block 2 on the disk (local prefetching) + reading of the block 3 on the disk (system prefetching of block 3) + reading of block 2 from the disk cache (disk prefetching) = (64 * 14.28/182) + ( 64 * 14.28/182+ 3.5) + (64*1000/(1024*30)) = ~ 5 + 8,5 + 2,1 = 15,6 ms t3: Memory copy of block 3 prefetched by the system. t3 = 64*1000/(1024*400) = ~ 0.16ms t4: Reading time of the block 4: repositioning of the disk head on the first sector of the block then reading : t4 = ((14,28 – (reading of the block 2 from the disk cache + memory copy of block 3)) + 5) = 14,28 – (2,1 + 0,16) + 5 = ~ 16,9 ms.

11 01/04/2005PRiSM / UVSQ11 Conclusions : read operations Periodic response times System prefetching does not depend on file systems (NTFS & FAT32) but on access modes Interactions between system and disk prefetching influence very much the performances No buffer mode : Good performances / except some request sizes No file system cache level Sequential mode : As good as no buffer mode for request sizes multiple of 64KB and less than 160KB File system cache level activated Normal (default) mode : Performance drop by a factor 2-3 A different file system cache algorithm (compared to sequential mode) Different disk prefetching reactions

12 01/04/2005PRiSM / UVSQ12 Write operation analysis Flush of data that were on the cache segment to be used Copy of data on the disk cache segment Once the segment is filled or/and the disk head positioned, the copy of data from the cache to the disk begins Disk driver File system driver Win32 function Disk cache Lazy write algorithm

13 01/04/2005PRiSM / UVSQ13 Normal and sequential mode analysis 1 2 64KB block copied to the disk 64KB block copied to the file system cache and flushed later on to the disk Example with a 320KB request size: File system cache Disk flush Req 4Req 5 Req 6Req 7Req 8 Req 2 Req 1 Req 3

14 01/04/2005PRiSM / UVSQ14 Write through mode analysis T reponse = Td1 + Ttr1 + Td2 + Ttr2 Td1: time to position the head from the system block to the data block to write Ttr1: writing time of the data block Td2: positioning time from the written data block to the system block Ttr2: writing time of the system block Block to write System block to modify Departure and arrival position  Write through algorithms on both disk cache and file system cache  Response times are multiple of 6ms (one disk revolution)

15 01/04/2005PRiSM / UVSQ15 Conclusions : write operations Periodic response times No buffer mode : Generally good performances whatever the request size No copy of the written data on the file system cache Normal and sequential modes : Performance drop compared to the no buffer mode Many passing over the same region of the disk Strong interactions between the disk cache and the file system cache One copy of some written data on the file system cache Write through mode Poor performances as compared to the other modes Data are immediately copied on the disk

16 01/04/2005PRiSM / UVSQ16 Conclusions and guidelines To understand file access performance → response time analysis Read operations : If one read → no buffer mode (exceptions) If many reads → sequential mode (request sizes) Write operations : If one write (no modification of data) → no buffer mode If many writes → sequential or normal mode (request size) Security → write through mode (loss : till a factor 10 !!!)  OS behavior is the same (given an access mode) but storage systems employ different strategies  Choosing a good I/O strategy is crucial to obtain good performances

17 01/04/2005PRiSM / UVSQ17 Perspectives Multi file access performances Simulation of file accesses (validation phase) Doing the same job on Linux systems Testing RAIDs

18 01/04/2005PRiSM / UVSQ18 Thank you ! jboukh@prism.uvsq.fr


Download ppt "On Windows File Access Modes : A Performance Study Jalil Boukhobza & Claude Timsit laboratory Versailles Saint Quentin University."

Similar presentations


Ads by Google