VPS (Virtual Private Server) performans optimizasyonu, sınırlı kaynakları en verimli şekilde kullanarak maksimum hız ve kararlılık elde etmenizi sağlar. Doğru yapılandırma ile küçük bir VPS bile büyük iş yüklerini kaldırabilir.
VPS Performans Analizi
# CPU kullanımı
htop
mpstat -P ALL 1 5
# RAM kullanımı
free -h
vmstat 1 10
# Disk I/O
iostat -x 1 5
iotop
# Ağ performansı
iftop -n
nloadKernel Parametreleri Optimizasyonu
# /etc/sysctl.conf
# Ağ performansı
net.core.somaxconn = 65535
net.core.netdev_max_backlog = 65535
net.ipv4.tcp_max_syn_backlog = 65535
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_fin_timeout = 15
# Bellek yönetimi
vm.swappiness = 10
vm.dirty_ratio = 15
vm.dirty_background_ratio = 5
# Dosya tanıtıcıları
fs.file-max = 2097152
# Uygula
sudo sysctl -pWeb Sunucu Optimizasyonu (Nginx)
# /etc/nginx/nginx.conf
worker_processes auto;
worker_rlimit_nofile 65535;
events {
worker_connections 65535;
multi_accept on;
use epoll;
}
http {
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
# Gzip sıkıştırma
gzip on;
gzip_comp_level 5;
gzip_types text/plain text/css application/json application/javascript text/xml;
# Önbellekleme
open_file_cache max=200000 inactive=20s;
open_file_cache_valid 30s;
}PHP-FPM Ayarları
# /etc/php/8.3/fpm/pool.d/www.conf
# RAM'e göre hesaplama: (Toplam RAM - Sistem) / Ortalama PHP process boyutu
# 4GB RAM VPS için:
pm = dynamic
pm.max_children = 30
pm.start_servers = 5
pm.min_spare_servers = 3
pm.max_spare_servers = 10
pm.max_requests = 500
# OPcache ayarları
php_admin_value[opcache.enable] = 1
php_admin_value[opcache.memory_consumption] = 256
php_admin_value[opcache.jit_buffer_size] = 128MMySQL/MariaDB Optimization
# /etc/mysql/mariadb.conf.d/50-server.cnf
[mysqld]
# 4GB RAM VPS için
innodb_buffer_pool_size = 2G
innodb_log_file_size = 512M
innodb_flush_method = O_DIRECT
innodb_flush_log_at_trx_commit = 2
query_cache_type = 1
query_cache_size = 128M
max_connections = 200
tmp_table_size = 64M
max_heap_table_size = 64MMonitoring Araçları
| Araç | Kullanım | Lisans |
|---|---|---|
| htop | İnteraktif process izleme | Ücretsiz |
| Netdata | Gerçek zamanlı dashboard | Ücretsiz/Pro |
| Prometheus + Grafana | Metrik toplama ve görselleştirme | Ücretsiz |
| Monit | Servis izleme ve otomatik restart | Ücretsiz |
Yüksek performanslı Sanal Sunucu ve VDS Sunucu paketlerimizi keşfedin.

