|
The tcp_mem variable defines how the TCP stack
should behave when it comes to memory usage. It consists of three values, just
as the tcp_wmem and tcp_rmem variables. The values are measured in memory pages
(in short, pages). The size of each memory page differs depending on hardware
and configuration options in the kernel, but on standard i386 computers, this is
4 kilobyte or 4096 bytes. On some newer hardware, this is set to 16, 32 or even
64 kilobytes. All of these values have no real default value since it is
calculated at boottime by the kernel, and should in most cases be good for you
and most usages you may encounter.
The first value specified in the tcp_mem
variable tells the kernel the low threshold. Below this point, the TCP stack do
not bother at all about putting any pressure on the memory usage by different
TCP sockets.
The second value tells the kernel at which point
to start pressuring memory usage down. This so called memory pressure mode is
continued until the memory usage enters the lower threshold again, and at which
point it enters the default behaviour of the low threshold again. The memory
pressure mode presses down the TCP receive and send buffers for all the sockets
as much as possible, until the low mark is reached again.
The final value tells the kernel how many memory
pages it may use maximally. If this value is reached, TCP streams and packets
start getting dropped until we reach a lower memory usage again. This value
includes all TCP sockets currently in use.
Problem with the Memory
page settings. : Web100 autotuning sometime doesn't work with 4K pages.. you
have increase it to 16K.
a) echo "4096 33554432
33554432" > /proc/sys/net/ipv4/tcp_mem -- Stop
b) echo "16384 33554432 33554432" > /proc/sys/net/ipv4/tcp_mem
Source:http:
ipsysctl.html
|