限杜甫或者KVM VPS。
一、KVM VPS 磁盘I/O优化
SSH下:
1、
echo 0 > /sys/block/vda/queue/rotational
echo 0 > /sys/block/vda/queue/rq_affinity
echo noop > /sys/block/vda/queue/scheduler
echo "echo 0 > /sys/block/vda/queue/rotational" >> /etc/rc.local
echo "echo 0 > /sys/block/vda/queue/rq_affinity" >> /etc/rc.local
echo "echo noop > /sys/block/vda/queue/scheduler" >> /etc/rc.local
echo 'vm.swappiness=5' >> /etc/sysctl.conf
echo 'vm.vfs_cache_pressure=50' >> /etc/sysctl.conf
2、
sysctl -p
3、修改fstab
vi /etc/fstab
proc /proc proc defaults 0 0
# / was on /dev/sda1 during installation
UUID=bf175032-898a-4883-a702-ca0ab9e51d1d / ext4 noatime,errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=2d7209ed-b4c1-4bb6-96f2-73d7ba82ca9b none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto 0 0
4、
mount -o remount /
二、KVM VPS 网络优化
SSH下:
net.core.rmem_max=16777216
net.core.wmem_max=16777216
net.ipv4.tcp_rmem=4096 87380 16777216
net.ipv4.tcp_wmem=4096 65536 16777216
via:https://billing.mycustomhosting.net/support/knowledgebase/3/view/KVM-Disk-IorO-Optimization
https://billing.mycustomhosting.net/support/knowledgebase/4/view/KVM-Network-Optimization
-
所有主机信息仅是为及时分享并收录,不做推荐!