Introductory
First, let's figure out what a cluster is. All file systems used by Windows organize your hard drive based on something called cluster size (also known as allocation block size).
The cluster size is the smallest amount of disk space that can be used to store a file.
If file sizes do not reach an even multiple of the cluster size, additional space must be used to store the file (up to the next multiple of the cluster size). On a typical hard drive partition, the average amount of space that is lost in this way can be calculated using the equation:
(cluster size) / 2 * (number of files)
How to change cluster size
As mentioned in the first paragraph of the article, to change the cluster size you must either format the partition or delete it and create it again. Either using Windows tools or third-party software for working with disks from Acronis , AOME , Paragon , etc. If there is data on the partition, it can be temporarily transferred to another partition, another information device, or to the cloud as a last resort. And this will be the most correct option.
Changing the cluster size of a partition with existing data without temporarily moving it to another location is a potentially risky operation. First of all, it’s a risky operation. Secondly, it takes a long time, because as part of it, data is rewritten to fit the new cluster size. Thirdly, such an operation is provided only by third-party disk managers, and usually within the framework of paid features, if the basic functions in such programs are free. As, for example, is the case with MiniTool Partition Wizard .
Cluster size as an illustrative example
Perhaps the last sentence and formula confused you a little. Let's try to explain it simpler and more clearly. Surely, when you opened the properties of a folder, you came across the following picture:
That is, the size of the folder with files and the actual size of the occupied disk space, in fact, differ up or down. This is precisely related to the cluster size chosen by you (or the system) when formatting/creating the partition.
Once again, a cluster is the smallest logical amount of disk space that can be allocated to store a file. Now try to imagine that your disk consists of many, many cells with their own numbering, where you can put a file. This is most clearly visible during defragmentation (although the file system block is most often shown there, and not the cluster, but still):
The size of these cells is the cluster size. Now let's talk about how to take off with this.
Determining the sector volume
The standard cluster size directly depends on the selected file system:
- FAT32 ranges from 1024 bytes to 32 kb;
- NTFS cluster size (NTFS) from 512 bytes to 64 kb;
- FAT is always 64 kb and is not popular among users;
- exFAT cluster sizes range from 512 bytes to 32 MB.
To correctly determine the capacity of a cell, you should decide in advance what data will be stored on the media, what its type and volume are. For photos, videos or music, it is preferable to choose the maximum cell size. If the disk will be used for documents, then it is recommended to opt for a small volume.
How to take off with this and what you should understand
Visually, I think you can imagine what it looks like. Let's figure out how it works.
Let's assume that the cluster size is 4 KB (usually the default value, not counting the most senior versions of systems). The way it works is that a smaller file placed there will still occupy 4 KB. An illustrative example:
Two smaller files are already 8 KB:
That is, relatively speaking, in the example shown above, - you are losing space, - because storing small files in a file system with larger (than the file size) clusters will lead, conditionally, to loss (downtime) of disk space.
But at the same time, storing large files on a small cluster size leads to excessive fragmentation (not critical for an SSD) of this file into many small pieces, which will require more access time and will affect performance. In this case, often (but not always), free space will not be lost.
To put it simply, here's what we should take away:
- You choose the average (neither here nor there) cluster size, if you probably don’t know what files you will have stored on the disk, you can’t keep track of them all, and in general you’re trying to get into the golden mean;
- You know for sure that mostly small files will be stored on the disk and choose the smallest possible cluster size;
- You don’t care about a small gain in performance at the cost of losing space, so you choose the smallest possible cluster size;
- You know for sure that mostly large files will be stored on the disk and choose the largest available cluster size;
- You really care about the gain in performance, at the cost of losing space, and choose the largest available cluster size;
- You are a Microsoft adherent who knows better than me why I read this article and leave the default size.
But that is not all. For adherents of the latter path, the following is a set of tables that are used by Miscrosoft by default, depending on the media size, that is, these are the default values set by the system. Whether to use them or not is up to you.
What does cluster size affect?
In essence, a cluster is the minimum volume that is allocated on the media for certain files. To make the selection principle more clear, we need to understand what the cluster size itself influences. For example, you have a small file that is only 1 byte in size, and the disk cluster size is 4096 bytes. The saved file will take up 4096 bytes of free space on the media. If such a file is transferred to media with a cluster of 512 bytes in size, then, naturally, it will take up significantly less space.
In other words, numerous small files will take up minimal space on media that has a cluster size of 512 bytes and vice versa. But at the same time, large clusters make operations on input and output of information much faster, which as a result will affect reading and writing files.
A cluster size of 32 KB or more will be appropriate if large files are stored on your storage device. Moreover, for any flash drive, the optimal cluster size is only 4 KB or less.
Don't forget about this when formatting. But this rule only applies if you use a flash drive to transfer and store small files.
Finally, it is worth noting that if you are not sure of the correct choice, you can always use the magic “Default” button. It's safe to say that this is the golden mean and you won't have to doubt it anymore.
File system type
As already mentioned, the range of available cluster size depends on the file system. You can find out by right-clicking on the disk in Explorer (“My Computer”) and selecting “Properties”.
In the corresponding column you will see what file system you selected when formatting the disk or external drive (if you are working with it).
To find out the current file size, launch the command line ("search - cmd" or "WIN + R" on the keyboard - cmd) and enter:
fsutil fsinfo ntfsinfo X:
The result will not be long in coming (not clickable):
Let's move on.
Optimal size of a flash drive memory cluster
I’ll tell you a little about choosing clusters for memory cards.
Author-I As you know, “disk” space does not consist of a whole piece, but of memory cells-clusters. Each such cluster has its own number. Of course, there are service areas of memory that I won’t talk about, but there are also ordinary ones. That's what I want to tell you about. What is "cluster size"? This is a certain size of a memory cell, a cluster, that the cluster is able to accommodate. on today's flash drives, the cluster size can be set to almost any size, from 512 bytes to 64 kilobytes, or even more - whatever your imagination is capable of. Why do you need to set the cluster size? Setting the cluster size is necessary for the correct storage of information on the memory card and, accordingly, the correct reading of it from the card. Selecting the cluster size comes before formatting the memory card in a computer or laptop. Windows operating systems starting from XP can change the cluster size using standard means. If you change the cluster size for your phone, you can use a card reader, or simply connect your phone via USB. If a computer memory card, then naturally into the computer. Before starting formatting, select the file system type FAT32 memory card for the phone and computer (for the computer you can select the NTFS type, but in this case it will not be readable in the Windows 9.x, Me operating systems). Then specify the cluster size that you need (or set it automatically to the standard size for this card). How do we choose the volume? The cluster size depends on the size of the card. For 8 GB I had a size of 4 KB/cluster, I set it to 2 KB. By choosing a smaller size you get advantages - more data will fit on the card (example: if the cluster is 32kb, and the picture weighs 2kb, then it will still take up 32kb on the disk or flash drive, since the cluster size is 32kb. If you choose 1 kb, then it will take 2 clusters and, accordingly, 30kb will be free) and if the clusters are damaged (by removing the card without Safely removing it), less kilobytes will be lost. But increasing the cluster size has its own advantages. This is the speed of reading and writing data. It’s easier to read 32 kb all from 1 cluster than to read from another each time, and if not all clusters are included in the reading block, then read more. Therefore, depending on what you need, choose it. In the phone, I set it to 2 KB on an 8 GB card, but when saving texts or something else, or when moving, the phone began to think dead for 3-4 seconds. Even in ICQ, he thinks every time, saving messages to history every time. On my computer, I chose a 64 KB cluster (4GB card), after which movies and music are transferred to the card 2 times faster and read out too. It's up to you to choose. Or the speed or the size of the place. Good luck! PS Written at the request of users of the PS-2 site And here are a couple of cool flash drives: more cool photos to expand and collapse (The article has been edited)
Default cluster size for NTFS
The following table describes the default cluster sizes for the file system mentioned in the subtitle:
Volume size | Windows NT 3.51 | Windows NT 4.0 | Windows 10, Windows 8, Windows 7, Windows Server 2008 R2, Windows Server 2008, Windows Vista, Windows Server 2003, Windows XP, Windows 2000 |
7 MB - 512 MB | 512 bytes | 4 KB | 4 KB |
>512 MB - 1 GB | 1 KB | 4 KB | 4 KB |
1 GB - 2 GB | 2 KB | 4 KB | 4 KB |
2 GB - 2 TB | 4 KB | 4 KB | 4 KB |
2 TB - 16 TB | Not supported* | Not supported* | 4 KB |
16 TB - 32 TB | Not supported* | Not supported* | 8 KB |
32 TB - 64 TB | Not supported* | Not supported* | 16 KB |
64 TB – 128 TB | Not supported* | Not supported* | 32 KB |
128 TB – 256 TB | Not supported* | Not supported* | 64 KB |
> 256 TB | Not supported | Not supported | Not supported |
An asterisk (*) indicates that it is not supported due to Master Boot Record (MBR) limitations.
A small blog from a humble IT specialist.
And so, just yesterday I unexpectedly learned that 4k cluster alignment is also important for SSD drives. Initially, hard drives have an alignment of 512 bytes, this is due to the physical parameters of the disk, and therefore the formatting of such disks had to be a multiple of this value, which was always done; the cluster size during formatting varied from 512 bytes to 32 kbytes.
However, recently high-capacity hard drives have appeared, in which the previous addressing at the physical level of 512 bytes was increased to 4 kbytes.
Those. physically the disk is capable of addressing data whose beginning is a multiple of 4096 bytes. However, the OS places files according to the logical structure of clusters when formatting. It is very bad if the logical cluster does not match the physical block on the disk. To achieve this, disk manufacturers equip them with cluster pre-alignment utilities. Essentially, these are formatting programs that format the disk so that the beginning of the cluster always coincides with the beginning of the block.
However, this mainly concerned (as it seemed to me) only high-capacity disks (from 2TB). It turned out that this was not the case. All SDDs are susceptible to this, and here's why:
SSDs consist of memory chips whose size is strictly equal to a power of two, and as a result - a block size of 4k. If data on an SSD disk is placed without alignment, a multiple of 4096 bytes, then the speed of primarily writing, and writing small files, drops sharply.
According to some information, Windows 7 immediately performs alignment during a clean installation on an SSD. However, when transferring a system from HDD to SSD using various utilities, it is very likely that the required alignment will not be achieved.
How to check if your SSD drive is aligned?
Download the SSD drive testing program -
AS SSD Benchmark.
Even without running the test itself, it shows whether your drive is aligned or not. (only applicable for SSD!).
The red inscription tells us that the disk is not aligned.
How to align a disk without losing data?
1. First, it is recommended to make a backup of your valuable data, or even a full disk backup using any utility you like.
This step is optional. 2. Download the Paragon Alignment Tool
(300 rubles), it can be found for free in well-known places
.
3. Launch the program, select only the SSD disk or 4k-HDD disk (only if the program highlights them in yellow). If the color of the disk is red, then for some reason it cannot be aligned. Usually you cannot align a Windows 7 service disk (100 -300 MB in size). 4. Start the alignment procedure, if you need to reboot to align the system partition. Attention! The equalization time is approximately equal to the time it takes to completely write the entire disk volume.
This is what I got after 20 minutes of waiting:
As you can see, recording speeds, especially for small files, have increased significantly. As is the overall rating of the disc.
source: forum.boolean.name/showthread.php?t=16178
Post Views: 4,165
Default cluster size for FAT32
The following table describes the default cluster sizes for the file system mentioned in the subtitle:
Volume size | Windows NT 3.51 | Windows NT 4.0 | Windows 7, Windows Server 2008 R2, Windows Server 2008, Windows Vista, Windows Server 2003, Windows XP, Windows 2000 |
7 MB - 16 MB | Not supported | Not supported | Not supported |
16 MB - 32 MB | 512 bytes | 512 bytes | Not supported |
32 MB - 64 MB | 512 bytes | 512 bytes | 512 bytes |
64 MB - 128 MB | 1 KB | 1 KB | 1 KB |
128 MB - 256 MB | 2 KB | 2 KB | 2 KB |
256 MB - 8 GB | 4 KB | 4 KB | 4 KB |
8 GB - 16 GB | 8 KB | 8 KB | 8 KB |
16 GB - 32 GB | 16 KB | 16 KB | 16 KB |
32 GB - 2 TB | 32 KB | Not supported | Not supported |
> 2 TB | Not supported | Not supported | Not supported |
Let's move on.
I can’t decide which cluster size to choose when formatting
Greetings to my readers, and today I am very pleased to move from theory closer to practice. Today we will find out what cluster size to choose when formatting NTFS. It is NTFS that most users often use, so let’s touch on it. This is a real-life task that comes up all the time when preparing your hard drive for a Windows reinstall. And also in other situations.
First, let's remember what a cluster and NTFS are and what is the connection between these concepts. So, the computer memory (or flash drive, or memory card) is divided into separate sectors of 512 bytes or 4 KB, which in turn are grouped into clusters. Accordingly, the cluster size is a multiple of the sector volume.
The file system, among other functions, determines the possible cluster size:
- In outdated FAT32 it is from 1 to 32 MB;
- The one that replaced it in USB drives is exFAT – from 4 to 128 MB;
- The most stable NTFS that interests us is from 4 to 64 MB;
Default cluster size for FAT16
The following table describes the default cluster sizes for the file system mentioned in the subtitle:
Volume size | Windows NT 3.51 | Windows NT 4.0 | Windows 7, Windows Server 2008 R2, Windows Server 2008, Windows Vista, Windows Server 2003, Windows XP, Windows 2000 |
7 MB - 8 MB | Not supported | Not supported | Not supported |
8 MB - 32 MB | 512 bytes | 512 bytes | 512 bytes |
32 MB -64 MB | 1 KB | 1 KB | 1 KB |
64 MB - 128 MB | 2 KB | 2 KB | 2 KB |
128 MB - 256 MB | 4 KB | 4 KB | 4 KB |
256 MB - 512 MB | 8 KB | 8 KB | 8 KB |
512 MB -1 GB | 16 KB | 16 KB | 16 KB |
1 GB - 2 GB | 32 KB | 32 KB | 32 KB |
2 GB - 4 GB | 64 KB | 64 KB | 64 KB |
4 GB - 8 GB | Not supported | 128 KB * | Not supported |
8 GB - 16 GB | Not supported | 256 KB * | Not supported |
> 16 GB | Not supported | Not supported | Not supported |
An asterisk (*) means that it is only available on media with a sector size greater than 512 bytes.
Disadvantages and limitations of FAT file systems
The other side of the coin is that if there are more of these boxes than the system can “see,” then not all of them will be used, but only those with enough numbers. Because of this, a large hard drive may either not be formatted with this file system at all, or show less capacity after the operation.
Another disadvantage is that if the cluster occupies several sectors, then there may be a loss of free space, because if it is 32 KB, and only 1 KB is occupied, then the remaining 31 will remain unoccupied.
The restrictions if you use the minimum and maximum cluster size when formatting will be the following:
FAT file system version | Maximum number of clusters | Minimum cluster size / Disk size at this value | Maximum cluster size / Disk size at this value | Maximum possible file size |
12 | 212 = 4096 | 512 b / 2 MB | 8192/32 MB | 32 MB |
16 | 216 = 65 536 | 512 b / 32 MB | 32768/2 GB** | 2 GB |
32 | 228* = 268435456 | 512 b / 128 GB | 32768/8 TB** | 4 GB |
*Due to OS features.
**Some programs or operating systems that support FAT are theoretically capable of reading clusters larger than 32 KB. In such cases, the limit would be 64 KB and twice the maximum disk size. But the loss of space in this case reached 50% and the question of what cluster size to choose was unnecessary - it is much more profitable to divide the disk into 2 parts and use a “box” with a capacity of no more than 32 KB.
Default cluster size for exFAT
The following table describes the default cluster sizes for the file system mentioned in the subtitle:
Volume size | Windows 7, Windows Server 2008 R2, Windows Server 2008, Windows Vista, Windows Server 2003, Windows XP |
7 MB - 256 MB | 4 KB |
256 MB - 32 GB | 32 KB |
32 GB - 256 TB | 128 KB |
> 256 TB | Not supported |
And finally, an afterword that slightly summarizes the whole thing. Once again, yes.
System Methods
You can format a solid-state drive without causing harm without using third-party software. Standard Windows tools and tools are quite sufficient for this.
Method 1: This PC folder
The easiest and fastest way to format an SSD is to do it the same way as with a hard drive: through “My Computer” or “This Computer”. For this:
- Open the “This PC” or “Computer” system folder by pointing at the desired icon and double-clicking LMB. Right-click on the drive that needs formatting and click “Format...”.
- Set the Capacity, File System, Allocation Unit Size, and Volume Label options. Be sure to check the “Quick (clean up table of contents)” box so that formatting is not complete, and click “Start.”
Method 2: Disk Management
The next most convenient option is the special “Disk Management” panel, in which you can perform various operations with drives, including formatting. Follow these steps:
- Right-click on the “Start” button and go to the “Disk Management” panel.
- Select the local drive that you want to format, and right-click on it, then click “Format...”.
- Define the first three parameters in the same way as in the methods described above, by checking the “Quick Format” line and click “OK”.
Afterword
From the point of view of space efficiency, that is, saving free disk space, of course, a small cluster looks very attractive and allows you not to lose large volumes out of the blue. On the other hand, in fact, the further you go, the larger and cheaper the disks are, so sometimes you can neglect losses for the sake of performance and less data fragmentation. On the other hand, is it worth the bother if you have an SSD. On the other hand, it is unlikely that you store terabytes of movies, music, photos and other files larger than a megabyte on an SSD.
What to do? As in the case of the swap file, choose a solution that suits your goals, objectives and hardware, or simply don’t bother, but then it’s absolutely not clear why you read this
As always, if you have any questions, reasonable thoughts and final additions, then welcome to comment on this material.
What is a disk space cluster
A cluster is a logical unit of disk space, its minimum block allocated for writing a file. Hard drives have a physical unit of disk space called a sector . Sectors can be 512 or 4096 bytes in size. This is a parameter preset by the hard drive manufacturer and cannot be changed by software. The latter can operate only with a logical unit – a cluster. And operate only within the capabilities of the selected file system. For example, for NTFS the cluster size can be set from 512 bytes to 2 MB (2048 KB).
We can choose a cluster size different from the default one when formatting a partition using Windows.
Windows 7 and 8.1 allow you to set the cluster size to a maximum of 64 KB. In Windows 10, you can choose a larger size - from 128 to 2018 KB.
We can also choose the cluster size at our discretion when creating partitions in standard disk management. Create a volume (partition).
Specify the volume size.
Let's move on.
And at the volume formatting stage, we select the cluster size.
So, a cluster is a single block for storing files. Each file is written to a new cluster. A file weighing more than the size of a cluster, accordingly, occupies several clusters. The smaller the cluster size, the more efficiently the disk space will be used, provided that it primarily stores small files up to 512, 1024, 2048 bytes, etc. Whereas with a larger cluster, disk space will be less efficiently occupied by low-weight data. But the question of efficiency will not arise if data with a weight of 64 KB or another selected size is stored on disk. At the same time, we also get a slight increase in performance in the speed of reading and writing the HDD under fragmentation conditions. With a larger cluster size, the fragmented file is divided into fewer parts, which reduces the number of HDD read head offsets.