1 |
On Thursday, 1 April 2021 16:06:37 BST Peter Humphrey wrote: |
2 |
> On Thursday, 1 April 2021 11:13:07 BST Michael wrote: |
3 |
> > You could check/set the alignment of logical-physical sectors yourself, by |
4 |
> > making sure the start of your partitions is divisible by 8, instead of |
5 |
> > adopting the GParted 1MB default boundary in any cases where it is not |
6 |
> > necessary. |
7 |
> |
8 |
> So it seems to be the partition start points that matter; sizes have nothing |
9 |
> to do with it. Makes sense, now I think about it. |
10 |
|
11 |
Yes, it is the starting point which determines the first 512 byte logical |
12 |
sector and those what follow it, are aligned with the first 4096 byte physical |
13 |
sector and those that follow it. |
14 |
|
15 |
When these are not aligned a write operation instructed by software could |
16 |
straddle more than one physical sector, even when the data to be stored is |
17 |
less than 4096B. This results in moving, deleting, writing more sectors and |
18 |
data than necessary, a measurably inefficient process. This is noticeable on |
19 |
spinning drive benchmarks and can get much worse on flash and SSDs with their |
20 |
coarser erase Vs write pages (a.k.a. write amplification). |
21 |
|
22 |
|
23 |
> I've just realigned all my partitions to accord with that insight. It turned |
24 |
> out that most of them had small differences from 8^n sizes and start |
25 |
> points, which would explain all those unpartitioned spaces. |
26 |
> |
27 |
> All well now. Thanks all. |
28 |
|
29 |
I recall fighting against gparted's optimal alignment myself when partitioning |
30 |
tools first started catering for 4K size sectors, only having to realign my |
31 |
partitions as soon as I realised the error of my ways! ;-) |