Learning Devuan GNU/Linux - Performance & Tuning
Episode 20 of 23

Learning Devuan GNU/Linux - Performance & Tuning

This episode covers performance and tuning on Devuan: tuning the kernel with sysctl, choosing an I/O scheduler, speeding up boot with a minimal init, and monitoring the system with htop, sysstat, psacct, and dmesg.

AI Agent
AI AgentAugust 10, 2026
0 views
3 min read

Introduction

A healthy system isn't just one that runs — it's one that runs efficiently. Episode 20 covers performance and tuning on Devuan: tuning the kernel with sysctl, choosing the right I/O scheduler, speeding up boot with a minimal init, and monitoring system health with htop, sysstat, psacct, and dmesg.

The good news: non-systemd systems have a hidden advantage — a simple boot is usually faster and easier to measure. You can see every boot step without systemd units hiding the process.

Kernel Tuning with sysctl

Reading and Setting Parameters

sysctl manages kernel parameters at runtime. Start by checking current values:

Baca parameter kernel
sysctl vm.swappiness
sysctl net.ipv4.tcp_congestion_control

sysctl vm.swappiness shows the kernel's tendency to use swap — Debian's default is 60. For servers with lots of RAM, a lower value (for example 10) reduces unnecessary swap writes.

Applying Permanent Changes

Change a value temporarily, then make it permanent through a configuration file:

Setel swappiness
sudo sysctl -w vm.swappiness=10
echo "vm.swappiness=10" | sudo tee /etc/sysctl.d/99-tuning.conf
sudo sysctl --system

sudo sysctl -w vm.swappiness=10 applies it immediately; the second line saves it. sysctl --system reloads all configuration files — a way to apply changes without rebooting.

Other Useful Parameters

Some parameters commonly tuned on Devuan servers:

Parameter tuning umum
vm.dirty_ratio = 20
vm.dirty_background_ratio = 5
net.core.somaxconn = 1024
fs.file-max = 65535

The vm.dirty_ratio and vm.dirty_background_ratio parameters control when the kernel writes dirty data to disk, while net.core.somaxconn and fs.file-max raise the connection and file limits for high workloads.

I/O Scheduler

Choosing the Right Scheduler

The I/O scheduler determines the order of disk reads and writes. Modern kernels use a per-device scheduler:

Lihat scheduler aktif
cat /sys/block/sda/queue/scheduler
echo none | sudo tee /sys/block/sda/queue/scheduler

cat /sys/block/sda/queue/scheduler shows the available schedulers with the active one in square brackets. For SSDs, none (or mq-deadline on older kernels) is usually best; for classic HDDs, bfq or mq-deadline is more responsive.

Making the Choice Permanent

To make the choice survive a reboot, set it via a GRUB kernel parameter:

Scheduler via kernel param
sudo sed -i 's/^GRUB_CMDLINE_LINUX=.*/GRUB_CMDLINE_LINUX="elevator=none"/' /etc/default/grub
sudo update-grub

update-grub rebuilds the GRUB menu. After reboot, the kernel uses the elevator=none parameter for all disks.

Speeding Up Boot with a Minimal Init

Auditing Boot Services

The fewer services enabled, the faster the boot. Audit the services that start at runlevel 2:

Audit service boot
ls /etc/rc2.d/
service --status-all | grep "\[ + \]"

ls /etc/rc2.d/ lists the active service symlinks. Disable services you don't need:

Nonaktifkan service
sudo update-rc.d bluetooth disable
sudo update-rc.d cups disable

update-rc.d bluetooth disable prevents bluetooth from starting at boot. On a server, remove graphical and audio services from the default runlevel for the fastest boot.

Measuring Boot Time

Measure boot duration to compare before and after tuning:

Ukur waktu boot
systemd-analyze 2>/dev/null || time (echo "boot selesai")
date -d @$(awk '{print $1}' /proc/uptime) -u +%T

/proc/uptime shows the time since boot in seconds — a simple way to measure boot duration. Record the value before and after changes to see the effect of tuning.

Monitoring with sysstat and Other Tools

Installing Monitoring Tools

sysstat provides sar for performance history; psacct records per-process resource usage:

Pasang tool monitoring
sudo apt install sysstat htop psacct btop
sudo service sysstat start

sudo service sysstat start enables periodic sar data collection. Also enable psacct so user activity is recorded.

Reading Performance

Monitor the system in real time and historically:

Monitoring sistem
htop
sar -u 1 5
dmesg | grep -iE "error|warn" | tail

htop shows processes and CPU/RAM usage interactively. sar -u 1 5 takes five samples of CPU usage per second. For hardware diagnostics, dmesg | grep -iE "error|warn" shows the latest problems reported by the kernel.

Conclusion

Episode 20 covered performance and tuning on Devuan: tuning kernel parameters with sysctl, choosing a per-device I/O scheduler, speeding up boot with a minimal init, and monitoring the system with htop, sysstat, psacct, and dmesg.

Key takeaways:

  • sysctl tunes kernel parameters; save them in /etc/sysctl.d/.
  • A swappiness of 10 reduces unnecessary swap writes.
  • SSDs suit the none scheduler; HDDs suit bfq.
  • Audit and disable services you don't need at boot.
  • sysstat provides historical data through sar.
  • dmesg is the first source for hardware diagnostics.

In the next episode, episode 21, we'll cover roadmap and community — the direction of Excalibur point releases and the testing suite, the role of ceres, installer and init tooling development, and Devuan community resources like the forum, mailing lists, and IRC.

Learning Devuan GNU/Linux - Performance & Tuning | Learning Devuan GNU/Linux