Do I have sector size issue on my hard drive?

Posted on

QUESTION :

I have performance hard drive issue so I decide to look my drive when I type:

sudo fdisk -l -u=sectors

I have the following output:

Disk /dev/sda: 931,5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: CD70CA3C-993F-4B7A-AFEE-188CA351B87E

Device          Start        End    Sectors   Size Type
/dev/sda1        2048     923647     921600   450M Windows recovery environment
/dev/sda2      923648    1128447     204800   100M EFI System
/dev/sda3     1128448    1161215      32768    16M Microsoft reserved
/dev/sda4     1161216 1514156670 1512995455 721,5G Microsoft basic data
/dev/sda5  1514158080 1941178367  427020288 203,6G Linux filesystem
/dev/sda6  1941178368 1953523711   12345344   5,9G Linux swap

This line looks strange to me:

Sector size (logical/physical): 512 bytes / 4096 bytes

Is it normal that the logical sector size is different to the physical size? Can I change this? Will it improve the performance of the hard drive?

ANSWER :

Is it normal that the logical sector size is different to the physical size?

It is normal.

Old legacy drives have both logical and physical sector sizes of 512 B. For many years there has been no need to tell them apart.

In this case every physical read or write operation involves one or more full 512 B sectors. Also operating systems and their low level tools communicate with a disk firmware using 512 B as a logical unit. Everyone got used to this standard.

Nowadays there are disks with both logical and physical sector sizes of 4096 B. They were introduced with efficiency improvement and overhead reduction in mind. Unfortunately legacy software usually expects disks to have 512 B sector, nothing else. New disks (called 4K native) are incompatible with old software.

Here come disks with 512 B logical, 4096 B physical sectors. They benefit from the increased physical sector size, yet still allow any software to communicate the old way. They are called Advanced Format 512e, or 512 emulation drives; your disk is one of them. Every translation between the two sector sizes is done internally by the disk firmware.


Do I have sector size issue on my hard drive?

Despite of your drive ability to “talk” 512 B sectors, the best practice is to use the whole 4096 B at once, whenever possible. Your drive reports this value in a hope that smart enough software will act accordingly.

One thing to do is to align the partitions to physical sectors boundaries. There are eight logical sectors per one physical in your case. The proper alignment requires every number in the Start column of fdisk output to be divisible by eight – and all your numbers are, so it’s all right. If any of them wasn’t, fdisk should warn you with Partition <number> does not start on physical sector boundary.

Your every filesystem should use a block size of 4096 B or some integer multiplication of it. Check it maybe.


Can I change this [that the logical sector size is different to the physical size]? Will it improve the performance of the hard drive?

I don’t think you can. (But see this – I consider the option mentioned to be an exception, not a rule.)

Changing physical sector size to 512 B (if it were possible) would require low level reformatting. It would also make your disk appear smaller. See the comparison table on Wikipedia4096 B sector needs 4211 bytes while eight 512 B sectors need 4616 bytes. The disk would still be able to read its whole capacity in such-a-such time, but since there would be less user data, the performance would be degraded.

Changing logical sector size to 4096 B (new firmware, let’s suppose) would give negligible or no performance boost over well configured 512e setup. I think all your partitions and filesystems would need to be created from the scratch. You would also experience incompatibility problems due to some legacy tools (if any). They may work now with non-optimal performance but at least they don’t break anything.


I recommend reading the already linked Wikipedia article and the answers to already linked question. You can learn a lot about what happens under the hood.

Leave a Reply

Your email address will not be published. Required fields are marked *