tpwrules / nixos-apple-silicon

Resources to install NixOS bare metal on Apple Silicon Macs
MIT License
743 stars 73 forks source link

Improvements jan2024 #151

Closed zzywysm closed 4 months ago

zzywysm commented 5 months ago

https://wiki.ubuntu.com/Kernel/Reference/IOSchedulers

https://copr-dist-git.fedorainfracloud.org/cgit/@asahi/u-boot/uboot-tools.git/tree/0001-disable-NFS-support-by-default.patch?h=f39

tpwrules commented 4 months ago

These are still opinionated changes without significant evidence to back up claims.

I don't see how the NFS disable applies to us; I don't think it's possible to get network in U-Boot on Apple Silicon anyway.

zzywysm commented 4 months ago

I don't think these changes are particularly opinionated. They are mostly intended to more closely match the state of NixOS itself and of the builds Fedora Asahi Remix ships.

  1. The NixOS installer ISO attempts to disable IO schedulers by passing the elevator=noop boot argument to the kernel. (This is an antiquated way to do so, and I believe modern kernels ignore the argument. Nevertheless, it indicates that NixOS itself has the opinion that the IO schedulers should be disabled.)
  2. By disabling NFS, we match how Fedora builds u-boot, and remove a source of uncertainty should we ever face difficulties with u-boot that require debugging.
  3. Decreasing the u-boot boot delay also decreases the total boot time, which is a nice benefit for users.

Edit: the elevator boot argument was removed here: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f8db383507d658c5a729b062c97710efda876cd4

zzywysm commented 4 months ago

Some experimental data on IO schedulers on NVME drives:

https://www.phoronix.com/review/linux-56-nvme

"Overall though, using "none" as your I/O scheduler option will still generally offer the best performance for speedy NVMe SSD storage with a few exceptions." https://www.phoronix.com/review/linux-56-nvme/4