erlang調優方法

1. 來自Scaling Erlang的方法html

內核調優:bash

# Increase the ipv4 port range: 
sysctl -w net.ipv4.ip_local_port_range="1024 65535" 
# General gigabit tuning: 
sysctl -w net.core.rmem_max=16777216 
sysctl -w net.core.wmem_max=16777216 
sysctl -w net.ipv4.tcp_rmem="4096 87380 16777216" 
sysctl -w net.ipv4.tcp_wmem="4096 65536 16777216" 
sysctl -w net.ipv4.tcp_syncookies=1 
# This gives the kernel more memory for tcp which you need with many (100k+) open socket connections 
sysctl -w net.ipv4.tcp_mem="50576 64768 98152" sysctl -w net.core.netdev_max_backlog=2500 
# This set the tcp max connections 
sysctl -w net.netfilter.nf_conntrack_max=1233000

設置打開文件的上限cookie

ulimit -n 999999

erl命令行參數app

Erl presents a long list of command line options, we usually need to use just a few of them (+P to have a higher number of processes, +K to enable kernell poll, -smp to enable SMP support)

  待續socket

相關文章
相關標籤/搜索