Unraid Setup#
Docker Config#
- create custom network
docker network create omninet
-
change docker installation to
docker directory
instead ofbtrfs vDisk docker.img
to avoid SSD wear -
some apps (e.g. Dropbox) constantly write to log file
- this triggers the expected write amplification from
BRTFS
copy-on-write - details
Advanced Disk Settings#
- Query/Disable/Enable Write Caching (Reference)
[!note] SATA drives
Bashhdparm -W /dev/sdb # Query hdparm -W1 /dev/sdb # Enable hdparm -W0 /dev/sdb # Disable
[!note] SAS drives
Bashsdparm -g WCE /dev/sdd # Query sdparm --set=WCE /dev/sdd # Enable sdparm -c WCE /dev/sdd # Disable
- Workarounds
-
Turn on
Turbo Write
/Reconstruct Write
-
https://wiki.unraid.net/Tips_and_Tweaks#Turn_on_Reconstruct_Write
VM Config#
Host Config Tweaks#
-
disable
Copy-on-write
on share storing VM vdisk image files (default isdomains
) -
configure
CPU Isolation
for Unraid Host andCPU Pinning
for VM -
Unraid only needs one or two physical core for peak performance
- enable performance cpu governor bc the boost trigger from within a vm doesn't consistently work
[!note] Enable performance cpu governor
Bash#!/bin/bash cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor for file in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do echo "performance" > $file; done cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
[!note] Restore on-demand cpu governor
Bash#!/bin/bash cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor for file in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do echo "ondemand" > $file; done cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
- ensure
clock source=tsc
cat /sys/devices/system/clocksource/clocksource0/current_clocksource
- install Win11 without networking
Shift-F10
OOBE\BYPASSNRO
-
use
network model
=virtio
instead of defaultvirtio-net
-
tweaks for Hyper-V Enlightenments: see details at
- Remote Gaming on Unraid
- Performance Optimizations for Gaming on with KVM/QEMU and PCI passthrough
-
use direct disk path for cache only shares instead of the user share mount path e.g.
-
Default VM Storage Path:
/mnt/user/domains/
=>/mnt/cache_nvme/domains/
Windows VM Guest Tweaks#
-
install the VirtIO drivers
-
install the QEMU Guest Agent
-
disable Hiberfil.sys:
powercfg -h off
-
set power plan to maximum performance
-
disable index and/or cortana search
-
Nvidia control panel:
3D settings
->Manage 3D settings
->Global settings
-
set
Power Management mode
=Prefer maximum performance
- set
Low Latency Mode
=On
-
references
- https://forums.unraid.net/topic/135867-is-there-a-current-guide-for-setting-up-a-windows-11-vm/
SMB#
- SMB hardening
Text Only#disable SMB1 for security reasons [global] server min protocol = SMB3_02 client ipc min protocol = SMB3_02 restrict anonymous = 2 # client signing = mandatory # server signing = mandatory # client ipc signing = mandatory # client NTLMv2 auth = yes # smb encrypt = required # null passwords = no # raw NTLMv2 auth = no