天天看点

性能测试 -- 内核调优

/etc/sysctl.conf 这个文件加上以下这些参数,然后执行sysctl -p更新

net.ipv4.tcp_max_syn_backlog = 4096

net.core.netdev_max_backlog = 2048

net.ipv4.tcp_fin_timeout = 15

net.ipv4.tcp_tw_reuse = 1

net.ipv4.tcp_tw_recycle = 1

net.ipv4.ip_local_port_range = 1024 65535

vm.swappiness = 10

net.core.somaxconn = 1024

net.ipv4.ip_local_reserved_ports = 2090,9080,9090,10029,22223-22323

vm.dirty_background_bytes = 104857600虽千万人,吾往矣!

继续阅读