In this article, I will try to evaluate the performance of the file systems used in the Windows 95/98 / ME operating systems, as well as Windows NT / 2000. The article does not contain graphs and test results, since these results depend too much on the case, test methods and specific systems, and have almost no connection with the real state of affairs. In this article, I will instead try to describe general trends and considerations related to the performance of file systems. After reading this material, you will receive information for reflection and you will be able to make your own conclusions, understand which system will be faster in your conditions, and why. Perhaps some facts will help you also optimize the performance of your machine from the point of view of file systems, prompt some solutions that will lead to an increase in the speed of the entire computer. This review mentions three systems - FAT (FAT16), FAT32 and NTFS, since the main issue facing Windows2000 users is the choice between these options. I apologize to users of other file systems, but the problem of choosing between two, apparently completely equivalent, variants with all the acuteness is now only in the Windows2000 environment. I hope, nevertheless, that the above considerations will seem curious to you, and you will be able to draw some conclusions about the systems with which you have to work.

This article consists of many sections, each of which is devoted to some one issue of speed. Many of these sections are closely intertwined in certain places. Nevertheless, in order not to turn the article into a mess, in the appropriate section I will write only about what has to do with the topic under discussion at the moment, and nothing more. If you have not found any important facts in the text - do not be surprised to be surprised: most likely, you will meet them later. I also ask you not to make any hasty conclusions about the shortcomings and advantages of this or that system, since there are very many contradictions and pitfalls in this discussion. In the end, I'll try to put together everything that can be said about the speed of systems in real conditions.

1. Theory

The most fundamental property of any file system, affecting the speed of all disk operations - the structure of organization and storage of information, i.e. Then, as, actually, the file system itself is arranged. The first section is an attempt to analyze precisely this aspect of the work, i.e. Physical work with filesystem structures and data. Theoretical reasoning, in principle, can be omitted - those who are only interested in purely practical aspects of the speed of file systems, can turn to the second part of the article.

First of all, I would like to note that any file system stores files in one way or another. Access to data files is the main and integral part of working with the file system, and therefore first of all you need to say a few words about it. Any file system stores data files in certain volumes - sectors that are used by the hardware and driver as the smallest unit of useful disk information. The size of the sector in the overwhelming majority of modern systems is 512 bytes, and all file systems simply read this information and transmit it without any processing to applications. Are there any exceptions? Hardly ever. If the file is stored in a compressed or encoded form - as it is possible, for example, in an NTFS system - then, of course, the time and resources of the processor are used to restore or decrypt information. In other cases, reading and writing the actual data of the file is performed at the same speed, what file system you would not use.

Let's pay attention to the main processes performed by the system for accessing files:

Search for file data

Finding out in which areas of the disk a particular fragment of the file is stored is a process that has a fundamentally different embodiment in different file systems. Keep in mind that this is only a search for information about the location of the file - access to the data itself, whether fragmented or not, is not considered here, since this process is completely the same for all systems. It's about those "extra" actions that the system must perform before accessing real data files.

What affects this parameter: the speed of navigation on the file (access to arbitrary fragment of the file). Any work with large data files and documents, if their size is several megabytes or more. This parameter shows how much the file system itself suffers from file fragmentation.

  • NTFS is capable of providing fast fragment search, since all information is stored in several very compact records (typical size is a few kilobytes). If the file is very fragmented (contains a large number of fragments) - NTFS will have to use many records, which often causes them to be stored in different places. Excessive movement of the heads when searching for this data, in this case, will lead to a strong slowdown in the process of searching for the location of the file.
  • FAT32, because of the large area of ​​the placement table itself, it will be very difficult if the fragments of the file are scattered all over the disk. The fact is that FAT (File Allocation Table) is a mini-image of the disk, where each cluster is included. To access a fragment of a file in the FAT16 and FAT32 system, you need to access the corresponding FAT particle. If the file, for example, is located in three fragments - at the beginning of the disk, in the middle, and at the end - in the FAT system we will have to refer to the FAT fragment also at its beginning, in the middle and at the end. In the FAT16 system, where the maximum size of the FAT area is 128 KB, this will not be a problem - the entire FAT area is simply stored in memory, or read from the disk in one pass and buffered. FAT32, on the other hand, has a typical size of the FAT area of ​​the order of hundreds of kilobytes, and on large disks - even a few megabytes. If the file is located in different parts of the disk - this forces the system to perform the movements of the hard drive heads as many times as there are files of fragments in different areas in the file, and this very very slows down the process of searching for fragments of the file.

Conclusion : Absolute leader - FAT16, he will never force the system to do extra disk operations for this purpose. Then goes NTFS - this system also does not require reading any unnecessary information, at least until the moment the file has a reasonable number of fragments. FAT32 is experiencing huge difficulties, up to reading the extra hundreds of kilobytes from the FAT area, if the file is scattered across different areas of the disk. Working with large files on FAT32 in any case involves huge difficulties - to understand where on the disk is located one or another fragment of the file, you can only study the entire sequence of file clusters from the very beginning, processing at a time one cluster (every 4 KB of file in a typical system). It should be noted that if the file is fragmented, but lies in a compact heap of fragments - FAT32 still does not experience much difficulties, since physical access to the FAT area will also be compact and buffered.

Search for free space

This operation is performed if the file needs to be created from scratch or copied to disk. The search for a location for the physical data of the file depends on how information about the occupied areas of the disk is stored.

What affects this parameter: the speed of creating files, especially large ones. Save or create in real time large multimedia files (.wav, for example), copy large amounts of information, etc. This parameter shows how quickly the system can find a place to write new data to disk, and what operations it will have to do to do this.

  • To determine whether a given cluster is free or not, FAT-based systems should view one FAT entry corresponding to this cluster. The size of one FAT16 record is 16 bits, one FAT32 entry is 32 bits. To search for free disk space, you may need to view almost all of the FAT - 128 KB (maximum) for FAT16 and up to several megabytes (!) In FAT32. In order not to turn the search for free space into a disaster (for FAT32), the operating system has to go to various tricks.
  • NTFS has a bit map of free space, one cluster corresponds to 1 bit. To search for free disk space, it is necessary to estimate volumes that are ten times smaller than in FAT and FAT32 systems.

Conclusion : NTFS has the most effective system of finding free space. It is worth noting that it is very slow to operate on FAT16 or FAT32, therefore, various optimization methods are used to find free space in these systems, as a result of which an acceptable speed is achieved there too. (One thing is certain - finding a free space when working in DOS on FAT32 is a disastrous process because no optimization is possible without the support of at least a serious operating system).

Working with directories and files

Each file system performs basic operations with files - access, delete, create, move, etc. The speed of these operations depends on the principles of organizing the storage of data about individual files and from the structure of directory structures.

What affects this parameter : the speed of any operations with the file, including the speed of any file access operation, especially in directories with a large number of files (thousands).

  • FAT16 and FAT32 have very compact directories, the size of each record is extremely small. Moreover, because of the historically established system for storing long file names (more than 11 characters), FAT catalogs use a not very effective and seemingly unsuccessful, but very economical storage structure for these very long file names. Working with FAT directories is fast enough, because in the overwhelming majority of cases the directory (catalog data file) is not fragmented and is on the disk in one place.
    The only problem that can significantly reduce the speed of FAT directories is the large number of files in one directory (about a thousand or more). A data storage system - a linear array - does not allow you to organize an efficient search for files in such a directory, and to find this file you have to go through a large amount of data (on average - half the catalog file).
  • NTFS uses a much more efficient way of addressing - a binary tree, whose operation can be read in another article ( NTFS Structure ). This organization allows you to efficiently work with directories of any size - NTFS directories are not afraid of increasing the number of files in one directory and up to tens of thousands.
    It is worth noting, however, that the NTFS directory itself is a much less compact structure than the FAT directory - this is due to the much larger (several times) size of one directory entry. This circumstance leads to the fact that the directories on the NTFS volume in an overwhelming number of cases are strongly fragmented. The size of a typical directory on a FAT stacks in one cluster, whereas a hundred files (and even less) in a directory on NTFS already results in a file size of the directory that exceeds the typical size of one cluster. This, in turn, almost guarantees fragmentation of the catalog file, which, unfortunately, quite often negates all the advantages of much more efficient organization of the data itself.

Conclusion : the directory structure on NTFS is theoretically much more efficient, but with a catalog size of several hundred files, this is practically irrelevant. Fragmentation of NTFS directories, however, surely comes already at this directory size. For small and medium-sized directories NTFS, as it is not sad, has in practice less speed.

Advantages of NTFS directories become real and unquestionable only if thousands of files are present in one directory - in this case the speed compensates for the fragmentation of the directory itself and the difficulties with physical access to the data (for the first time - the directory is cached later). Hard work with directories containing about a thousand or more files passes on NTFS literally several times faster, and sometimes the gain in speed in comparison with FAT and FAT32 reaches tens of times.

2. Practice

Unfortunately, as it often happens in all sorts of computer issues, the practice is not very well consistent with the theory. NTFS, which seems to have obvious advantages in the structure, shows not so fantastic results as one would expect. What other considerations affect the speed of the file system? Each of the issues discussed below contributes to the overall performance. Remember, however, that real speed is the result of all factors at once, so in this part of the article, do not make hasty conclusions.

2.1. The amount of RAM (caching)

Very many data of modern file systems are cached or buffered in the computer's memory, which avoids unnecessary operations of physically reading data from the disk. For normal (high-performance) system operation, the cache has to store the following types of information:

  • Data about the physical location of all open files. This, first of all, will allow access to system files and libraries, access to which goes literally constantly, without reading the service information (not relating to the files themselves) from the disk. The same applies to the files that are being executed at the moment - i.e. To executable modules (.exe and .dll) of active processes in the system. This category also includes files of the system with which the work is done (primarily the registry and virtual memory, various .ini files, and also files of documents and applications).
  • The most frequently used directories. These include desktop, start menu, system catalogs, Internet cache catalogs, etc.
  • Data on the free disk space - i.e. That information, which will allow you to find a place to save new data to disk.

In the event that this basic amount of information is not available directly in the main memory, the system will have to perform many unnecessary operations even before it starts working with real data. What is included in these volumes in different file systems? Or, the question in a more practical way - how much free memory should be allocated to effectively work with a particular file system?

  • FAT16 has very little data that is responsible for organizing the file system. From the service areas, you can select only the FAT area itself, which can not exceed 128 KB (!) - this area is responsible for searching for fragments of files, and for searching for free space on the volume. FAT catalogs are also very compact. The total amount of memory required for extremely efficient work with the FAT can range from hundreds of kilobytes to megabytes-another, given the huge number and size of the directories with which work is being done.
  • FAT32 differs from FAT16 only in that the FAT area itself can have more impressive sizes. On volumes of about 5 - 10 GB, the FAT area can occupy a volume of several MB, and this is already a very impressive amount, which can not be reliably cached. Nevertheless, the FAT area, or rather those fragments that are responsible for the location of working files, in the vast majority of systems are in the memory of the machine - this consumes about several MB of RAM.
  • NTFS, unfortunately, has much greater memory requirements for the system. First of all, caching greatly hinders the large size of the directories. The size of only the directories with which the system is actively working, can easily reach up to several MB and even tens of MB! Add to this the need to cache a map of the free space of the volume (hundreds of KBytes) and MFT records for the files that are being used (in a typical system - 1 KB per file). Fortunately, NTFS has a successful storage system that does not increase any fixed areas when the disk capacity is increased. The amount of data that the NTFS-based system operates on is practically independent of the volume of the volume, and the catalogs are the main contributor to the amounts of data that need to be cached. However, this is already enough to ensure that only the minimum amount of data needed to cache the basic areas of NTFS, reached 5 - 8 MB.

Unfortunately, we can say with certainty: NTFS loses a huge amount of its theoretical performance due to insufficient caching. On systems with less than 64 MB of memory , NTFS simply can not be faster than FAT16 or FAT32. The only exception to this rule is FAT32 disks, which have a volume of tens of GBytes (I personally would seriously be afraid of FAT32 disks larger than, say, 30 GB). In other cases - systems with less than 64 megabytes of memory simply have to work with FAT32 faster.

The typical memory capacity of 64 MB now , unfortunately, also does not allow to organize effective work with NTFS. On small and medium-sized disks (up to 10 GB) in typical systems, FAT32 will probably work a little faster. The only thing that can be said about the speed of systems with such a volume of RAM - systems running with FAT32, will suffer much more from fragmentation than systems on NTFS. But if at least occasionally to defragment the disks, then FAT32, from the point of view of performance, is the preferred option. Many people, however, choose NTFS in such systems - simply because it will give some rather important advantages, whereas the typical performance loss is not very high.

Systems with more than 64 MB , and especially with 128 MB or more memory, will be able to confidently cache absolutely everything that is necessary for the operation of systems, and here on such computers NTFS is likely to show higher performance due to more thoughtful organization of data .

2.2. Drive speed

Do the physical parameters of the hard disk affect the speed of the file system? Yes, although not much, but they influence. You can distinguish the following parameters of the physical disk system, which differently affect different types of file systems:

  • Time of random access (random seek time). Unfortunately, in order to access system areas on a typical disk of a more complex file system (NTFS), it is necessary to perform, on average, more disk head movements than in simpler systems (FAT16 and FAT32). Much greater fragmentation of directories, the possibility of fragmentation of system areas - all this makes NTFS drives much more sensitive to the speed of reading arbitrary (random) areas of the disk. For this reason, it is not recommended to use NTFS on slow (old) disks, since high (worst) track search time gives one more plus in favor of FAT systems.
  • Availability of Bus Mastering. Bus Mastering - a special mode of operation of the driver and controller, when using which the exchange with the disk is made without the participation of the processor. It should be noted that the system of latent caching NTFS will be able to operate much more efficiently with the presence of Bus Mastering. NTFS performs a deferred recording of a much larger number of data. Systems without Bus Mastering nowadays are quite rare (usually they are drives or controllers running in PIO3 or PIO4 mode), and if you work with such a disk - most likely, NTFS will lose a couple more performance points, especially with directory modification operations (For example, active work on the Internet - work with the Internet cache).
  • Caching both reads and writes at the level of hard disks (HDD buffer size - from 128 KB to 1-2 MB in modern expensive disks) is a factor that will be more useful for FAT-based systems. NTFS for reasons of reliability of information storage modifies the system areas with the flag "do not cache write", so the speed of the NTFS system depends little on the possibility of caching the HDD itself. FAT systems, on the other hand, will get some plus from caching the record at the physical level. It should be noted that, generally speaking, seriously consider the size of the HDD buffer when assessing the performance of these or other file systems is not worth it.

Briefly summarizing the effect of disk and controller speed on system performance in general, you can say this: NTFS suffers from slow disks much stronger than FAT.

2.3. Cluster size

I would like to say a few words about the size of the cluster - the parameter that can be set arbitrarily in FAT32 and NTFS file systems when formatting. First of all, I must say that the larger size of the cluster is almost always faster. The cluster size on the NTFS volume, however, has less impact on performance than the cluster size for the FAT32 system.

  • A typical cluster size for NTFS is 4 KB. It's worth noting that with a large cluster size, the built-in file system's ability to compress individual files is turned off, and the built-in API for defragmentation also stops working. The overwhelming number of defragmenters, including those built into Windows 2000, will not be able to defragment this disk. SpeedDisk, however, can - it does not work through this API. Optimum in terms of speed, at least for medium and large files, it is considered (most Microsoft) the size of 16 KB. It is further unreasonable to increase the size due to too high expenses for inefficient storage of data and because of a meager further increase in performance. If you want to increase the speed of NTFS at the cost of loss of compression - think about formatting a disk with a cluster size greater than 4 KB. But keep in mind that this will give a fairly modest speed increase, which often does not even cost a reduction in the efficiency of file allocation on the disk.
  • The speed of the FAT32 system, on the contrary, can be significantly increased by increasing the cluster size. If in NTFS the cluster size has almost no effect on the size and character of the data of the system areas, then in the FAT system increasing the cluster by half, we reduce the FAT area in the same two times. Remember that in a typical FAT32 system this area, which is very important for performance, takes up several MB. Reducing the FAT area several times will give a noticeable increase in performance, since the amount of system data of the file system will be greatly reduced - the time spent reading the location of files and the amount of RAM necessary to buffer this information also decrease. A typical cluster volume for FAT32 systems is also 4 KB, and increasing it to 8 or even to 16 KB - especially for large (ten or more gigabytes) disks - is a reasonable step.

2.4. Other considerations

NTFS is a fairly complex system, therefore, unlike FAT16 and FAT32, there are other factors that can lead to significant slowdown of NTFS:

  • The NTFS drive was obtained by converting the FAT16 or FAT32 partition (the convert command). This procedure in most cases is a difficult case for speed, since the structure of NTFS service areas is likely to get very fragmented. If possible, avoid converting other systems to NTFS, as this will create a very bad disk, which even a typical (unspecialized) defragmenter, such as Diskeeper or built-in in Windows 2000, does not help.
  • Active work with a disk filled with more than 80% - 90%, is a disastrous for the speed of the NTFS case, because the fragmentation of files and, most importantly, the service areas, will grow fantastically quickly. If your disk is used in this mode - FAT32 will be a better choice under any other conditions.

3. Conclusions

In this final part, "one line" contains key features of the performance of these three file systems.

FAT - pluses:

  • A bit of RAM is required for efficient operation.
  • Quick work with small and medium catalogs.
  • Disk makes on average a smaller number of head movements (in comparison with NTFS).
  • Effective work on slow disks.

FAT - cons:

  • Catastrophic performance loss with increasing fragmentation, especially for large disks (FAT32 only).
  • Difficulties with random access to large (say, 10% or more of the disk size) files.
  • Very slow work with directories containing a large number of files.

NTFS - pluses:

  • Fragmentation of files does not have practically any consequences for the file system itself - the work of the fragmented system worsens only in terms of access to the actual data files.
  • The complexity of the directory structure and the number of files in one directory also does not cause any special obstacles to speed.
  • Quick access to an arbitrary fragment of the file (for example, editing large .wav files).
  • Very fast access to small files (several hundred bytes) - the entire file is in the same place as the system data (MFT record).

NTFS - cons:

  • Essential requirements for system memory (64 MB - absolute minimum, better - more).
  • Slow disks and controllers without Bus Mastering greatly reduce the performance of NTFS.
  • Working with medium-sized catalogs is difficult because they are almost always fragmented.
  • A disk that runs for a long time in an 80% to 90% full state will show very low performance.

I would like to emphasize once again that in practice the main factor on which the speed of the file system depends is, strangely enough, the amount of memory the machine has. Systems with a memory of 64-96 MB are a milestone in which the performance of NTFS and FAT32 is roughly equivalent. Pay attention also to the complexity of organizing data on your machine. If you do not use anything other than the simplest applications and the operating system itself, it can happen that FAT32 can show higher performance on machines with more memory.

NTFS - a system that was laid for the future, and this future for most of today's real applications still, unfortunately, apparently did not come. At the moment, NTFS provides a stable and indifferent to a number of factors, but, perhaps, still not high - on a typical "gaming" home system - speed. The main advantage of NTFS from the point of view of performance is that such parameters as directory complexity (the number of files in one directory), disk size, fragmentation, etc. are indifferent to this system. In FAT systems, on the contrary, each of these factors will lead to a significant decrease in the speed of operation.

Only in complex high-performance systems - for example, in graphic stations or simply on serious office computers with thousands of documents, or even file servers - the advantages of the NTFS structure will be able to give a real speed advantage, which is sometimes noticeable to the naked eye. Users who do not have large disks packed with information and not using complex programs should not wait for NTFS wonders of speed - in terms of performance on simple home systems, FAT32 will prove much better.