Analisis Performa Autosnapshot Longhorn pada Deployment Kubernetes (K8s) dan K3s Single-Node Berbasis Ubuntu Server
Bayu Sapmito, Dr. Ir. Ronald Adrian, S.T., M.Eng., IPM.
2026 | Tugas Akhir | D4 TEKNOLOGI JARINGAN
Penggunaan Kubernetes sebagai platform yang mengatur container semakin meluas, tetapi belum tersedia data kuantitatif yang membandingkan performa autosnapshot antara distribusi K3s dan K8s pada lingkungan Single-Node. Penelitian ini bertujuan melakukan deploy sistem autosnapshot Longhorn menggunakan RecurringJob pada K3s dan K8s, kemudian membandingkan performa keduanya berdasarkan metrics Duration, Latency, Delay, CPU, dan RAM. Implementasi dilakukan pada VPS Ubuntu Server 24.04 Single-Node dengan beban kerja MySQL berukuran 300 MB sebagai variabel kontrol. Data dikumpulkan melalui 30 iterasi snapshot berinterval satu menit pada masing-masing cluster menggunakan script monitoring otomatis yang mencatat ketujuh indikator ke dalam berkas CSV. Hasil pengujian menunjukkan K3s unggul pada Duration (1.644 ms vs 3.210 ms), konsumsi CPU (8,33% vs 11,30%), dan RAM (2.049 MiB vs 2.476 MiB). Sebaliknya, K8s menunjukkan keunggulan pada Latency (1.154 ms vs 1.234 ms) dan Delay (1.365 ms vs 1.667 ms) karena arsitektur etcd yang bersifat watch-based dibanding SQLite single-writer pada K3s. K3s direkomendasikan untuk lingkungan dengan keterbatasan sumber daya, sementara K8s lebih sesuai ketika konsistensi scheduler dan stabilitas metrics menjadi prioritas.
The use of Kubernetes as a container orchestration platform is becoming increasingly widespread, but there is currently no quantitative data comparing the performance of autosnapshots between the K3s and K8s distributions in a Single-Node environment. This study aims to deploy the Longhorn autosnapshot system using RecurringJob on K3s and K8s, then compare their performance based on the metrics of Duration, Latency, Delay, CPU, and RAM. The implementation was conducted on a Single-Node Ubuntu Server 24.04 VPS with a MySQL workload of approximately 300 MB as a control variable. Data was collected through 30 snapshot iterations at one-minute intervals on each cluster using an automated monitoring script that recorded the seven indicators into CSV files. Test results showed that K3s outperformed K8s in Duration (1.644 ms vs 3.210 ms), CPU consumption (8.33% vs 11.30%), and RAM usage (2.049 MiB vs 2.476 MiB). Conversely, K8s demonstrated an advantage in Latency (1.154 ms vs 1.234 ms) and Delay (1.365 ms vs 1.667 ms) due to its watch-based etcd architecture compared to the single-writer SQLite in K3s. K3s is recommended for resource-constrained environments, while K8s is more suitable when scheduler consistency and metric stability are priorities.
Kata Kunci : autosnapshot, Longhorn, Kubernetes (K8s), K3s, Single-Node