public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcin Kowalski <kowalski@datrix.co.za>
To: hahn@coffee.psychology.mcmaster.ca, tomlins@cam.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: memory usage - continued - iCache/Dentry cacheing bug???
Date: Wed, 11 Apr 2001 16:23:06 +0200	[thread overview]
Message-ID: <0104111623060I.25951@webman> (raw)
In-Reply-To: <Pine.LNX.4.10.10104110917410.28937-100000@coffee.psychology.mc>
In-Reply-To: <Pine.LNX.4.10.10104110917410.28937-100000@coffee.psychology.mc>

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***
-----------------------------

       reply	other threads:[~2001-04-11 14:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.LNX.4.10.10104110917410.28937-100000@coffee.psychology.mc>
2001-04-11 14:23 ` Marcin Kowalski [this message]
2001-04-11 14:31   ` memory usage - continued - iCache/Dentry cacheing bug??? John Jasen
     [not found] <Pine.SGI.4.31L.02.0104111030180.3516411-100000@irix2.gl.umbc.e>
2001-04-11 14:50 ` Marcin Kowalski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0104111623060I.25951@webman \
    --to=kowalski@datrix.co.za \
    --cc=hahn@coffee.psychology.mcmaster.ca \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tomlins@cam.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox