• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

Setting 4k sector size on NVMe SSDs: does performance actually change?

I cant help with this, most of my drives are 4K native already, and the ones that arent are 512e only
 
I cant help with this, most of my drives are 4K native already

Did they come like this from the factory or did you configure them that way? I assumed that most if not all consumer-grade SSDs would be pre-configured as 512e to prevent compatibility issues, even those models that allow end-users to change it later on.
 
Did they come like this from the factory or did you configure them that way? I assumed that most if not all consumer-grade SSDs would be pre-configured as 512e to prevent compatibility issues, even those models that allow end-users to change it later on.
It's a factory setting and I think it'd be good luck in changing it unless you know how to frig with the firmware
 
512k sectors hasn't been the default in a decade
 
512k sectors hasn't been the default in a decade
on HDD's yeah that it has so I don't know why they went backwards with NVMe
 
on HDD's yeah that it has so I don't know why they went backwards with NVMe
its not truly 512k its an emulated layer displayed to the os for compatibility with older boards/controllers
if the motherboard is sane it will initialize at 4K
remember ssds don't have physical sectors in the traditional sense the sector size is just a layer on the block device its still always 4K internally
 
512k sectors hasn't been the default in a decade
512e is the default on many modern drives still, since it works with older OS as well as modern 4k aware OS

to my knowledge, if its formatted with a 4k aware OS and the partitions are aligned, it can still be used in older systems without issue if they're 512e
 
if the motherboard is sane it will initialize at 4K
That's not how 512e works. It will use 4K clusters sure but you can't just change the low level format or presentation without special tools.

4kn drives are still the exception rather than the rule.

You can also still special order true 512n hard disks, if you really need them (I still don't know who would, but there are part numbers for them).

Anyways, my crucial ssds present as 512 sectors and I can't change that, so nothing to show here.
 
Whatever i tried to say, didn't come out. migraine. words. bleh.
 
Not sure if it affects ssd speed (don't have one to test on) but it definitely affects hdd speed, 512b cluster vs 4kb.

1cdmarkps4hddntfs.jpg
 
The thread is not about NTFS cluster size that you can change when formatting the drive with Windows.
 
The thread is not about NTFS cluster size that you can change when formatting the drive with Windows.

Has anybody else tried and benchmarked any performance difference (possibly also in mixed read/writes, high-I/O scenarios) in a more controlled environment?
I don't format drives with windows unless I have no other choice, the software I used to format the drive is Easeus partition master. You yourself asked for data to show the dif between 512b and 4k in the first post, well there's some data to indicate that drive speed is affected by cluster size. I will test further if/when I can.
 
Last edited:
To put it in different words, it's not about the cluster size of the filesystem used. It doesn't matter whether you use Windows or Easeus or other programs to format your partitions.

The 512/4k difference this thread is about is about Logical Block Address (LBA) size, sometimes called "disk sector size", which can only be configured—on the few drives that allow it—with low-level or firmware tools.

 
Last edited:
My bad I misunderstood the concept, all my internal drives have 512b sector size and 4kb cluster, both ssd's and hdd's.

sectorsize.jpg


I did find an article for how to do it to an Intel ssd however.

Instructions for changing the physical sector size

 
Last edited:
[...] I did find an article for how to do it to an Intel ssd however.

Instructions for changing the physical sector size


Interesting that the Intel link above mentions that with a 4096 byte sector size performance would be "optimal", although things may differ on datacenter-grade SSDs.

It looks like they may be only changing the Physical sector size though. If they changed the Logical sector size as well, data loss would be inevitable since the block range addressed by the underlying file system (at the OS level) would completely change.

For example, with 512/512 or 512/4096 bytes sector size (logical/physical) the OS will see about 1 billion LBA on a 500 GB SSD.
If one were to change this to 4096/4096 bytes (i.e. 4k sector size), the maximum LBA would become 1/8 of the original value, i.e. 125 millions (since 4096/512 = 8).
 
Last edited:
I ran into where i think the confusion on this comes from yesterday, fixing up an old PC
The owner had been re-using his 80GB IDE hard drive for a few operating systems, (XP to 7, at least) and then he bought a 1TB drive and cloned the OS over.


The PC was brought to me because despite being old, it shouldnt have ran as ass as it did - the HDD was always grinding, task manager showing 100% usage of the HDD at sub 5MB/s, and simple tasks like opening a browser tab could be instant or take a minute

In the end it turned out to be simple: His source drive was native 512, his destination was 4K/512e
And the original drive was not 4K aligned, since the partition was made in XP before 4K was even a thing, let alone AF (advanced format) 512e drives.


After spending assloads of time finding free software that could do the job without erroring out (the original drive had bad sectors and most tools detected 'corruption' and had fits) i got the job done, and the drive went from taking 45 minutes to complete a HDD benchmark to 200MB/s peak, 150MB/s sustained and 90MB/s minimum.

I get the feeling that any time this actually gives people performance boosts, it's because their partitions were not 4K aligned initially
 
A 4kB sector size eliminates partition alignment issues, but in modern systems where NVMe SSDs are used this shouldn't normally be a problem.

Besides, the point of this discussion is also that wherever a selection is possible, manufacturers suggest that performance will be best by using 4k sector size. NVMe specifications allow manufacturers to assign a descriptive relative performance level to the various supported Formatted LBA Sizes (FLBAS). On an enterprise drive supporting not only 512 and 4096 sector size, but also metadata (for error correction, etc) one might see an even wider performance level range:

Code:
$ nvme id-ns /dev/nvme1n1 | grep LBA
LBA Format  0 : Metadata Size: 0   bytes - Data Size: 512 bytes - Relative Performance: 0x1 Better
LBA Format  1 : Metadata Size: 8   bytes - Data Size: 512 bytes - Relative Performance: 0x3 Degraded
LBA Format  2 : Metadata Size: 0   bytes - Data Size: 4096 bytes - Relative Performance: 0 Best  (in use)
LBA Format  3 : Metadata Size: 8   bytes - Data Size: 4096 bytes - Relative Performance: 0x2 Good

See the at the end of the lines the qualifiers: "Degraded", "Good", "Better", "Best".
There are the same listed in NVME specifications:

1651908221046.png


 
I did a before and after test with 4k alignment on my 1tb Silicon Power ssd (another feature of easeus partition master, you can do it without destroying data on the ssd drive).

1cdmarkSP1tbssdalign.jpg
 
Last edited:
I have a Hynix P31 and by-default it's in 512-emulation mode. I didn't see it advertised anywhere for this drive, but it exposes a 4K sector LBA.

Switching to it on Windows exposed some kind of incompatibility with Steam that I ran into: https://steamcommunity.com/discussi...76804012/?tscn=1641033020#c320374734291541958

If I plan on a Windows install, I keep it in 512e mode, but if I do a Linux install, I do 4K since it seemingly works fine.
 
I did a before and after test with 4k alignment on my 1tb Silicon Power ssd (another feature of easeus partition master, you can do it without destroying data on the ssd drive).

View attachment 246907
Yep, thats just from making sure the partitions are lined up in a way that works properly on 512e and 4kn drives, and what i think is actually happening - people doing this are aligning their drives and seeing changes - not from changing between 512e and 4kn (because with a 4k cluster size, they SHOULD perform identical or within margin of error)
 
Yep, thats just from making sure the partitions are lined up in a way that works properly on 512e and 4kn drives, and what i think is actually happening - people doing this are aligning their drives and seeing changes - not from changing between 512e and 4kn (because with a 4k cluster size, they SHOULD perform identical or within margin of error)
We are aware of disk alignment. I really doubt people here seeing performance issues are misaligning their partitions with winxp era tools.
 
We are aware of disk alignment. I really doubt people here seeing performance issues are misaligning their partitions with winxp era tools.
I'd think that too, if i hadnt seen it 3 times this year from people cloning drives/OS's over and over and over - and it seems more likely with server grade OS's in the linux ecosystem, which is the only examples of this showing up online

I still dont think its a coincidence you clean format as part of this, as that clean format could be the entire reason people are seeing a change
 
I'd think that too, if i hadnt seen it 3 times this year from people cloning drives/OS's over and over and over - and it seems more likely with server grade OS's in the linux ecosystem, which is the only examples of this showing up online

I still dont think its a coincidence you clean format as part of this, as that clean format could be the entire reason people are seeing a change
I mean in 4k mode you literally can't misalign, so I suppose that could be true, but the vendors themselves are providing the firmware responses that indicate 4k mode is "higher performance" so there still could be something there.

I'm really curious what out of date linux tool will create a misaligned drive though...
 
my intel DC P4610 drives report 512 and 4096 data sizes, with 4K one offering "BEST" performance (0x00), so i changed them to that and then secure erased just in case
 
The most effective method to increase the IOPS of your SSD is not by changing the block size, but by changing the operating system.

Here are some benchmarks on the potential performance gains you can make:
 
Back
Top