Re: memory usage - continued - iCache/Dentry cacheing bug???

From: Marcin Kowalski (kowalski@datrix.co.za)
Date: Wed Apr 11 2001 - 09:23:06 EST


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*** ----------------------------- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Apr 15 2001 - 21:00:15 EST