Arch Linux. Post installation notes

Locale (US English with GB numbers)

Locale

$ cat /etc/locale.conf
LANG=en_US.UTF-8
LC_TIME=en_GB.UTF-8
LC_PAPER=en_GB.UTF-8
LC_MEASUREMENT=en_GB.UTF-8

Console settings with Caps Lock layout switch

Linux console

$ cat /etc/vconsole.conf
KEYMAP=ruwin_cplk-UTF-8
FONT=ter-132b
CONSOLEMAP=
TIMEZONE=Europe/Moscow
HARDWARECLOCK=UTC
USECOLOR=yes

Limits

$ cat /etc/sysctl.d/90-user.conf
fs.file-max=524288
fs.inotify.max_user_watches=524288
vm.max_map_count=262144
vm.swappiness=1

limits.conf

$ cat /etc/security/limits.conf
-   soft core 0 # Prevent corefiles from being generated by default.
-   hard core unlimited # Allow corefiles to be temporarily enabled.
-   hard nice -19 # Prevent non-root users from running a process at minimal niceness.
    root hard nice -20 # Allows root to run a process at minimal niceness to fix the system when unresponsive.
-   soft priority 0 # Set the default priority to neutral niceness.
-   soft nproc 4096
-   hard nproc 8192 # Prevent fork-bombs from taking out the system.
    root hard nproc 65536 # Prevent root from not being able to launch enough processes
-   soft nofile 262144
-   hard nofile 262144

Time synchronization

Network Time Protocol daemon

$ pacman -S ntp
$ systemctl enable ntpdate.service

SSD

Enable periodical trim (once a week by default)

$ systemctl enable fstrim.timer

NetworkManager

Disable checking connectivity

$ cat /etc/NetworkManager/conf.d/20-connectivity.conf
[connectivity]
enabled=false

Rng-tools

Rng-tools

$ pacman -S rng-tools
$ systemctl enable rngd.service

ACPI

$ systemctl enable acpid

Avahi (Zero-configuration networking, zeroconf)

Avahi

In file /etc/nsswitch.conf edit line

hosts: files mymachines myhostname mdns4_minimal [NOTFOUND=return] resolve [!UNAVAIL=return] dns
$ systemctl enable avahi-daemon.service

Pacman. Color output

In file /etc/pacman.conf uncoment line Color

Pacman. Utilize all cores on compression

In file /etc/makepkg.conf edit next lines

COMPRESSGZ=(pigz -c -f -n)
COMPRESSBZ2=(pbzip2 -c -f)
COMPRESSXZ=(xz -c -z - --threads=0)
COMPRESSZST=(zstd -c -z -q - --threads=0)

Balance load between CPU

$ pacman -S irqbalance
$ systemctl enable irqbalance.service

Disable kernel audit messages

Add kernel parameter audit=0

Improve boot speed

Add kernel parameter random.trust_cpu=on

Enable lz4 compression for kernel

In file /etc/mkinitcpio.conf set paramter COMPRESSION="lz4"