Netem with high limit value and memory leaks in 2.4 kernel.

From: Sergey Prokoshev (prokoshev_at_gmail.com)
Date: 04/29/05


Date: 29 Apr 2005 02:57:50 -0700

Hello.
Recently I made some tests with netem under high load. I used Linux
2.4.30 kernel on 2*Xeon-2.4 box with 2 e1000 NICs, 3G RAM. I
configured netem to add 200 ms delay with 200 ms variation for packets
travelling from one NIC to another.
[root@godzilla linux-2.4.30-highmem]# tc -s qdisc show
qdisc netem 8001: dev eth0 limit 500000 delay 200.0ms 200.0ms
 Sent 3072854817148 bytes 1777594601 pkts (dropped 0, overlimits 0)
qdisc netem 8002: dev eth1 limit 500000 delay 200.0ms 200.0ms
 Sent 5310 bytes 60 pkts (dropped 0, overlimits 0)

To achieve maximum performance I had to increase limit up to 500000.
Also, I applied patch that allow kernel to use more than 1G RAM
(http://www.kernel.org/pub/linux/kernel/people/andrea/
kernels/v2.4/2.4.23aa1/00_3.5G-address-space-5). Under this
conditions, maximum throughput is approx. 250000 packets/sec (60 byte
packets).
But I noticed that memory reserved by kernel for packets processing
not being freed after removing traffic (same without memory patch
applied).
[root@godzilla linux-2.4.30-highmem]# free -l
             total used free shared buffers
cached
Mem: 3105252 2671332 433920 0 117864
340768
Low: 2974244 2542608 431636
High: 131008 128724 2284
-/+ buffers/cache: 2212700 892552
Swap: 2040212 0 2040212

Does anybody know, is it possible to fix this memory leak somehow?
Thanks!



Relevant Pages

  • Re: [PATCH 00/28] Swap over NFS -v16
    ... To do so we need to distinguish needed from unneeded packets; ... our state must not consume memory, ... a/ in caches, such as the fragment cache and the route cache ...
    (Linux-Kernel)
  • Re: [PATCH 00/28] Swap over NFS -v16
    ... of dirty memory so that when we desperately need memory on the ... any incoming packets. ... So suppose we forgot about all the allocation tracking (that doesn't ... A packet is received, it can be a fragment, it will be placed in the ...
    (Linux-Kernel)
  • Re: [PATCH 00/28] Swap over NFS -v16
    ... To do so we need to distinguish needed from unneeded packets; ... our state must not consume memory, ... a/ in caches, such as the fragment cache and the route cache ...
    (Linux-Kernel)
  • [patch 2.6.12-rc3] dell_rbu: Resubmitting patch for new Dell BIOS update driver
    ... This also has a fix where the packets were leaked in the function create_packet line#227. ... +The BIOS update is done by writing the new BIOS image in to contiguous physical ... +memory addressable by the BIOS. ... +The disadvantage of contiguous allocation is that it may not be always possible ...
    (Linux-Kernel)
  • Re: [RFC][PATCH 0/9] Network receive deadlock prevention for NBD
    ... when memory is low, we only deliver data to memory critical sockets ... packets to other sockets get dropped, so the memory can be reused ... so network needs special allocator in OOM ...
    (Linux-Kernel)