Question Does formatting an SSD's disk allocation size below 4096 bytes increase the risk of data loss?

universalrule

Prominent
Jul 3, 2023
46
2
535
Yesterday, I asked ChatGPT if it could increase the risk of data loss if I set the disk allocation size smaller than 4096 bytes when I format the SSD, and I got the following answer. I want to make sure if this is true.

'''
Yes, formatting an SSD's disk allocation size below 4096 bytes can increase the risk of data loss. SSDs use flash memory, which has a limited number of write cycles. When you format an SSD, the entire drive is erased, and the data is rewritten to the drive. If the disk allocation size is small, then more data will need to be rewritten, which can shorten the lifespan of the drive. Additionally, a smaller disk allocation size can lead to fragmentation, which can also slow down the drive and make it more likely that data will be lost.
For these reasons, it is generally recommended to format an SSD with a disk allocation size of 4096 bytes. This is the default allocation size for most SSDs, and it strikes a good balance between performance and lifespan.
Here are some additional tips for formatting an SSD:
Use a compatible formatting tool. Some formatting tools are not compatible with SSDs, so it is important to use one that is designed specifically for SSDs.
Back up your data before formatting. It is always a good idea to back up your data before formatting any drive, but it is especially important to do so when formatting an SSD.
Use the default disk allocation size. As mentioned above, the default disk allocation size for most SSDs is 4096 bytes. This is the best size for most users.
Avoid defragmenting your SSD. Defragmenting an SSD can actually shorten its lifespan, so it is best to avoid doing so.
By following these tips, you can help to ensure that your SSD will last for many years to come.
'''
 

RealBeast

Titan
Moderator
Yesterday, I asked ChatGPT if it could increase the risk of data loss if I set the disk allocation size smaller than 4096 bytes when I format the SSD, and I got the following answer. I want to make sure if this is true.

'''
Yes, formatting an SSD's disk allocation size below 4096 bytes can increase the risk of data loss. SSDs use flash memory, which has a limited number of write cycles. When you format an SSD, the entire drive is erased, and the data is rewritten to the drive. If the disk allocation size is small, then more data will need to be rewritten, which can shorten the lifespan of the drive. Additionally, a smaller disk allocation size can lead to fragmentation, which can also slow down the drive and make it more likely that data will be lost.
For these reasons, it is generally recommended to format an SSD with a disk allocation size of 4096 bytes. This is the default allocation size for most SSDs, and it strikes a good balance between performance and lifespan.
Here are some additional tips for formatting an SSD:
Use a compatible formatting tool. Some formatting tools are not compatible with SSDs, so it is important to use one that is designed specifically for SSDs.
Back up your data before formatting. It is always a good idea to back up your data before formatting any drive, but it is especially important to do so when formatting an SSD.
Use the default disk allocation size. As mentioned above, the default disk allocation size for most SSDs is 4096 bytes. This is the best size for most users.
Avoid defragmenting your SSD. Defragmenting an SSD can actually shorten its lifespan, so it is best to avoid doing so.
By following these tips, you can help to ensure that your SSD will last for many years to come.
'''
I would not rely on ChatGPT for computer advice. Modern SSDs manage wear and most outside of a commercial use will outlast their need. Why do you want to decrease the default size below 4K? What brand and model is your SSD?
 

universalrule

Prominent
Jul 3, 2023
46
2
535
I would not rely on ChatGPT for computer advice. Modern SSDs manage wear and most outside of a commercial use will outlast their need. Why do you want to decrease the default size below 4K? What brand and model is your SSD?
Hi, I have various kinds of brands. Samsung, WD and Micron. Most of them are 4TB and two of them are 2TB.
Why I decreased the size below 4k is saving the room. But it seems it isn't so much different.
 

USAFRet

Titan
Moderator
So, you agree with chatGPT?
No.

I'm saying 2 things:
1. Do NOT rely on ChatGPT for any real input
2. There is NO need to change the default allocation size.

2a. OK, maybe if you were running a database server, with carefully curated and documented data access, and the server software (Oracle, SQLServer, MySQL, etc) recommends a different allocation size for your particular dataset.
But as I'm guessing that does not apply to you, see #2.
 
  • Like
Reactions: RealBeast

universalrule

Prominent
Jul 3, 2023
46
2
535
No.

I'm saying 2 things:
1. Do NOT rely on ChatGPT for any real input
2. There is NO need to change the default allocation size.

2a. OK, maybe if you were running a database server, with carefully curated and documented data access, and the server software (Oracle, SQLServer, MySQL, etc) recommends a different allocation size for your particular dataset.
But as I'm guessing that does not apply to you, see #2.
Thanks for the details. So, are you telling that decreasing the allocated unit size to 1024 bytes doesn't help to save the room of SSD so much?
 
The allocation unit size does not affect the chances for data loss.

Regarding allocation unit size, it doesn't really matter for most people because the file will take up space equal to how many allocation units it needs plus 1. So unless all your files are well under the allocation unit size, the "wasted" space is going to be a tiny percentage of the total file size.

Note that if the file size is less than 1KB, NTFS actually stores its contents in the file record itself to avoid needing to allocate a block of data.
 
The average wasted space per file is half the cluster size. A file system with 4KB clusters wastes 2KB per file, while 1KB clusters waste 512B per file. So the net gain in switching from 4KB to 1KB would be 1.5KB per file. If the number of files is 1 million, then the saving is 1.5GB.
 
  • Like
Reactions: AgentBirdnest

universalrule

Prominent
Jul 3, 2023
46
2
535
The allocation unit size does not affect the chances for data loss.

Regarding allocation unit size, it doesn't really matter for most people because the file will take up space equal to how many allocation units it needs plus 1. So unless all your files are well under the allocation unit size, the "wasted" space is going to be a tiny percentage of the total file size.

Note that if the file size is less than 1KB, NTFS actually stores its contents in the file record itself to avoid needing to allocate a block of data.
Hmm....I think I understood it. Thanks to make it clear!
 
The average wasted space per file is half the cluster size. A file system with 4KB clusters wastes 2KB per file, while 1KB clusters waste 512B per file. So the net gain in switching from 4KB to 1KB would be 1.5KB per file. If the number of files is 1 million, then the saving is 1.5GB.
If I were to take my own setup as a "reasonable" example of usage, I have about 598,277 files totaling 1.4TiB of usage. I'm pretty sure I'm using 4KiB allocation units, so using that average, I have 1.14GiB of space wasted, or about 0.077% of the space I'm using wasted.

Yeah I don't think that's enough to really worry about.
 

universalrule

Prominent
Jul 3, 2023
46
2
535
The average wasted space per file is half the cluster size. A file system with 4KB clusters wastes 2KB per file, while 1KB clusters waste 512B per file. So the net gain in switching from 4KB to 1KB would be 1.5KB per file. If the number of files is 1 million, then the saving is 1.5GB.
Oh, this answer is accurate and clear! So, that means all of my 4TB drives can save less than 3GB.
Thank you so much!