|
Windows 2000 Disk io performance Leonard Chung
|
bet | 14/47 | Sana | 30.03.2021 | Hajmi | 1,33 Mb. | | #13789 |
|
Figure 3 – File extension. The file system must balance the security verses performance. In order to prevent an application from allocating space on disk and then reading its previous contents, the file system serializes write requests. As the graph above shows, this leads to poor write performance on file extension unless one writes only at the end of the file. Applications concerned with good write performance should pre-allocate their files, or only append to them.
| For security reasons, Windows NT4 and Windows 2000 force writes to become synchronous if writing to a new file, writing to a newly extended area of a file, or writing beyond the end of a file. This is because C2 security requires a value of zero to be returned when reading data that has not been previously written. In order to prevent users from allocating storage and then reading its previous contents, like NT4, Windows 2000 must balance the need for performance with the need for security.
As Figure 3 shows, file extension severely impacts asynchronous unbuffered write performance -- unless writes are appended to the end of the file or the writes are to a pre-allocated file, write throughput decreases by 50%. Buffering can help reduce the impact of file extension, but for applications concerned with write throughput, files should be pre-allocated or writes should be to the end of the file. The figure shows that programs sequentially writing a file (writing at EOF) get the full disk speed. But, if a program first writes the last block and then sequentially writes the file, the write proceeds at half the speed because Windows2000 first zeros the file, and then writes it. When growing a file, it is important to write it in sequential order. Otherwise Windows writes each block twice: once to zero the “gap” and once to write the actual data when the need write finally is issued.
|
| |