What is the size of a distribution unit and what cluster size should you set when formatting a storage medium?

Is it necessary to say that in everyday work, any user has to deal with formatting hard drives or removable drives in the form of the most common flash drives or memory cards? When this process is activated, most of us usually do not pay attention to the set size of the distribution unit, called the cluster, leaving this option at the discretion of the operating system itself. In principle, this approach is correct. However, sometimes it is advisable to change this value. Why is this necessary and what factors should be considered when choosing, then we’ll talk.

What is cluster size?

If anyone does not know, absolutely on all drives, the files recorded on them are stored not as solid objects, but in the form of parts distributed across clusters, which are kind of cells into which the hard drive or the same flash drive is divided. In Windows systems, there is a strict rule related to the fact that the OS, when using (and formatting) the media, independently reserves the minimum amount of disk space for storing information. This is the size of the distribution unit.

Minimum cluster size in NTFS

Depending on the modification of the file structure and the size of the volume, the minimum size can be either 512 bytes or 4 KB. The OS itself sets the required size based on the automatic recognition of such options. But it is far from always advisable to use them.

How to choose the size of the distribution unit when formatting: the main criteria that affect the installation of preferred options

First of all, you need to clearly understand that the choice of the user is significantly affected by a number of factors that the operating system itself may not take into account. Among the most important are the following:

  • preferred FS;
  • sizes of saved files;
  • write / read speed when working with media.

As a consequence, we can distinguish the frequency of the OS's access to the storage medium when some actions related to copying or moving information are performed with the files present on it.

File system

File structures used for different types of drives have their own limitations, and their application to certain types of devices is strictly regulated.

All supported cluster sizes in NTFS

Today, NTFS is considered the most advanced, but when you install some versions of Windows from removable drives (flash drives) it can not be used.

All supported cluster sizes in FAT32

If we are talking about, say, choosing the size of the distribution unit when formatting the hard drive in FAT32 or NTFS, it is better to give preference to the second type, since FAT32 does not support working with modern HDDs and SSDs that have a volume of more than 2 TB, and does not allow recording files, the size of which exceeds 4 GB. And the automatic parameters offered by Windows itself, in most cases, do not need to be changed. The same theoretically can be attributed to flash drives.

All supported cluster sizes in exFAT

However, sometimes it is advisable to use ext / exFAT file systems for memory cards.

file size

Now let's decide on one of the most important parameters that determine the choice of the size of the distribution unit when formatting the flash drive, as applied to NTFS file structures, in which the minimum cluster size is 4 KB or 4096 bytes.

Immediately it is worth focusing on the fact that this is the minimum size below which it will not work to set or use a value. Now consider the simplest example. Suppose you copy or save a file on a flash drive, which in theory is 1 KB in size. It is recorded in one cluster and occupies it in its entirety. That is, in fact, 3 Kb can be attributed to unaccounted for losses. Now imagine how much free space will be wasted in the presence of a large number of small-sized objects!

One more example. You set the size of the distribution unit to 32 Kb and place text documents with sizes much smaller than the specified minimum (for example, 4 Kb each) on the drive. Anyway, each of them will take the same 32 Kb, and 28 Kb for each object will simply be lost.

The reliability of the drive in operation, the speed of reading and often access to the drive

Now we come to an understanding of the correctness of the choice of the minimum size of the distribution unit on the other hand. Suppose you set the cluster size too small, but recorded a very large file (for example, audio or video formats) on the drive. When copying, or even when playing music or a movie, the system will access the device on which the source file is located more often. In turn, such too frequent access to the device can provoke its early failure. But when setting a larger value for the cluster size, the circulation frequency will be significantly reduced, which will increase the life of the storage medium.

Flash drive performance for write / read speed

In addition, playing or copying audio and video from a drive that has a cluster size of 4 KB will be slower than setting the same value at 64 KB.

General summary and recommendations

Thus, summarizing all of the above, we can determine the preferred size of the distribution unit when formatting any of the known storage media:

  • for hard drives, it is better not to change the automatically set parameters in Windows;
  • when writing small files to flash drives, it is recommended that the size be reduced to a minimum threshold compatible with the size of the files themselves;
  • when recording or saving heavy files, it is better to increase the minimum size to a known limit.

In general, if we are talking about removable devices, first decide which information will be recorded on them, and only then set the necessary options.

Source: https://habr.com/ru/post/C10908/


All Articles