openzfs / openzfs-docs

OpenZFS Documentation
https://openzfs.github.io/openzfs-docs/
135 stars 194 forks source link

NixOS: partition_disk does not align optimally #427

Closed manuel-plavsic closed 1 year ago

manuel-plavsic commented 1 year ago

I followed the new guide that got uploaded today.

Every time I invoke the partition_disk function, I get a warning explaining the partitions are not aligned for best performance.

I did some short research, and it seems that it is better to specify a percentage than a number for the partitions to align correctly. I didn't test this.

I don't know how much of a performance penalty this implies.

ghost commented 1 year ago

Well, that warning is only for the 1MB BIOS boot partition.

If you don't store too much data on that partition, which I assume you don't, it shouldn't affect performance too much.

manuel-plavsic @.***> writes:

I followed the new guide that got uploaded today.

Every time I invoke the partition_disk function, I get a warning explaining the partitions are not aligned for best performance.

I did some short research, and it seems that it is better to specify a percentage than a number for the partitions to align correctly. I didn't test this.

I don't know how much of a performance penalty this implies.

-- Reply to this email directly or view it on GitHub: https://github.com/openzfs/openzfs-docs/issues/427 You are receiving this because you are subscribed to this thread.

Message ID: @.***>

ghost commented 1 year ago

You can check alignment like so

[root@qinghe:~]# parted /dev/sda
GNU Parted 3.5
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print                                                            
Model: ATA TOSHIBA Q300. (scsi)
Disk /dev/sda: 240GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name  Flags
 5      24.6kB  1049kB  1024kB                     bios_grub
 1      1049kB  1075MB  1074MB  fat32              boot, esp
 2      1075MB  5370MB  4295MB
 4      5370MB  14.0GB  8590MB                     swap
 3      14.0GB  240GB   226GB

(parted) align-check optimal 5                                            
5 not aligned: 48s % 2048s != 0s
(parted) align-check optimal 1
1 aligned
(parted) align-check optimal 2
2 aligned
(parted) align-check optimal 3
3 aligned
(parted) align-check optimal 4
4 aligned
manuel-plavsic commented 1 year ago

Thank you for the explanation and how to check it. I don't think this is really an issue then. I'll close it.