Some useful links for optimizing system performance
Arch
KDE
Ubuntu
Ubuntu Desktop optimization
Create partitions for each drive before the install process
Install as usual after creating partitions.
Reboot
Before making changes to your system run this, then again when finished
Check system log for errors or issues
free -m
sudo hdparm -t --direct /dev/nvme0n1p2
systemd-analyze critical-chain
systemd-analyze --user blame
The fstab file configures the mounted drives/partitions
Obtain UUID for each drive/partiton on system.
lsblk -f
Root UUID="" / ext4 defaults,noatime,auto_da_alloc,inode_readahead_blks=64,errors=remount-ro 0 1
Data UUID="" /home/Data ext4 defaults,noatime,errors=remount-ro 0 2
Enable fast_commit journal option speed up FS writes
sudo tune2fs -O fast_commit /dev/nvme0n1p2
sudo tune2fs -O fast_commit /dev/sdc1
Verify
sudo tune2fs -l /dev/nvme0n1p2 | grep features
sudo e2label /dev/nvme0n1p2 "SYSTEM"
/etc/default/grub
mitigations=off loglevel=3
/etc/init.d/cpufrequtils
ENABLE="true"
GOVERNOR="performance"
MAX_SPEED="4000"
MIN_SPEED="1600"
/etc/modprobe.d
Audio /etc/modprobe.d/audio.conf
options snd_hda_intel power_save=0 power_save_controller=N
GPU /etc/modprobe.d/intel.conf
options i915 modeset=1 mitigations=off enable_fbc=0 enable_psr=0 enable_guc=-1
/etc/modprobe.d/blacklist.conf
blacklist evbug
After creating these files run
sudo update-initramfs -u
This wil update boot image to include the changes.
Reboot.
Disable ModemManager If you do not have a mobile broadband interface.
sudo systemctl disable ModemManager.service
sudo systemctl mask ModemManager.service
fwupd is a daemon allowing you to update some devices’ firmware, including UEFI for several machines.
Remove fwupd from boot
sudo systemctl disable fwupd.service
sudo systemctl mask fwupd.service
GPU-Manager is software that creates a xorg.conf for you. So running this in every boot is just overkill. You only need to run this if you change your GPU.
sudo systemctl disable gpu-manager.service
sudo systemctl mask gpu-manager.service
Apt-daily-upgrade solves long boot up time with apt-daily-upgrade.
sudo systemctl disable apt-daily.service
sudo systemctl disable apt-daily.timer
sudo systemctl mask apt-daily.timer
sudo systemctl disable apt-daily-upgrade.timer
sudo systemctl disable apt-daily-upgrade.service
sudo systemctl mask apt-daily-upgrade.service
Logical Volume Manager (LVM) is a device mapper framework that provides logical volume management.
Disable LVM
sudo systemctl disable lvm2-monitor.service
sudo systemctl mask lvm2-monitor.service
Disable Wait for Network online service, slows down boot
sudo systemctl disable NetworkManager-wait-online.service
sudo systemctl mask NetworkManager-wait-online.service
MaxRetentionSec=3month MaxFileSec=1month MaxLevelStore=err MaxLevelSyslog=err MaxLevelKMsg=err MaxLevelConsole=err MaxLevelWall=emerg ```
sudo tune2fs -c 50 -i 1m /dev/nvme0n1p2
sudo tune2fs -c 50 -i 1m /dev/sdb1
/etc/pipewire/pipewire-pulse.conf.d/switch-on-connect.conf (or ~/.config/pipewire/pipewire-pulse.conf.d/switch-on-connect.conf)
override for pipewire-pulse.conf file
pulse.cmd = [
{ cmd = "load-module" args = "module-always-sink" flags = [ ] }
{ cmd = "load-module" args = "module-switch-on-connect" }
]
/etc/pulse/daemon.conf
default-sample-format = float32le
default-sample-rate = 48000
alternate-sample-rate = 44100
default-sample-channels = 2
default-channel-map = front-left,front-right
default-fragments = 2
default-fragment-size-msec = 125
resample-method = soxr-vhq
avoid-resampling = yes
high-priority = yes
nice-level = -11
realtime-scheduling = yes
realtime-priority = 9
rlimit-rtprio = 9
daemonize = no
The ping command will let you know if the packet was sent as more than one fragment with multiple header data attached.
ping -s 1472 -c1 espn.com
Retest changing packet size until 0% packet loss
Arch
Github
Ubuntu
Some useful sysctl settings place in /etc/sysctl.conf
kernel.sysrq=0
fs.file-max = 209708
net.ipv4.tcp_fastopen=3
net.core.default_qdisc=cake
net.ipv4.tcp_congestion_control=bbr
net.ipv4.tcp_window_scaling = 1
vm.swappiness = 30
vm.dirty_ratio = 30
vm.dirty_background_ratio = 5
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_syn_retries = 2
net.ipv4.tcp_synack_retries = 2
net.ipv4.tcp_max_syn_backlog = 4096
net.ipv4.ip_forward = 0
net.ipv4.route.flush = 1
net.ipv6.route.flush = 1
snap list
sudo systemctl disable snapd.service
sudo systemctl disable snapd.socket
sudo systemctl disable snapd.seeded.service
sudo snap remove firefox
sudo snap remove snap-store
sudo snap remove gtk-common-themes
sudo snap remove gnome-3-38-2004
sudo snap remove core18
sudo snap remove snapd-desktop-integration
sudo rm -rf /var/cache/snapd/
sudo apt autoremove --purge snapd
rm -rf ~/snap
sudo mv /usr/share/applications/wslview.desktop /usr/share/applications/wslview.desktop.disabled
QT_LOGGING_RULES="*.debug=false;qt*.debug=false;qt5.debug=false;*.warning=false;*.critical=false;qt.qpa.xcb.xcberror.warning=false;qt.qpa.xcb.xcberror.error=false;qt.qpa.xcb.warning=false;qt.qpa.xcb.error=false;qt.qpa.xcb=false"
QML_XHR_ALLOW_FILE_READ="1"
kdebugdialog5 - kde debugging settings
fc-cache -f -v
sudo apt install systemd-boot
sudo bootctl install --path=/boot/efi
Root flags are same as grub options in /etc/default/grub
ROOTFLAGS="ro quiet loglevel=3 mitigations=off resume=UUID=123"
ROOTFLAGS1="ro quiet mitigations=off resume=UUID=123 3"
After install and setup of systemd-boot run
sudo update-initramfs -u
Verify
sudo bootctl
Reboot