Disable journald logging to syslog and disable all persistent storage so that it logs in-memory.
Enable swap space and change Linux kernel parameter vm.swappiness to 100 (default 60 by the kernel)
top
top -H
shortcuts zxc and then press 1 to see CPU core usage. Use < and > to navigate sorting fields.
iotop-c
iotop-c -oPa
shortcuts a (to toggle aggregate or real time stats) and p (to toggle break down by parent process or by pthreads).
ps
View process threads for thread count and more info about the threads. UID 1000
ps -T -u 1000
Disable journald logging
Edit /etc/systemd/journald.conf with
[Journal]
Storage=none
ForwardToSyslog=no
and restart
systemctl restart systemd-journald
Enable swap space and increase swappiness
50% of RAM is conservative but if you want to enable hibernation on laptops you need at least 100% of RAM available as swap.
# allocate disk
dd if=/dev/zero of=/swapfile bs=1G count=16
# prepare swap
chmod 600 /swapfile
mkswap /swapfile
# persist enabling swap on reboot
echo '/swapfile none swap sw 0 0' >> /etc/fstab
# enable swap without needing to reboot
swapon /swapfile
Change swappiness so that Linux kernel has more memory management options. For SSDs, maximum swappiness is okay because of their random access. SSD lifespan is good enough to not worry about it.
# Check swappiness is not already configured
grep vm.swappiness /usr/lib/tuned/*/tuned.conf /etc/sysctl.conf
# read current swappiness (returned 60 which is kernel default)
cat /proc/sys/vm/swappiness
# set swappiness persistent on reboot
echo 'vm.swappiness=100' >> /etc/sysctl.conf
# set swappiness in the current runtime so reboot is not needed
sysctl -w vm.swappiness=100
# verify current swappiness (returned 100)
cat /proc/sys/vm/swappiness
Summary
free -m
top
iotop-c
vm.swappiness
to 100 (default 60 by the kernel)top
shortcuts zxc and then press 1 to see CPU core usage. Use < and > to navigate sorting fields.
iotop-c
shortcuts a (to toggle aggregate or real time stats) and p (to toggle break down by parent process or by pthreads).
ps
View process threads for thread count and more info about the threads. UID 1000
Disable journald logging
Edit
/etc/systemd/journald.conf
withand restart
Enable swap space and increase swappiness
50% of RAM is conservative but if you want to enable hibernation on laptops you need at least 100% of RAM available as swap.
Change swappiness so that Linux kernel has more memory management options. For SSDs, maximum swappiness is okay because of their random access. SSD lifespan is good enough to not worry about it.
Background reading material
and man pages