Monday, 19 December 2011

over 1M open sockets at linux node

С появлением всяких commet соединений обычным делом стали сотни тысяч соединений на одном тазике.

Но иногда хочется большего. Хочется перешагнуть за миллион. И так, шпаргалка по настройки системы для 10и миллионов соединений:

  • /etc/security/limits.conf:

    services soft nofile 10000000

    services hard nofile 10000000

  • /etc/sysctl.conf:

    net.core.somaxconn = 100000

    net.nf_conntrack_max = 268435456

    net.core.rmem_max = 65536

    net.core.wmem_max = 65536

    net.ipv4.tcp_wmem = 4096 16384 65536

    net.ipv4.tcp_rmem = 4096 16384 65536

    fs.nr_open = 10485760

Да, на сервере должно быть много памяти :)

Write on: 2:42 | 0 comments | | tags: , , , | permalink |
Add post to:   Delicious Reddit Slashdot Digg Technorati Google


Add comment

Comments

No comments for this post

Comment form for «over 1M open sockets at linux node»

Required. 30 chars of fewer.

Required.