netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kumiko Ono <kumiko@cs.columbia.edu>
To: netdev@vger.kernel.org
Subject: How can we make more use of memory for TCP properly?
Date: Tue, 13 Jun 2006 17:46:34 -0400	[thread overview]
Message-ID: <448F323A.7000005@cs.columbia.edu> (raw)

Hi all,

Although I tried to find similar topics in the maling list, I found no 
useful clue. If I overlooked, please let me know the pointer.

I need to increase the value of sysctl_tcp_mem[2] that limit the total 
amount of memory allocated for TCP in order to maintain a number of 
simultateous TCP connections at a server, especially as a TCP server, 
like a web server.

Accorting to TCP man page, the kernel calculates the values of 
sysctl_tcp_mem depending on available physical memory at boot time.
I added 2GB RAM to a machine that had 2GB, and then it has 4GB RAM now. 
However, the value of sysctl_tcp_mem[2] has not changed from 196608 
(pages). The machine is running at Linux 2.6.16.5 i686 Intel(R) 
Pentium(R) 4 CPU 3.06GHz.

When looking through the tcp_init() in tcp.c, I found the value are 
determined with the tcp bind hash size, which reaches a upper cap of 
65536. I understand this upper cap is derived from the maximum of local 
port numbers, which are related to the behavior of TCP client, not that 
of TCP server.

When I manually increased the sysctl_tcp_mem to the double, 393216, and 
tried to establish over 30K TCP connections, the server hung up without 
any error messages of syslog.

Could anbody tell me how to make more use of memory for TCP connections 
properly, without replacing the machine to 64-bit arch.?

Regards,
Kumiko

             reply	other threads:[~2006-06-13 21:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-13 21:46 Kumiko Ono [this message]
2006-06-14  5:20 ` How can we make more use of memory for TCP properly? Andi Kleen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=448F323A.7000005@cs.columbia.edu \
    --to=kumiko@cs.columbia.edu \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).