linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Memory Leaking. Help!
@ 2002-04-14 12:23 ivan
  2002-04-14 13:15 ` Itai Nahshon
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: ivan @ 2002-04-14 12:23 UTC (permalink / raw)
  To: linux-kernel

Hi,

I have posted this to linux-mm list but it is a bit quite there, so I
decided to try this one.

I am running 7.2RedHat kernel 2.4.9-31 on Dell 4400 PowerEdge 
Server. Dual CPU 990MHz.

The machine was a lemon from the start. We paid for it 16000$, to find out 
that one SCSI controller and two SCSI disk were broken out of the box. 

It kept crushing a couple time a months with clear logs. (My Desktop 
Pentium 2 has being running for a year).

Machine is under warranty; Dell replaced mum and both CPUs. Still going
down. They refused to replace RAM (4Gb) asking me to test memory by
swapping RAM around to see if frequency of crushes will decrease/increase.
This is despite all my explanations that it was a production server.

I have to admit: "Buy DELL and you in Hell" this is despite all the good
things Dell developers are doing for the linux community.

10 Days ago I installed DNS and DHCPd servers from RedHat and noticed that 
"top" shows the amount of consumed memory is slowly and constantly 
growing. Machine became unstable and a few users complained that their 
files disappeared. ( we have good backup ). I re-booted 4 days ago and now 
it looks it is doing it again. Could this be BIND?


1) Could you please advice how can I detect memory leaks. ( I guess it is 
not an easy task on production server.

2) Is there a tool which I can use to log memory usage 

3) Any help will be appreciated.


Thank you in advance,
Ivan.



-- 

There's an old story about the person who wished his computer were as
 easy to use as his telephone. That wish has come true, since I no
 longer know how to use my telephone.

================================================================================

Ivan Teliatnikov,
F05 David Edgeworth Building,
Department of Geology and Geophysics,
School of Geosciences,
University of Sydney, 2006
Australia

e-mail: ivan@es.usyd.edu.au
ph:  061-2-9351-2031 (w)
fax: 061-2-9351-0184 (w)

===============================================================================


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

* Re: Memory Leaking. Help!
  2002-04-14 12:23 Memory Leaking. Help! ivan
@ 2002-04-14 13:15 ` Itai Nahshon
  2002-04-14 14:05 ` Alan Cox
  2002-04-15  0:03 ` Tomasz Rola
  2 siblings, 0 replies; 15+ messages in thread
From: Itai Nahshon @ 2002-04-14 13:15 UTC (permalink / raw)
  To: ivan, linux-kernel

On Sunday 14 April 2002 15:23 pm, ivan wrote:
> Machine is under warranty; Dell replaced mum and both CPUs. Still going
> down. They refused to replace RAM (4Gb) asking me to test memory by
> swapping RAM around to see if frequency of crushes will decrease/increase.
> This is despite all my explanations that it was a production server.

Have you tried memtest86 ?

-- Itai

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

* Re: Memory Leaking. Help!
  2002-04-14 12:23 Memory Leaking. Help! ivan
  2002-04-14 13:15 ` Itai Nahshon
@ 2002-04-14 14:05 ` Alan Cox
  2002-04-14 22:51   ` ivan
  2002-04-15  0:03 ` Tomasz Rola
  2 siblings, 1 reply; 15+ messages in thread
From: Alan Cox @ 2002-04-14 14:05 UTC (permalink / raw)
  To: ivan; +Cc: linux-kernel

> 10 Days ago I installed DNS and DHCPd servers from RedHat and noticed that 
> "top" shows the amount of consumed memory is slowly and constantly 
> growing. Machine became unstable and a few users complained that their 
> files disappeared. ( we have good backup ). I re-booted 4 days ago and now 
> it looks it is doing it again. Could this be BIND?

Wildly improbable. Slow shifts in memory usage occur naturally so don't be 
totally mislead by it. Named for example will grow and shrink over time 
according to what it has cached and what people asked for.

> 1) Could you please advice how can I detect memory leaks. ( I guess it is 
> not an easy task on production server.
> 
> 2) Is there a tool which I can use to log memory usage 

ps, looking in /proc at the address space maps too.

What you almost certainly want to do first is run memtest86 as suggested
by others. 


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

* Re: Memory Leaking. Help!
  2002-04-14 14:05 ` Alan Cox
@ 2002-04-14 22:51   ` ivan
  2002-04-15  0:10     ` Alan Cox
  2002-04-15 11:30     ` Roy Sigurd Karlsbakk
  0 siblings, 2 replies; 15+ messages in thread
From: ivan @ 2002-04-14 22:51 UTC (permalink / raw)
  To: Alan Cox; +Cc: linux-kernel

On Sun, 14 Apr 2002, Alan Cox wrote:

> > 10 Days ago I installed DNS and DHCPd servers from RedHat and noticed that 
> > "top" shows the amount of consumed memory is slowly and constantly 
> > growing. Machine became unstable and a few users complained that their 
> > files disappeared. ( we have good backup ). I re-booted 4 days ago and now 
> > it looks it is doing it again. Could this be BIND?
> 
> Wildly improbable. Slow shifts in memory usage occur naturally so don't be 
> totally mislead by it. Named for example will grow and shrink over time 
> according to what it has cached and what people asked for.

But it took half of my swap (4GB) as well. A bit too much 
for a little bind. How to explain this?

> 
> > 1) Could you please advice how can I detect memory leaks. ( I guess it is 
> > not an easy task on production server.
> > 
> > 2) Is there a tool which I can use to log memory usage 
> 
> ps, looking in /proc at the address space maps too.
> 
> What you almost certainly want to do first is run memtest86 as suggested
> by others. 
> 
> 

-- 

There's an old story about the person who wished his computer were as
 easy to use as his telephone. That wish has come true, since I no
 longer know how to use my telephone.

================================================================================

Ivan Teliatnikov,
F05 David Edgeworth Building,
Department of Geology and Geophysics,
School of Geosciences,
University of Sydney, 2006
Australia

e-mail: ivan@es.usyd.edu.au
ph:  061-2-9351-2031 (w)
fax: 061-2-9351-0184 (w)

===============================================================================


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

* Re: Memory Leaking. Help!
  2002-04-14 12:23 Memory Leaking. Help! ivan
  2002-04-14 13:15 ` Itai Nahshon
  2002-04-14 14:05 ` Alan Cox
@ 2002-04-15  0:03 ` Tomasz Rola
  2 siblings, 0 replies; 15+ messages in thread
From: Tomasz Rola @ 2002-04-15  0:03 UTC (permalink / raw)
  To: ivan; +Cc: linux-kernel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sun, 14 Apr 2002, ivan wrote:

> Hi,
> 
> I have posted this to linux-mm list but it is a bit quite there, so I
> decided to try this one.
[...]
> 2) Is there a tool which I can use to log memory usage 

Perhaps memstat can help you. From the manpage:

       memstat - Identify what's using up virtual memory.

On my Debian it's in the memstat package, should be the same on RH.

bye
T.

- --
** A C programmer asked whether computer had Buddha's nature.      **
** As the answer, master did "rm -rif" on the programmer's home    **
** directory. And then the C programmer became enlightened...      **
**                                                                 **
** Tomasz Rola          mailto:tomasz_rola@bigfoot.com             **


-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 5.0i for non-commercial use
Charset: noconv

iQA/AwUBPLoY1hETUsyL9vbiEQKPpgCfcqZ2VsfgktUIZHhU02dPAszca1QAnjUl
2e061Zo24OX/nV+NSrZQ1dEL
=MY4s
-----END PGP SIGNATURE-----


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

* Re: Memory Leaking. Help!
  2002-04-14 22:51   ` ivan
@ 2002-04-15  0:10     ` Alan Cox
  2002-04-15  0:28       ` ivan
  2002-04-15 11:30     ` Roy Sigurd Karlsbakk
  1 sibling, 1 reply; 15+ messages in thread
From: Alan Cox @ 2002-04-15  0:10 UTC (permalink / raw)
  To: ivan; +Cc: Alan Cox, linux-kernel

> > totally mislead by it. Named for example will grow and shrink over time 
> > according to what it has cached and what people asked for.
> 
> But it took half of my swap (4GB) as well. A bit too much 
> for a little bind. How to explain this?

2Gb seems a bit odd - are you sure bind is the one that ate it ?

What does ps -aux imply has all the memory ?

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

* Re: Memory Leaking. Help!
  2002-04-15  0:10     ` Alan Cox
@ 2002-04-15  0:28       ` ivan
  2002-04-15  5:18         ` xystrus
                           ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: ivan @ 2002-04-15  0:28 UTC (permalink / raw)
  To: Alan Cox; +Cc: linux-kernel

On Mon, 15 Apr 2002, Alan Cox wrote:

> > > totally mislead by it. Named for example will grow and shrink over time 
> > > according to what it has cached and what people asked for.
> > 
> > But it took half of my swap (4GB) as well. A bit too much 
> > for a little bind. How to explain this?
> 
> 2Gb seems a bit odd - are you sure bind is the one that ate it ?

That was 4 GB not 2.

 No, I do not. That is why I asked is there a way to find out what is 
eating ram. I am not sure if this a leakage. I am only a paranoid 
sysadmin. 


 
> What does ps -aux imply has all the memory ?

Top at 9am showed 3.2GB of availabe memory.

Top at 10am showed 2.3Gb of available memory

This top at 11am
10:19am  up 13:23,  6 users,  load average: 0.07, 0.03, 0.01
143 processes: 142 sleeping, 1 running, 0 zombie, 0 stopped
CPU0 states:  0.0% user,  5.0% system,  0.0% nice, 94.0% idle
CPU1 states:  0.0% user,  1.0% system,  0.0% nice, 98.0% idle
Mem:  3799080K av, 2215132K used, 1583948K free,    1580K shrd,  377916K 
buff
Swap: 8192992K av,       0K used, 8192992K free                 1515392K 
cached

Mashine is doing NFS and DNS, not much load?

USER       PID %CPU %MEM   VSZ  RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.0  1388  524 ?        S    Apr14   0:03 init
root         2  0.0  0.0     0    0 ?        SW   Apr14   0:00 [keventd]
root         3  0.0  0.0     0    0 ?        SWN  Apr14   0:00 
[ksoftirqd_CPU0]
root         4  0.0  0.0     0    0 ?        SWN  Apr14   0:00 
[ksoftirqd_CPU1]
root         5  0.0  0.0     0    0 ?        SW   Apr14   0:05 [kswapd]
root         6  0.0  0.0     0    0 ?        SW   Apr14   0:00 [kreclaimd]
root         7  0.0  0.0     0    0 ?        SW   Apr14   0:01 [bdflush]
root         8  0.0  0.0     0    0 ?        SW   Apr14   0:00 [kupdated]
root         9  0.0  0.0     0    0 ?        SW<  Apr14   0:00 
[mdrecoveryd]
root        16  0.0  0.0     0    0 ?        SW   Apr14   0:00 [aacraid]
root        19  0.0  0.0     0    0 ?        SW   Apr14   0:00 [kjournald]
root       102  0.0  0.0     0    0 ?        SW   Apr14   0:00 [khubd]
root       200  0.0  0.0     0    0 ?        SW   Apr14   0:00 [kjournald]
root       201  0.0  0.0     0    0 ?        SW   Apr14   0:00 [kjournald]
root       202  0.0  0.0     0    0 ?        SW   Apr14   0:00 [kjournald]
root       203  0.0  0.0     0    0 ?        SW   Apr14   0:00 [kjournald]
root       204  0.0  0.0     0    0 ?        SW   Apr14   0:00 [kjournald]
root       205  0.0  0.0     0    0 ?        SW   Apr14   0:00 [kjournald]
root       206  0.0  0.0     0    0 ?        SW   Apr14   0:00 [kjournald]
root       207  0.0  0.0     0    0 ?        SW   Apr14   0:01 [kjournald]
root       208  0.0  0.0     0    0 ?        SW   Apr14   0:00 [kjournald]
root       611  0.0  0.0  1452  596 ?        S    Apr14   0:00 syslogd -m 
0
root       616  0.0  0.0  2000 1140 ?        S    Apr14   0:00 klogd -2
rpc        636  0.0  0.0  1544  656 ?        S    Apr14   0:00 portmap
rpcuser    664  0.0  0.0  1596  768 ?        S    Apr14   0:00 rpc.statd
root       760  0.0  0.0     0    0 ?        SW   Apr14   0:00 [kjournald]
ntp        780  0.0  0.0  1900 1892 ?        SL   Apr14   0:00 ntpd -U ntp
root       849  0.0  0.0  1496  636 ?        S    Apr14   0:00 
/usr/sbin/automou
root       865  0.0  0.0  1500  640 ?        S    Apr14   0:00 
/usr/sbin/automou
daemon     890  0.0  0.0  1424  580 ?        S    Apr14   0:00 
/usr/sbin/atd
named      908  0.0  0.1 13956 3988 ?        S    Apr14   0:00 named -u 
named
named      910  0.0  0.1 13956 3988 ?        S    Apr14   0:00 named -u 
named
named      911  0.0  0.1 13956 3988 ?        S    Apr14   0:00 named -u 
named
named      912  0.0  0.1 13956 3988 ?        S    Apr14   0:00 named -u 
named
named      913  0.0  0.1 13956 3988 ?        S    Apr14   0:00 named -u 
named
named      914  0.0  0.1 13956 3988 ?        S    Apr14   0:00 named -u 
named
root       934  0.0  0.0  2652 1248 ?        S    Apr14   0:01 
/usr/sbin/sshd
root       967  0.0  0.0  2296 1040 ?        S    Apr14   0:00 xinetd 
-stayalive
lp         991  0.0  0.0  2560  984 ?        S    Apr14   0:00 lpd Waiting  
root      1021  0.0  0.0  1776  636 ?        S    Apr14   0:00 rpc.rquotad
root      1026  0.0  0.0  2012 1164 ?        S    Apr14   0:00 rpc.mountd
root      1031  0.0  0.0     0    0 ?        SW   Apr14   0:02 [nfsd]
root      1032  0.0  0.0     0    0 ?        SW   Apr14   0:02 [nfsd]
root      1033  0.0  0.0     0    0 ?        SW   Apr14   0:02 [nfsd]
root      1034  0.0  0.0     0    0 ?        SW   Apr14   0:02 [nfsd]
root      1035  0.0  0.0     0    0 ?        SW   Apr14   0:02 [nfsd]
root      1036  0.0  0.0     0    0 ?        SW   Apr14   0:02 [nfsd]
root      1037  0.0  0.0     0    0 ?        SW   Apr14   0:02 [nfsd]
root      1038  0.0  0.0     0    0 ?        SW   Apr14   0:02 [nfsd]
root      1039  0.0  0.0     0    0 ?        SW   Apr14   0:00 [lockd]
root      1040  0.0  0.0     0    0 ?        SW   Apr14   0:00 [rpciod]
root      1046  0.0  0.0  3844 1580 ?        S    Apr14   0:00 amd -F 
/etc/amd.c
root      2202  0.0  0.0  1384  480 ?        S    Apr14   0:00 
/opt/win4lin/bin/
root      2254  0.0  0.0  1416  484 ?        S    Apr14   0:00 gpm -t ps/2 
-m /d
root      2272  0.0  0.0  1572  684 ?        S    Apr14   0:00 crond
xfs       2332  0.0  0.1  5520 4228 ?        S    Apr14   0:00 xfs 
-droppriv -da
root      2358  0.0  0.0  2596  948 ?        S    Apr14   0:00 
/usr/sbin/nsrexec
root      2368  0.0  0.0  2564 1196 ?        S    Apr14   0:00 
/usr/sbin/nsrexec
root      2374  0.0  0.0  8840  852 ?        S    Apr14   0:00 
/usr/bin/sdaemon
root      2375  0.0  0.0  8840  852 ?        S    Apr14   0:00 
/usr/bin/sdaemon
root      2378  0.0  0.0  2320 1132 tty1     S    Apr14   0:00 login -- 
root    
root      2379  0.0  0.0  1360  440 tty2     S    Apr14   0:00 
/sbin/mingetty tt
root      2380  0.0  0.0  1360  440 tty3     S    Apr14   0:00 
/sbin/mingetty tt
root      2381  0.0  0.0  1360  440 tty4     S    Apr14   0:00 
/sbin/mingetty tt
root      2382  0.0  0.0  1360  440 tty5     S    Apr14   0:00 
/sbin/mingetty tt
root      2383  0.0  0.0  1360  440 tty6     S    Apr14   0:00 
/sbin/mingetty tt
root      2754  0.0  0.0  1408  496 ?        SN   Apr14   0:41 free -b -s 
30 -o
root      4357  0.0  0.0  3400 1860 ?        S    07:46   0:02 
/usr/sbin/sshd
root      4359  0.0  0.0  2436 1320 pts/1    S    07:47   0:00 -bash
root      4459  0.1  0.0  3656 2028 ?        S    08:04   0:15 
/usr/sbin/sshd
root      4462  0.0  0.0  2440 1320 pts/2    S    08:04   0:00 -bash
root      5610  0.0  0.0  2440 1308 tty1     S    09:34   0:00 -bash
root      5757  0.0  0.0  2204  972 tty1     S    09:36   0:00 /bin/sh 
/usr/X11R
root      5764  0.0  0.0  2420  672 tty1     S    09:36   0:00 xinit 
/etc/X11/xi
root      5765  0.2  0.2 17664 10584 ?       S<   09:36   0:07 /etc/X11/X 
:0
root      5768  0.0  0.1  7176 4004 tty1     S    09:36   0:00 
/usr/bin/gnome-se
root      5787  0.0  0.0  6268 2084 ?        S    09:36   0:00 
gnome-smproxy --s
root      5791  0.0  0.0  5776 3584 ?        S    09:36   0:01 sawfish 
--sm-clie
root      5816  0.0  0.0  7120 3220 ?        S    09:36   0:00 magicdev 
--sm-cli
root      5818  0.0  0.2 40124 11068 ?       S    09:36   0:01 nautilus 
start-he
root      5820  0.0  0.1  8652 5252 ?        S    09:36   0:00 panel 
--sm-client
root      5826  0.0  0.0  3276 1276 ?        S    09:36   0:00 
gnome-name-servic
root      5829  0.0  0.0  3936 2348 ?        S    09:36   0:00 oafd 
--ac-activat
root      5834  0.0  0.0  3236 1696 ?        S    09:36   0:00 gconfd-1 
--oaf-ac
root      5838  0.0  0.2 40124 11068 ?       S    09:36   0:00 nautilus 
start-he
root      5839  0.0  0.2 40124 11068 ?       S    09:36   0:00 nautilus 
start-he
root      5840  0.0  0.2 40124 11068 ?       S    09:36   0:00 nautilus 
start-he
root      5842  0.0  0.1  7596 3972 ?        S    09:36   0:00 
tasklist_applet -
root      5844  0.0  0.1  7520 3904 ?        S    09:36   0:00 
deskguide_applet 
root      5847  0.0  0.0  7508 3696 ?        S    09:36   0:00 
multiload_applet 
root      5853  0.0  0.1 12088 5740 ?        S    09:36   0:00 
nautilus-throbber
root      5859  0.0  0.1 13444 7160 ?        S    09:37   0:00 hyperbola 
--oaf-a
root      5861  0.0  0.1 12072 5800 ?        S    09:37   0:00 
nautilus-history-
root      5863  0.0  0.1 12352 6336 ?        S    09:37   0:00 
nautilus-news --o
root      5865  0.0  0.1 12036 5620 ?        S    09:37   0:00 
nautilus-notes --
root      5879  0.0  0.2 40124 11068 ?       S    09:37   0:00 nautilus 
start-he
root      5880  0.0  0.2 40124 11068 ?       S    09:37   0:00 nautilus 
start-he
root      5881  0.0  0.2 40124 11068 ?       S    09:37   0:00 nautilus 
start-he
root      5882  0.0  0.2 40124 11068 ?       S    09:37   0:00 nautilus 
start-he
root      5885  0.0  0.2 40124 11068 ?       S    09:37   0:00 nautilus 
start-he
root      5889  0.0  0.2 40124 11068 ?       S    09:37   0:00 nautilus 
start-he
root      5890  0.0  0.2 40124 11068 ?       S    09:37   0:00 nautilus 
start-he
root      5893  0.0  0.2 40124 11068 ?       S    09:37   0:00 nautilus 
start-he
root      5895  0.0  0.1  8320 4496 ?        S    09:37   0:00 
gnome-terminal --
root      5896  0.0  0.2 40124 11068 ?       S    09:37   0:00 nautilus 
start-he
root      5897  0.0  0.2 40124 11068 ?       S    09:37   0:00 nautilus 
start-he
root      5899  0.0  0.0  1424  568 ?        S    09:37   0:00 
gnome-pty-helper
root      5900  0.0  0.0  2516 1380 pts/5    S    09:37   0:00 bash
root      6135  0.0  0.0  2512 1352 pts/6    S    09:38   0:00 bash
root      6158  0.0  0.0  2832 1676 pts/6    S    09:38   0:00 slogin 
eos14 -l r
root      6807  0.1  0.3 20780 14908 pts/5   S    09:39   0:02 
/opt/acrobat/Read
root      6834  0.2  0.3 19932 14248 pts/2   S    09:45   0:07 
/opt/acrobat/Read
root      7048  5.0  0.0  3420 1960 ?        S    10:26   0:00 
/usr/sbin/sshd
scottd    7052  1.2  0.0  2796 1548 ?        S    10:26   0:00 
/usr/bin/perl /us
scottd    7055  6.2  0.0 52052 1768 ?        S    10:26   0:00 
/opt/win4lin/publ
scottd    7310 71.0  0.1 50068 4380 ?        R    10:26   0:01 
/opt/win4lin/publ
scottd    7311  0.0  0.0 25960  392 ?        S    10:26   0:00 auserver 
0x0 0x8 
scottd    7312  4.5  0.0  5464 2544 ?        S    10:26   0:00 
/opt/win4lin/xcrt
root      7313  0.0  0.0  2828  900 pts/2    R    10:26   0:00 ps -aux


-- 

There's an old story about the person who wished his computer were as
 easy to use as his telephone. That wish has come true, since I no
 longer know how to use my telephone.

================================================================================

Ivan Teliatnikov,
F05 David Edgeworth Building,
Department of Geology and Geophysics,
School of Geosciences,
University of Sydney, 2006
Australia

e-mail: ivan@es.usyd.edu.au
ph:  061-2-9351-2031 (w)
fax: 061-2-9351-0184 (w)

===============================================================================


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

* Re: Memory Leaking. Help!
  2002-04-15  0:28       ` ivan
@ 2002-04-15  5:18         ` xystrus
  2002-04-15  6:10           ` john slee
  2002-04-15  9:09         ` Alan Cox
                           ` (2 subsequent siblings)
  3 siblings, 1 reply; 15+ messages in thread
From: xystrus @ 2002-04-15  5:18 UTC (permalink / raw)
  To: linux-kernel

On Mon, Apr 15, 2002 at 10:28:00AM +1000, ivan wrote:
> That was 4 GB not 2.
> 
>  No, I do not. That is why I asked is there a way to find out what is 
> eating ram. I am not sure if this a leakage. I am only a paranoid 
> sysadmin. 
> 

I think you said this was a server, didn't you?

You neglected to mention that you're running X and Nautilus on this
server.  You probably don't need this stuff running on a server, and
it is chewing up a good amount of RAM.  If you don't absolutely need
X, try bringing the system up in run level 3 and see if your problem
disappears...

Memory usage (as reported below) of named looks fine.

> named      908  0.0  0.1 13956 3988 ?        S    Apr14   0:00 named -u 

This is probably a big waste:

> root      5765  0.2  0.2 17664 10584 ?       S<   09:36   0:07 /etc/X11/X 
> :0
> root      5818  0.0  0.2 40124 11068 ?       S    09:36   0:01 nautilus 
> start-he
> root      5838  0.0  0.2 40124 11068 ?       S    09:36   0:00 nautilus 
> start-he
> root      5839  0.0  0.2 40124 11068 ?       S    09:36   0:00 nautilus 
> start-he
> root      5840  0.0  0.2 40124 11068 ?       S    09:36   0:00 nautilus 

[etc. snipped]

You also seem to have someone on the system running win4lin and
multiple instances of adobe acrobat reader.  If this is really a
server, perhaps it would be better to have them run those things
elsewhere...

Hope that helps

-- 
Xy
xystrus@haxm.com


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

* Re: Memory Leaking. Help!
  2002-04-15  5:18         ` xystrus
@ 2002-04-15  6:10           ` john slee
  0 siblings, 0 replies; 15+ messages in thread
From: john slee @ 2002-04-15  6:10 UTC (permalink / raw)
  To: linux-kernel

On Mon, Apr 15, 2002 at 01:18:34AM -0400, xystrus wrote:
> On Mon, Apr 15, 2002 at 10:28:00AM +1000, ivan wrote:
> > That was 4 GB not 2.
> > 
> >  No, I do not. That is why I asked is there a way to find out what is 
> > eating ram. I am not sure if this a leakage. I am only a paranoid 
> > sysadmin. 
> > 
> 
> I think you said this was a server, didn't you?
> 
> You neglected to mention that you're running X and Nautilus on this
> server.  You probably don't need this stuff running on a server, and
> it is chewing up a good amount of RAM.  If you don't absolutely need
> X, try bringing the system up in run level 3 and see if your problem
> disappears...

it could be a server for x11-based thin clients

-- 
R N G G   "Well, there it goes again... And we just sit 
 I G G G   here without opposable thumbs." -- gary larson

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

* Re: Memory Leaking. Help!
  2002-04-15  0:28       ` ivan
  2002-04-15  5:18         ` xystrus
@ 2002-04-15  9:09         ` Alan Cox
  2002-04-15 10:00         ` David Schwartz
  2002-04-15 12:25         ` Eugenio Mastroviti
  3 siblings, 0 replies; 15+ messages in thread
From: Alan Cox @ 2002-04-15  9:09 UTC (permalink / raw)
  To: ivan; +Cc: Alan Cox, linux-kernel

> > What does ps -aux imply has all the memory ?
> Top at 9am showed 3.2GB of availabe memory.
> Top at 10am showed 2.3Gb of available memory

That seems reasonable. The kernel knows free memory is waste. Until it
has used all the available memory why does it need to worry about freeing
caches ?

Alan
--
	First the west got slaves by raiding their nations
	Then the west got slaves by invading their nations
	Now the west gets slaves from unrepayable loans to their nations
	Next the west will get slaves from owning their ideas

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

* Re: Memory Leaking. Help!
  2002-04-15  0:28       ` ivan
  2002-04-15  5:18         ` xystrus
  2002-04-15  9:09         ` Alan Cox
@ 2002-04-15 10:00         ` David Schwartz
  2002-04-15 12:25         ` Eugenio Mastroviti
  3 siblings, 0 replies; 15+ messages in thread
From: David Schwartz @ 2002-04-15 10:00 UTC (permalink / raw)
  To: ivan; +Cc: linux-kernel


>No, I do not. That is why I asked is there a way to find out what is
>eating ram. I am not sure if this a leakage. I am only a paranoid
>sysadmin.

	In fact, you have no reason whatsoever to believe the memory is leaking. 
It's just being *used*.

>>What does ps -aux imply has all the memory ?

>Top at 9am showed 3.2GB of availabe memory.
>
>Top at 10am showed 2.3Gb of available memory
>
>This top at 11am
>10:19am  up 13:23,  6 users,  load average: 0.07, 0.03, 0.01
>143 processes: 142 sleeping, 1 running, 0 zombie, 0 stopped
>CPU0 states:  0.0% user,  5.0% system,  0.0% nice, 94.0% idle
>CPU1 states:  0.0% user,  1.0% system,  0.0% nice, 98.0% idle
>Mem:  3799080K av, 2215132K used, 1583948K free,    1580K shrd,  377916K
>buff
>Swap: 8192992K av,       0K used, 8192992K free                 1515392K
>cached

	If you don't want the memory to be used, take it out of the system and let 
it sit on your desk. If you put the memory in the system, the system assumes 
that you want to use it. It keeps data in memory that it would otherwise 
throw away, that we if it's used again, it doesn't have to be fetched from 
disk.

	DS



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

* Re: Memory Leaking. Help!
  2002-04-14 22:51   ` ivan
  2002-04-15  0:10     ` Alan Cox
@ 2002-04-15 11:30     ` Roy Sigurd Karlsbakk
  1 sibling, 0 replies; 15+ messages in thread
From: Roy Sigurd Karlsbakk @ 2002-04-15 11:30 UTC (permalink / raw)
  To: ivan; +Cc: Alan Cox, linux-kernel

> > > 10 Days ago I installed DNS and DHCPd servers from RedHat and noticed that 
> > > "top" shows the amount of consumed memory is slowly and constantly 
> > > growing. Machine became unstable and a few users complained that their 
> > > files disappeared. ( we have good backup ). I re-booted 4 days ago and now 
> > > it looks it is doing it again. Could this be BIND?
> > 
> > Wildly improbable. Slow shifts in memory usage occur naturally so don't be 
> > totally mislead by it. Named for example will grow and shrink over time 
> > according to what it has cached and what people asked for.
> 
> But it took half of my swap (4GB) as well. A bit too much 
> for a little bind. How to explain this?
> 

Bind can be greedy on memory usage. Upgrade to 9.2.0, and set 
max-cache-size to limit it :-)

-- 
Roy Sigurd Karlsbakk, Datavaktmester

Computers are like air conditioners.
They stop working when you open Windows.


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

* Re: Memory Leaking. Help!
  2002-04-15  0:28       ` ivan
                           ` (2 preceding siblings ...)
  2002-04-15 10:00         ` David Schwartz
@ 2002-04-15 12:25         ` Eugenio Mastroviti
  2002-04-15 15:59           ` Kervin Pierre
  3 siblings, 1 reply; 15+ messages in thread
From: Eugenio Mastroviti @ 2002-04-15 12:25 UTC (permalink / raw)
  To: ivan; +Cc: linux-kernel

ivan wrote:

> This top at 11am
> 10:19am  up 13:23,  6 users,  load average: 0.07, 0.03, 0.01
> 143 processes: 142 sleeping, 1 running, 0 zombie, 0 stopped
> CPU0 states:  0.0% user,  5.0% system,  0.0% nice, 94.0% idle
> CPU1 states:  0.0% user,  1.0% system,  0.0% nice, 98.0% idle
> Mem:  3799080K av, 2215132K used, 1583948K free,    1580K shrd,  377916K 
> buff
> Swap: 8192992K av,       0K used, 8192992K free                 1515392K 
> cached
> 
> Mashine is doing NFS and DNS, not much load?
> 


Perhaps it's worth noting that of those 2.2 GB in use, 1.5 GB are used 
as cache; seems to me there's no leak, your system is just caching as 
much data as it can in memory. The actual memory in use (check with 
'free') is total-(buffers+cache)= 2.2-(0.37+1.51)GB=about 320 MB, which 
seems reasonable enough

Eugenio
-- 
Laissez Faire Economics is the theory that if each acts like a vulture,
all will end as doves.


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

* Re: Memory Leaking. Help!
  2002-04-15 12:25         ` Eugenio Mastroviti
@ 2002-04-15 15:59           ` Kervin Pierre
  2002-04-16  0:36             ` David Schwartz
  0 siblings, 1 reply; 15+ messages in thread
From: Kervin Pierre @ 2002-04-15 15:59 UTC (permalink / raw)
  To: Eugenio Mastroviti; +Cc: ivan, linux-kernel

Eugenio Mastroviti wrote:
> much data as it can in memory. The actual memory in use (check with 
> 'free') is total-(buffers+cache)= 2.2-(0.37+1.51)GB=about 320 MB, which 

This is interesting.  What exactly is buffers and cache used for?

I had the same issue with the original poster with a new server.  A 
fresh install with nothing significant running ( no bind nor sendmail, 
etc. ) reported that over 450 out of 512 MB was used, but looking at the 
process usage on top I barelly got 5% memory usuage by process.  If the 
above calculation ( memory use = total - buffers - cache ) is correct 
then the memory use drops to ~100 MB.

I guess what's confusing is that total memory usuage is including 
buffers and cache.  If that memory is available to applications, 
shouldn't it be removed from the "total used" figure?

--Kervin


-- 
http://linuxquestions.org/ - Ask linux questions, give linux help.
http://splint.org/ - Write safe C code. splint source-code analyzer.


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

* Re: Memory Leaking. Help!
  2002-04-15 15:59           ` Kervin Pierre
@ 2002-04-16  0:36             ` David Schwartz
  0 siblings, 0 replies; 15+ messages in thread
From: David Schwartz @ 2002-04-16  0:36 UTC (permalink / raw)
  To: kpierre; +Cc: linux-kernel



On Mon, 15 Apr 2002 11:59:40 -0400, Kervin Pierre wrote:
>Eugenio Mastroviti wrote:
>>much data as it can in memory. The actual memory in use (check with
>>'free') is total-(buffers+cache)= 2.2-(0.37+1.51)GB=about 320 MB, which
>
>This is interesting.  What exactly is buffers and cache used for?

	It is used to keep information that the kernel might otherwise throw away in 
case it is needed later. It is also used to accumulate writes so that they 
can be made at a time where they can be done more efficiently.

>I had the same issue with the original poster with a new server.  A
>fresh install with nothing significant running ( no bind nor sendmail,
>etc. ) reported that over 450 out of 512 MB was used, but looking at the
>process usage on top I barely got 5% memory usage by process.  If the
>above calculation ( memory use = total - buffers - cache ) is correct
>then the memory use drops to ~100 MB.

	So you now have a ton of information. You have 512Mb of physical RAM, 450 of 
that is being used. 100Mb of that is process memory, 350Mb of that is buffers 
and cache.

>I guess what's confusing is that total memory usuage is including
>buffers and cache.  If that memory is available to applications,
>shouldn't it be removed from the "total used" figure?

	Are you arguing that you shouldn't have all the information the kernel is 
providing you? That some of it should be hidden from you and memory should be 
said to be free when it really isn't?

	All of your physical memory, less what is used by the kernel itself, is 
always available to applications. That memory is being used. Really.

	If you don't want your memory to be used, take it out of your computer. You 
paid good money for it. The kernel is using it. You should be happy.

	DS



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

end of thread, other threads:[~2002-04-16  0:36 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-14 12:23 Memory Leaking. Help! ivan
2002-04-14 13:15 ` Itai Nahshon
2002-04-14 14:05 ` Alan Cox
2002-04-14 22:51   ` ivan
2002-04-15  0:10     ` Alan Cox
2002-04-15  0:28       ` ivan
2002-04-15  5:18         ` xystrus
2002-04-15  6:10           ` john slee
2002-04-15  9:09         ` Alan Cox
2002-04-15 10:00         ` David Schwartz
2002-04-15 12:25         ` Eugenio Mastroviti
2002-04-15 15:59           ` Kervin Pierre
2002-04-16  0:36             ` David Schwartz
2002-04-15 11:30     ` Roy Sigurd Karlsbakk
2002-04-15  0:03 ` Tomasz Rola

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).