[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Strange memory consumption



On Sun, 22 Feb 1998, tuvia beker wrote:

> Hi,
> 
> I'm experiencing a very strange phenomenon on a RH4.1 system.
> No heavy processes are running, yet memory consumption is soaring, and the
> load is above 6. 
> In the process table, there's no process consuming a lot of memory, and
> the sum of memory chunks used by processes is tiny compared to the total
> memory use reported. Here's what 'top' output looks like (sorted by mem
> usage):
> 
> ------------------------------------------------------------------------
>  11:54am up 4 days, 15:32, 6 users, load average: 8.19, 7.76, 6.88 
> 62 processes: 58 sleeping, 1 running, 0 zombie, 3 stopped 
> CPU states: 1.1% user, 1.1% system, 2.1% nice, 97.9% idle 
> Mem:  257160K av, 213624K used, 43536K free, 41032K shrd, 76224K buff
> Swap: 782224K av, 0K used, 782224K free 98096K cached
> 
>   PID USER PRI NI SIZE  RSS SHARE STAT LIB %CPU  %MEM TIME COMMAND 
> 26992 ranit  0 0 10084 9.8M 4168  S 	0   0.0   3.9 0:45 matlab 
> 27567 ranit 10 0  6644 6644 3132  S 	0   0.7   2.5 0:18 xemacs
>  3529 root   0 0  2124 2124 1336  S 	0   0.0   0.8 0:14 xterm 
> 26938 ranit  0 0  1940 1940  828  S 	0   0.0   0.7 0:03 rxvt 
> 26905 root   0 0  1788 1788 1444  S 	0   0.0   0.6 0:00 xdm 
> 27107 ranit  0 0  1700 1700  828  S 	0   0.0   0.6 0:09 rxvt 
> 27923 ranit  0 0  1700 1700  828  S 	0   0.0   0.6 0:00 rxvt 
> 26922 ranit  0 0  1644 1644 1312  S 	0   0.0   0.6 0:00 xmailbox 
> 26919 ranit  6 6  1584 1584 1252  S N   0   0.0   0.6 0:00 xload 
> 26921 ranit  0 0  1568 1568 1256  S 	0   0.0   0.6 0:00 xclock 
> 26908 ranit  0 0  1308 1308  956  S 	0   0.0   0.5 0:03 fvwm95-2
>   327 root   0 0  1164 1164 1028  S 	0   0.0   0.4 0:00 xdm
>  3538 oran   0 0  1064 1064  624  S 	0   0.0   0.4 0:01 tcsh 
> 27108 ranit  0 0  1044 1044  628  S 	0   0.0   0.4 0:00 tcsh 
> 26914 ranit  0 0  1000 1000  800  S 	0   0.0   0.3 0:00 FvwmTaskBar 
> 26913 ranit  0 0   992  992  816  S 	0   0.0   0.3 0:00 FvwmButtons
> 27924 ranit  1 0   972  972  628  S 	0   0.0   0.3 0:00 tcsh
> 
> ----------------------------------------------------------------------
> 
> Any idea regarding what's going on here will be appreciated.
> 
> 
> Thanks,
> Tuvik
> 

Just a wild guess: You are running an 'all-X' system. There was a bug
somewhere in init that made it go berserk if there was nothing open on a
console once upon a time. The bug caused very high load w/o reason, but no
memory leaks. The remedy was, to leave a login (getty whatever) in
inittab on the X-only runlevel. It's also possible that there is a problem
with the chipset and/or caching with that much ram. Dejanews ?

Re: Memory: If I remember well from my kernel hacking sessions, then the
malloced memory is not reclaimed as soon as freed by the app, instead it
is freed when the list of free blocks gets too short (which is good for
GC). If one of your sessions would grab pieces of memory for buffers and
release them often, such as for example to serve Xsession requests, then
it would look like that in 'free'. This one is just a wild guess, but I
know that it takes up to 5 seconds for freed memory to show in a mem/free
listing under load.

hope this helps,
	Peter