Linux Netfilter discussions
 help / color / mirror / Atom feed
* Memory leak?
       [not found] <20031103142830.14782.87331.Mailman@netfilter-sponsored-by.noris.net>
@ 2003-11-04 14:49 ` Michael Friedhoff
  2003-11-04 22:18   ` Alistair Tonner
  2003-11-07 16:53   ` Harald Welte
  0 siblings, 2 replies; 5+ messages in thread
From: Michael Friedhoff @ 2003-11-04 14:49 UTC (permalink / raw)
  To: netfilter

Does anyone know of any memory leaks in the
netfilter code?

I have a dedicated dual 667 running as a SNAT server.
It has two Intel Pro100S adapter.  This is a RedHat 9
box.  I am running kernel version 2.4.20-8smp.  I know
it is not as current as what it should be.  This is a
production box and have not had the time to upgrade the
kernel.  I have noticed a steady decrease in the amount
of memory being utilized.

[root@nat root]# ps -A
  PID TTY          TIME CMD
    1 ?        00:00:06 init
    2 ?        00:00:00 migration/0
    3 ?        00:00:00 migration/1
    4 ?        00:00:00 keventd
    5 ?        00:00:00 ksoftirqd_CPU0
    6 ?        00:00:00 ksoftirqd_CPU1
   11 ?        00:00:00 bdflush
    7 ?        00:00:01 kswapd
    8 ?        00:00:00 kscand/DMA
    9 ?        00:00:56 kscand/Normal
   10 ?        00:00:00 kscand/HighMem
   12 ?        00:00:00 kupdated
   13 ?        00:00:00 mdrecoveryd
   21 ?        00:00:05 kjournald
   79 ?        00:00:00 khubd
 1239 ?        00:00:00 kjournald
 1619 ?        00:00:07 syslogd
 1623 ?        00:00:00 klogd
 1641 ?        00:00:00 portmap
 1968 ?        00:00:00 sshd
 2006 ?        00:00:00 gpm
 2053 ?        00:00:00 crond
 2286 ?        00:00:00 atd
 2345 tty2     00:00:00 mingetty
 2346 tty3     00:00:00 mingetty
 2347 tty4     00:00:00 mingetty
 2348 tty5     00:00:00 mingetty
 2352 tty6     00:00:00 mingetty
 4596 tty1     00:00:00 mingetty
 5013 ?        00:02:05 sshd
 5016 pts/0    00:00:00 bash
 5662 pts/0    00:00:00 ps

I am not positive that netfilter is the cause for
the memory loss, but it is the only purpose of the
machine.  In the last 12 hours, the amout of
available memory has decreased by 1.5MB.  I know
that isn't much, but since this is a production box,
I would rather not have to reboot it constantly.

--Michael Friedhoff



^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: Memory leak?
@ 2003-11-04 17:01 Daniel Chemko
  0 siblings, 0 replies; 5+ messages in thread
From: Daniel Chemko @ 2003-11-04 17:01 UTC (permalink / raw)
  To: Michael Friedhoff, netfilter

I had problems with POM code and Redhat 8/9 kernels. I upgraded to
2.4.22 with all the POM patches I could apply and the problem went away.
You may also want to decrease the TCP CLOSE_WAIT timeout to something
reasonable if you are getting way too many CLOSE_WAITs in ip_conntrack

-----Original Message-----
From: Michael Friedhoff [mailto:michael@profindy.com] 
Sent: Tuesday, November 04, 2003 6:49 AM
To: netfilter@lists.netfilter.org
Subject: Memory leak?

Does anyone know of any memory leaks in the
netfilter code?

I have a dedicated dual 667 running as a SNAT server.
It has two Intel Pro100S adapter.  This is a RedHat 9
box.  I am running kernel version 2.4.20-8smp.  I know
it is not as current as what it should be.  This is a
production box and have not had the time to upgrade the
kernel.  I have noticed a steady decrease in the amount
of memory being utilized.

[root@nat root]# ps -A
  PID TTY          TIME CMD
    1 ?        00:00:06 init
    2 ?        00:00:00 migration/0
    3 ?        00:00:00 migration/1
    4 ?        00:00:00 keventd
    5 ?        00:00:00 ksoftirqd_CPU0
    6 ?        00:00:00 ksoftirqd_CPU1
   11 ?        00:00:00 bdflush
    7 ?        00:00:01 kswapd
    8 ?        00:00:00 kscand/DMA
    9 ?        00:00:56 kscand/Normal
   10 ?        00:00:00 kscand/HighMem
   12 ?        00:00:00 kupdated
   13 ?        00:00:00 mdrecoveryd
   21 ?        00:00:05 kjournald
   79 ?        00:00:00 khubd
 1239 ?        00:00:00 kjournald
 1619 ?        00:00:07 syslogd
 1623 ?        00:00:00 klogd
 1641 ?        00:00:00 portmap
 1968 ?        00:00:00 sshd
 2006 ?        00:00:00 gpm
 2053 ?        00:00:00 crond
 2286 ?        00:00:00 atd
 2345 tty2     00:00:00 mingetty
 2346 tty3     00:00:00 mingetty
 2347 tty4     00:00:00 mingetty
 2348 tty5     00:00:00 mingetty
 2352 tty6     00:00:00 mingetty
 4596 tty1     00:00:00 mingetty
 5013 ?        00:02:05 sshd
 5016 pts/0    00:00:00 bash
 5662 pts/0    00:00:00 ps

I am not positive that netfilter is the cause for
the memory loss, but it is the only purpose of the
machine.  In the last 12 hours, the amout of
available memory has decreased by 1.5MB.  I know
that isn't much, but since this is a production box,
I would rather not have to reboot it constantly.

--Michael Friedhoff




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Memory leak?
  2003-11-04 14:49 ` Memory leak? Michael Friedhoff
@ 2003-11-04 22:18   ` Alistair Tonner
  2003-11-07 16:53   ` Harald Welte
  1 sibling, 0 replies; 5+ messages in thread
From: Alistair Tonner @ 2003-11-04 22:18 UTC (permalink / raw)
  To: Michael Friedhoff, netfilter

On November 4, 2003 09:49 am, Michael Friedhoff wrote:
> Does anyone know of any memory leaks in the
> netfilter code?

	Netfilter in general is not known to have any terrible memory leaks, but you 
dont tell us which version or sufficient detail of which modules you are 
using.

>
> I have a dedicated dual 667 running as a SNAT server.
> It has two Intel Pro100S adapter.  This is a RedHat 9
> box.  I am running kernel version 2.4.20-8smp.  I know
> it is not as current as what it should be.  This is a
> production box and have not had the time to upgrade the
> kernel.  I have noticed a steady decrease in the amount
> of memory being utilized.
>

	Are you seeing any issues that indicate the box is in distress?

	Linux by its memory management nature will utilize all the ram in a system.  
given sufficient time any system will end up with almost no  apparently  free 
ram.  Should an application require it the kernel will free appropriate ram 
from caching duties.


> [root@nat root]# ps -A
>   PID TTY          TIME CMD
>     1 ?        00:00:06 init
>     2 ?        00:00:00 migration/0
>     3 ?        00:00:00 migration/1
>     4 ?        00:00:00 keventd
>     5 ?        00:00:00 ksoftirqd_CPU0
>     6 ?        00:00:00 ksoftirqd_CPU1
>    11 ?        00:00:00 bdflush
>     7 ?        00:00:01 kswapd
>     8 ?        00:00:00 kscand/DMA
>     9 ?        00:00:56 kscand/Normal
>    10 ?        00:00:00 kscand/HighMem
>    12 ?        00:00:00 kupdated
>    13 ?        00:00:00 mdrecoveryd
>    21 ?        00:00:05 kjournald
>    79 ?        00:00:00 khubd
>  1239 ?        00:00:00 kjournald
>  1619 ?        00:00:07 syslogd
>  1623 ?        00:00:00 klogd
>  1641 ?        00:00:00 portmap
>  1968 ?        00:00:00 sshd
>  2006 ?        00:00:00 gpm
>  2053 ?        00:00:00 crond
>  2286 ?        00:00:00 atd
>  2345 tty2     00:00:00 mingetty
>  2346 tty3     00:00:00 mingetty
>  2347 tty4     00:00:00 mingetty
>  2348 tty5     00:00:00 mingetty
>  2352 tty6     00:00:00 mingetty
>  4596 tty1     00:00:00 mingetty
>  5013 ?        00:02:05 sshd
>  5016 pts/0    00:00:00 bash
>  5662 pts/0    00:00:00 ps
>
> I am not positive that netfilter is the cause for
> the memory loss, but it is the only purpose of the
> machine.  In the last 12 hours, the amout of
> available memory has decreased by 1.5MB.  I know
> that isn't much, but since this is a production box,
> I would rather not have to reboot it constantly.
>
	You shouldn't need to do this unless there are problems with connecting to 
the box or there are demonstrable problems with client connections.

   Your logs will tell you that there are issues should there be problems.  
Please post those messages should you get them.

> --Michael Friedhoff

-- 

	Alistair Tonner
	nerdnet.ca
	Senior Systems Analyst - RSS
	
     Any sufficiently advanced technology will have the appearance of magic.
	Lets get magical!


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Memory leak?
  2003-11-04 14:49 ` Memory leak? Michael Friedhoff
  2003-11-04 22:18   ` Alistair Tonner
@ 2003-11-07 16:53   ` Harald Welte
  2003-11-07 17:17     ` Memory leak? <<-- FAQ subject somewhere maybe? Alistair Tonner
  1 sibling, 1 reply; 5+ messages in thread
From: Harald Welte @ 2003-11-07 16:53 UTC (permalink / raw)
  To: Michael Friedhoff; +Cc: netfilter

[-- Attachment #1: Type: text/plain, Size: 1132 bytes --]

On Tue, Nov 04, 2003 at 08:49:10AM -0600, Michael Friedhoff wrote:

what is your ps outout supposed to tell us?
 
> I am not positive that netfilter is the cause for
> the memory loss, but it is the only purpose of the
> machine.  In the last 12 hours, the amout of
> available memory has decreased by 1.5MB.  I know
> that isn't much, but since this is a production box,
> I would rather not have to reboot it constantly.

what amount of memory are you referring to?  'free' memory (as in the
top program) will always be very low, since linux uses almost all free
memory for caching/buffering. 

the output of /proc/slabinfo (|grep ip_conntrack) should be more useful
to see if the conntrack hash is growing or not.

> --Michael Friedhoff

-- 
- Harald Welte <laforge@netfilter.org>             http://www.netfilter.org/
============================================================================
  "Fragmentation is like classful addressing -- an interesting early
   architectural error that shows how much experimentation was going
   on while IP was being designed."                    -- Paul Vixie

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Memory leak? <<-- FAQ subject somewhere maybe?
  2003-11-07 16:53   ` Harald Welte
@ 2003-11-07 17:17     ` Alistair Tonner
  0 siblings, 0 replies; 5+ messages in thread
From: Alistair Tonner @ 2003-11-07 17:17 UTC (permalink / raw)
  To: blueflux; +Cc: netfilter

On November 7, 2003 11:53 am, Harald Welte wrote:
> On Tue, Nov 04, 2003 at 08:49:10AM -0600, Michael Friedhoff wrote:
>
> what is your ps outout supposed to tell us?
>
> > I am not positive that netfilter is the cause for
> > the memory loss, but it is the only purpose of the
> > machine.  In the last 12 hours, the amout of
> > available memory has decreased by 1.5MB.  I know
> > that isn't much, but since this is a production box,
> > I would rather not have to reboot it constantly.
>
> what amount of memory are you referring to?  'free' memory (as in the
> top program) will always be very low, since linux uses almost all free
> memory for caching/buffering.
>
> the output of /proc/slabinfo (|grep ip_conntrack) should be more useful
> to see if the conntrack hash is growing or not.
>
> > --Michael Friedhoff


	Oskar A: --- just a suggestion we *really* need to make this a FAQ ... 
perhaps you could put an appropriate caveat in your marvellous tutorials???
	With some outline for absolute newbies to determine 
-- 

	Alistair Tonner
	nerdnet.ca
	Senior Systems Analyst - RSS
	
     Any sufficiently advanced technology will have the appearance of magic.
	Lets get magical!


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-11-07 17:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20031103142830.14782.87331.Mailman@netfilter-sponsored-by.noris.net>
2003-11-04 14:49 ` Memory leak? Michael Friedhoff
2003-11-04 22:18   ` Alistair Tonner
2003-11-07 16:53   ` Harald Welte
2003-11-07 17:17     ` Memory leak? <<-- FAQ subject somewhere maybe? Alistair Tonner
2003-11-04 17:01 Memory leak? Daniel Chemko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox