linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: memory usage - continued - iCache/Dentry cacheing bug???
       [not found] <Pine.LNX.4.10.10104110917410.28937-100000@coffee.psychology.mc>
@ 2001-04-11 14:23 ` Marcin Kowalski
  2001-04-11 14:31   ` John Jasen
  0 siblings, 1 reply; 3+ messages in thread
From: Marcin Kowalski @ 2001-04-11 14:23 UTC (permalink / raw)
  To: hahn, tomlins; +Cc: linux-kernel

Hi
Here is my saga continued. I had as mentioned in the preceding post 500mb of 
Inode cache entries and about 80mb of dentry_cache entries, accounting for +- 
600mb if "missing" memory.

These should be dynamically de-allocatable, so if a program needs the ram it 
will be freed as necessary. So I ran a little memory hog perl script :
---
#!/usr/bin/perl
$fred=1;
@bob=('Test');
while ($fred==1)
{
	push (@bob,@bob);
}
------
This naturally started eating memory, unexpectedly the kernel started paging 
hectically to swap using 250mb in no time, (ie filling the 1.2gigs of ram). 
How can this be??? Shouldn't the cache tables simply be purged in the event 
of memory need....
Anyway I then kill the job, suddenly  most of my physical ram is freed (250mb 
used).
I then do a swapoff /dev/sda3 (250mb used), this completely locks the machine 
for 50 seconds and pushes the load to 31 when I can log back in. Then 
micraculously I am using only 170mb of physical ram. I turn swap back on and 
all is well.... 
Can anyone please explain this odd behaviour.. ???
Below is a free after this whole debacle..:::

------

             total       used       free     shared    buffers     cached
Mem:       1157444     126364    1031080          0      10924      60080
-/+ buffers/cache:      55360    1102084
Swap:       641016          0     641016
------

> > Regarding this issue, I have a similar problem if I do a free on my
> > system I get :
> > ---   total       used       free     shared    buffers     cached
> > Mem:       1157444    1148120       9324          0      22080     459504
> > -/+ buffers/cache:     666536     490908
> > Swap:       641016      19072     621944
>
> perfect, no problem there.
>
> > Now what I do a ps there seems no way to accound for the 500mb + of
> > memory used. No single or group of processes uses that amount of memory.
> > THis is
>
> of course: the kernel tries hard to keep nearly all memory in use,
> since otherwise it's wasted.
>
> > very disconcerting, coupled with extremely high loads when cache is
> > dumped to disk locking up the machine makes me want to move back to
> > 2.2.19 from 2.4.3.
>
> swapping does not cause high load unless your disk is misconfigured (PIO)

Netraid 4m  (AACRAID) card with 80mb of Cache and 6x 10000rpm SCSII III HDD, 
I can only hope that the driver is running in DMA.... :-|

> > I would also be curious to see how the kernel is using memory...
>
> caching files.

-- 
-----------------------------
     Marcin Kowalski
     Linux/Perl Developer
     Datrix Solutions
     Cel. 082-400-7603
      ***Open Source Kicks Ass***
-----------------------------

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

* Re: memory usage - continued - iCache/Dentry cacheing bug???
  2001-04-11 14:23 ` memory usage - continued - iCache/Dentry cacheing bug??? Marcin Kowalski
@ 2001-04-11 14:31   ` John Jasen
  0 siblings, 0 replies; 3+ messages in thread
From: John Jasen @ 2001-04-11 14:31 UTC (permalink / raw)
  To: Marcin Kowalski; +Cc: hahn, tomlins, linux-kernel

On Wed, 11 Apr 2001, Marcin Kowalski wrote:

> I then do a swapoff /dev/sda3 (250mb used), this completely locks the machine
> for 50 seconds and pushes the load to 31 when I can log back in. Then
> micraculously I am using only 170mb of physical ram. I turn swap back on and
> all is well....
> Can anyone please explain this odd behaviour.. ???
> Below is a free after this whole debacle..:::

another cute way of clearing memory is to do a:

dd if=/dev/hda of=/dev/null bs=<total memory> count=1


this will push some stuff into swap; but ...



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

* Re: memory usage - continued - iCache/Dentry cacheing bug???
       [not found] <Pine.SGI.4.31L.02.0104111030180.3516411-100000@irix2.gl.umbc.e>
@ 2001-04-11 14:50 ` Marcin Kowalski
  0 siblings, 0 replies; 3+ messages in thread
From: Marcin Kowalski @ 2001-04-11 14:50 UTC (permalink / raw)
  To: jjasen1; +Cc: hahn, tomlins, linux-kernel

Further fun...

Now after bouncing the swap and clearing out memory I decided to run the 
test.pl script again to suck up some more memory...
Box dies, pretty much for 15 seconds, when it comes back load is at 8.0
kernel syslog messages..::
----
Apr 11 16:37:13 mkdexii kernel: sym53c896-1-<3,0>: ordered tag forced.
Apr 11 16:37:43 mkdexii last message repeated 2 times
-----
with 181M of Swap in use and 252 mb of Physical RAM.... this is getting 
really tricky...

Now to bounce the swap again.... well well IO lock up again, hmmm. sym53c896 
driver---  load went up to 12 and now I'm left with 135mb of used physical 
ram...

What can I draw from this?? Well memory that is being swapped shouldn't be, 
once it is swapped out it doesn't seem to be reaped(my understanding is 
lacking :-(( ). In my case 250mb of memory was swapped out during my memory 
eater test. The process then died and 750mb of physical ram got freed up but 
still 250mb of swap was in use, I then switched off swap and turned it back 
on and it was gone. WHy was it there in the first place as I had 750mb of 
free physical memory.

Secondly is there a problem with the Sym53c896 driver settings, I upped the 
default queu length to 8 and the Synch Freq to 40mhz????, WHy is the machine 
locking so badly under high IO... ??? 

TIA MARCin


-- 
-----------------------------
     Marcin Kowalski
     Linux/Perl Developer
     Datrix Solutions
     Cel. 082-400-7603
      ***Open Source Kicks Ass***
-----------------------------

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

end of thread, other threads:[~2001-04-11 14:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <Pine.LNX.4.10.10104110917410.28937-100000@coffee.psychology.mc>
2001-04-11 14:23 ` memory usage - continued - iCache/Dentry cacheing bug??? Marcin Kowalski
2001-04-11 14:31   ` John Jasen
     [not found] <Pine.SGI.4.31L.02.0104111030180.3516411-100000@irix2.gl.umbc.e>
2001-04-11 14:50 ` Marcin Kowalski

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