SOP OPTIMASI VPS CBT UJIAN ONLINE — 901–1.200 siswa ujian bersamaan
- Senin, 02 November 2026
- Kanghaki
- 0 komentar
Spesifikasi VPS untuk 901–1.200 siswa ujian bersamaan
CPU: 8 vCPU Core
RAM: 16 GB
Storage: NVMe/SSD
Sistem: Debian/Ubuntu + FASTPANEL
1. OPTIMASI TAMPILAN PANEL (FASTPANEL GUI)
Menu: Backend (PHP, Reverse proxy, dll.)
- Backend type: PHP
- Handler: PHP-FPM
- PHP version: PHP 8.3 (System)
- Jumlah worker: 170
- Application file: index.php index.html
Menu: Konten Statis
- Periode cache (hari): 30
- Level kompresi Gzip: 5
2. OPTIMASI FILE POOL PHP-FPM
Lokasi: Pengaturan Manual PHP di Fastpanel (/etc/php/8.3/fpm/pool.d/...)
; Konfigurasi Pool PHP-FPM CBT
; ==========================================
; PROCESS MANAGER (BEBAN 901–1.200 SISWA)
; ==========================================
pm = dynamic
; Jumlah proses maksimal bersamaan
pm.max_children = 170
; Jumlah proses standby di awal (langsung siap saat jam ujian mulai)
pm.start_servers = 45
; Minimal & maksimal proses standby di memori
pm.min_spare_servers = 30
pm.max_spare_servers = 80
; Daur ulang worker setelah 1000 request untuk mencegah kebocoran RAM
pm.max_requests = 1000
; ==========================================
; RESOURCE & TIMEOUT
; ==========================================
php_admin_value[max_execution_time] = "60"
php_admin_value[memory_limit] = "128M"
; ==========================================
; OPcache (AKSELERASI KECEPATAN EKSEKUSI KODE)
; ==========================================
php_admin_value[opcache.enable] = "1"
php_admin_value[opcache.memory_consumption] = "256"
php_admin_value[opcache.interned_strings_buffer] = "16"
php_admin_value[opcache.max_accelerated_files] = "100000"
php_admin_value[opcache.validate_timestamps] = "1"
php_admin_value[opcache.revalidate_freq] = "60"
; Nonaktifkan access log PHP-FPM agar disk I/O tidak jebol:
; access.log = /var/www/...
3. OPTIMASI DATABASE MYSQL
sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf
[mysqld]
# 1. Batas koneksi maksimal (mencegah error "Too many connections")
max_connections = 650
# 2. Alokasikan 6 GB RAM agar seluruh soal ujian & tabel berjalan di memori
innodb_buffer_pool_size = 6G
innodb_buffer_pool_instances = 6
# 3. Kunci kecepatan simpan jawaban serentak (hemat Disk I/O)
innodb_flush_log_at_trx_commit = 2
sudo systemctl restart mysql
4. OPTIMASI SISTEM LINUX & JARING PENGAMAN
# A. Swap RAM 4 GB + swappiness 10
sudo fallocate -l 4G /swapfile && \
sudo chmod 600 /swapfile && \
sudo mkswap /swapfile && \
sudo swapon /swapfile && \
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab && \
sudo sysctl vm.swappiness=10 && \
echo 'vm.swappiness=10' | sudo tee -a /etc/sysctl.conf
# B. Menaikkan batas file terbuka (ulimit 65535)
echo "* soft nofile 65535" | sudo tee -a /etc/security/limits.conf && \
echo "* hard nofile 65535" | sudo tee -a /etc/security/limits.conf && \
echo "www-data soft nofile 65535" | sudo tee -a /etc/security/limits.conf && \
echo "www-data hard nofile 65535" | sudo tee -a /etc/security/limits.conf
# C. Memprioritaskan jaringan IPv4
sudo sed -i 's/#precedence ::ffff:0:0\/96 100/precedence ::ffff:0:0\/96 100/' /etc/gai.conf
5. SOLUSI: WEB TIDAK BISA DIAKSES SETELAH REBOOT FASTPANEL
# Error log Nginx saat booting
[emerg] bind() to [2001:df3:5b80:...]:80 failed (99: Cannot assign requested address)
# Solusi permanen non-local bind & wait online
sudo sysctl -w net.ipv6.ip_nonlocal_bind=1 && \
sudo sysctl -w net.ipv4.ip_nonlocal_bind=1 && \
echo "net.ipv6.ip_nonlocal_bind=1" | sudo tee -a /etc/sysctl.conf && \
echo "net.ipv4.ip_nonlocal_bind=1" | sudo tee -a /etc/sysctl.conf && \
sudo systemctl enable systemd-networkd-wait-online.service 2>/dev/null
6. TABEL VERIFIKASI AKHIR
- Koneksi MySQL: sudo mysql -e "SHOW VARIABLES LIKE 'max_connections';" → 650
- MySQL Buffer Pool: sudo mysql -e "SELECT @@innodb_buffer_pool_size/1024/1024;" → 6144 MB (6 GB)
- Kapasitas RAM + Swap: free -h → Mem: ≈ 16 GB, Swap: 4.0 GB
- Bandwidth Port Internet: wget -4 -O /dev/null http://mirror.biznetgio.com/ubuntu/lslR.gz → Hasil di SOP: 207 MB/s (~1.65 Gbps)
- Auto-Start Reboot: sudo reboot → Setelah reboot, refresh browser: website langsung aktif
7. TIPS OPERASIONAL HARI-H UJIAN
1. Pemantauan server: Buka terminal SSH dan ketik htop untuk memantau pemakaian CPU dan RAM secara real-time.
2. Ukuran gambar soal: Pastikan gambar soal ujian sudah dikompresi di bawah 200 KB per file untuk menjaga bandwidth.
3. Backup terakhir: Sebelum ujian dimulai, ekspor/backup database .sql lewat menu Databases di Fastpanel dan simpan filenya di komputer lokal Anda.