* How can we make more use of memory for TCP properly?
@ 2006-06-13 21:46 Kumiko Ono
2006-06-14 5:20 ` Andi Kleen
0 siblings, 1 reply; 2+ messages in thread
From: Kumiko Ono @ 2006-06-13 21:46 UTC (permalink / raw)
To: netdev
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: How can we make more use of memory for TCP properly?
2006-06-13 21:46 How can we make more use of memory for TCP properly? Kumiko Ono
@ 2006-06-14 5:20 ` Andi Kleen
0 siblings, 0 replies; 2+ messages in thread
From: Andi Kleen @ 2006-06-14 5:20 UTC (permalink / raw)
To: Kumiko Ono; +Cc: netdev
> 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.
TCP can only use low memory for this which is limited to around 900MB
on 32bit systems. 64bit CPUs don't have this problem.
-Andi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-06-14 5:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-13 21:46 How can we make more use of memory for TCP properly? Kumiko Ono
2006-06-14 5:20 ` Andi Kleen
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).