Improving Desktop Responsiveness on Arch Linux
Jan 4, 2017
kernel
There are two kernels that I have used for better desktop responsiveness: linux-ck and linux-zen. linux-zen is in the official repo which makes it very easy to install.
pacman -S linux-zen
Update your grub config if you need to.
nice
nice represents the priority of a process. X11 should have a higher priority for better responsiveness. verynice and ananicy will automatically set the nice levels based on rules.
yaourt ananicy-gitsystemctl start ananicy && systemctl enable ananicy
sysctl
https://www.kernel.org/doc/Documentation/sysctl/vm.txt
swappiness is used to define how aggressive the kernel will swap memory pages.
vfs_cache_pressure value controls the tendency of the kernel to reclaim the memory which is used for caching of directory and inode objects.
zwap compresses the swap pages instead of moving them to the swap file right away.
/etc/sysctl.d/10-vm.confvm.swappiness = 1vm.vfs_cache_pressure = 50zswap.enabled=1
blk-mq
This should help with multithreaded workloads.
- Add
scsi_mod.use_blk_mq=1to your kernel paremeters. - Create
/etc/udev/rules.d/60-ioschedulers.rulesand add:-
# set scheduler for non-rotating disks ACTION=="add|change", KERNEL=="sd[a-z]|mmcblk[0-9]*|nvme[0-9]*", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="mq-deadline" # set scheduler for rotating disks ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="1", ATTR{queue/scheduler}="bfq"
-