Any one did benchmark on nixos comparing its performance with other distros (like ubuntu, fedora or arch linux). As I searched the internet but did find nothing.
NixOS should potentially be a little bit slower because of the indirection with huge paths and symlinks, other than that all distros are the same. Itās just about what packages youāre installing and using.
What would be more important is to tune your system accordingly. With Nix this might be easier than with other systems as your configuration remembers all your parameters.
mimicking the āspeed hacksā that clear linux may be achievable, with recompilation of packages with specific compiler optimisations and custom kernel/userspace patches.
I was going to give it a whirl, but i thought if iām going to learn a lot of new paradigms about a ecosystem, i might as well go the nix route. I think i made the right decision.
optimisation is sometimes about tinkering, changing , patching , recompiling and updating thingsā¦ something nix can do without fear of complete system collapse.
it was discussed in depth hereā¦
https://github.com/NixOS/nixpkgs/issues/63708
I think needs extensive engineering effort , something were not exactly in abundance of.
There are some odd defaults going on with Linux kernel flags, started looking into it but I kinda forgot about it GitHub - gytis-ivaskevicius/linux-kernel-comparison It might be impacting performance in some areas.
Also, there is something going on with systemd, the difference is noticeable on low-end hardware boot time, especially if you were to look into NetworkManager/networkd startup time. It is not even comparable to Arch
Here are a couple of screenshots from when I started investigating it a little (~06/04/2021). Not sure about either system configuration at this point.
NixOS:
Arch:
Not much of a reference point of anything, but thatās the best I got on hand
Donāt know how relevant the information Iāll be sharing here is, but here is more information for my previous setup (the images Gytis linked) + all the benchmarks we conducted:
Scheduler:
āÆ cat /sys/block/sda/queue/scheduler
mq-deadline kyber [bfq] none
Both NixOS & Arch scaling_governor
:
Ī» cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
schedutil
schedutil
schedutil
schedutil
schedutil
schedutil
schedutil
schedutil
Drishal input on the subject:
Arch:
#
# CPU Frequency scaling
#
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_GOV_ATTR_SET=y
CONFIG_CPU_FREQ_GOV_COMMON=y
CONFIG_CPU_FREQ_STAT=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL=y
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=y
CONFIG_CPU_FREQ_GOV_USERSPACE=y
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y
NixOS:
#
# CPU Frequency scaling
#
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_GOV_ATTR_SET=y
CONFIG_CPU_FREQ_GOV_COMMON=y
# CONFIG_CPU_FREQ_STAT is not set
CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL is not set
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=m
CONFIG_CPU_FREQ_GOV_USERSPACE=m
CONFIG_CPU_FREQ_GOV_ONDEMAND=m
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y
A while later Gytis submitted the following diff between the two kernel configs:
And this is what my systemd-analyze blame
looks like today:
25.364s systemd-journal-flush.service
23.819s home-manager-icy\x2dthought.service
9.066s bluetooth.service
8.476s systemd-logind.service
7.713s NetworkManager.service
7.703s iwd.service
6.145s firewall.service
4.091s systemd-suspend.service
3.986s polkit.service
3.954s dev-disk-by\x2dlabel-nixos.device
3.008s systemd-modules-load.service
2.964s systemd-udevd.service
2.727s mount-pstore.service
2.683s systemd-fsck@dev-disk-by\x2dlabel-boot.service
2.605s home.mount
2.408s upower.service
1.345s resolvconf.service
1.328s modprobe@drm.service
1.207s cpufreq.service
1.125s boot.mount
1.095s udisks2.service
1.094s systemd-remount-fs.service
922ms sys-kernel-debug.mount
883ms systemd-backlight@backlight:amdgpu_bl0.service
867ms dev-mqueue.mount
864ms dev-hugepages.mount
672ms sys-kernel-config.mount
571ms systemd-random-seed.service
557ms systemd-tmpfiles-setup-dev.service
498ms sys-fs-fuse-connections.mount
480ms audit.service
459ms systemd-journald.service
449ms dev-disk-by\x2dlabel-swap.swap
387ms user@1000.service
357ms modprobe@fuse.service
344ms systemd-sysctl.service
331ms systemd-tmpfiles-setup.service
238ms systemd-tmpfiles-clean.service
331ms systemd-tmpfiles-setup.service
238ms systemd-tmpfiles-clean.service
222ms modprobe@configfs.service
206ms autorandr.service
149ms network-setup.service
149ms systemd-udev-trigger.service
121ms systemd-timesyncd.service
107ms network-local-commands.service
81ms systemd-rfkill.service
70ms systemd-update-utmp.service
68ms rtkit-daemon.service
50ms display-manager.service
28ms systemd-user-sessions.service
22ms nscd.service
21ms post-resume.service
19ms user-runtime-dir@1000.service
10ms kmod-static-nodes.service
10ms NetworkManager-dispatcher.service
9ms pre-sleep.service
2ms tmp.mount
what ever you do , donāt turn into a gentoo ricer. :-), i admit i might of been one when i was young and foolish. (now iām just old and foolish).
https://www.shlomifish.org/humour/by-others/funroll-loops/Gentoo-is-Rice.html