0

Currently I noticed there are about 15K open connections to localhost. It is mainly connecting to Memcached. I am clueless where I should start to optimize TCP/IP stack. Memcached support UDP, but the PHP library doesn't support it.

The server has a lot of memory, about 7GB and it is dual core. Any pointers in how to optimize TCP / IP stack in Linux ?

mary
  • 9
  • 3

2 Answers2

1

Since memcached is running on the same server, consider configuring it (and your web app) to use a UNIX socket instead of network connections.

Michael Hampton
  • 237,123
  • 42
  • 477
  • 940
0

What state are the connections in? If you only need more TCP connections (with identical source-destination pairs), ip_local_port_range might be something to look at: http://www.faqs.org/docs/securing/chap6sec70.html . If you use connection tracking, http://www.faqs.org/docs/iptables/theconntrackentries.html might be useful. If you want to push the maximum connection/s, tcp_tw_recycle and tcp_tw_reuse might be interesting, but be careful with those and NAT.

arjarj
  • 2,981
  • 1
  • 16
  • 10