B
B
brar2021-06-23 17:21:21
Virtualization
brar, 2021-06-23 17:21:21

Should I increase the sector size of sata SSD and NVMe M2 to 4K (or even 64K)?

SATA SSD:

hdparm -I /dev/sda | grep -i "sector size"
  Logical  Sector size:                   512 bytes
  Physical Sector size:                   512 bytes


NVMe M2:
nvme1n1            0      512B (DISC-GRAN)       2T         0
└─nvme1n1p1        0      512B (DISC-GRAN)       2T         0

Will this increase the performance of qcow2 VMs on those disks (fs - ext4)?
What are the disadvantages of such an increase?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Artem @Jump, 2021-06-23
@brar

Is it worth increasing the sector size of sata SSD and NVMe M2 to 4K
Depends on the situation.
Usually it makes no sense to set less than 4k, although there may be exceptions, but I can’t imagine such situations.
Will this increase the performance of qcow2 VMs on those disks (fs - ext4)?
Not enough information to say. It depends on many factors.
The optimal cluster size is set depending on the load on the disk. There will be information on the load can be said.
The larger the cluster, the more the load approaches linear.
The smaller the cluster, the more the load approaches random.
If you have mostly small requests, the cluster should be made smaller, if there are large requests, then more.
For the OS, the optimal value is 4k.
File 1s, for example, reads 8 or 16k. - respectively, and set.
SQL Server works with 64k blocks - hence the cluster size must be set no less.

S
Saboteur, 2021-06-23
@saboteur_kiev

Performance will not increase because
1) you will not change the size of the physical sector. Hard drives with the possibility of home low-level formatting were last seen 20 years ago on the IDE and before it.
2) the size of the logical sector can make it a little easier to work with the file system if you have huge files by reducing the number of sectors. But in general, the linear speed will apparently not change, and the random acceleration will slow down. Well, in any case, 512b will remain at the physical level.
3) Physical Sector size: 512 bytes
don't trust this info. Inside there can be 4k, emulating 512b. It is quite difficult to find hard drives with 512b production sector of 2011+. True, this is the exact infa for the HDD. Maybe in SSD 512byte sectors are still quite the norm.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question