Re: Cache memory never gets released

From: Marcelo Tosatti
Date: Fri Jun 25 2004 - 08:12:02 EST


On Thu, Jun 24, 2004 at 05:31:41PM -0700, David Ashley wrote:
> I tried upgrading to 2.4.26 and this has the CONFIG_OOM_KILLER which will
> probably improve the situation, but the kernel still has the cache problem.
>
> Is there some way I can get a report of all the cached memory, wether it
> is inodes or blocks or whatever? I can deal with modifying the kernel to
> put in printk's if needbe.
>
> The approach I'm thinking of is
> 1) Get report on all kernel cached memory
> 2) do what it takes to increase the cached memory so that it can't get reduced
> 3) Get another report, and see what's changed.
>
> Thanks for any suggestions.
>
> -Dave
> PS Basically what causes the problem the worst is repeatedly doing this:
> 1) Launch mozilla browser with latest flash plugin (x86)
> 2) Load a flash site that uses a large japanese unicode font
> 3) goto step 2 (that is, reload)
>
> Mozilla + flash have a memory leak so every time the japanese font is reloaded
> mozilla uses up 3 more megs of ram. A watchdog mechanism kills mozilla when
> it uses up too much memory. But after a while doing this, the cached memory
> as reported by "free" grows and can't be reduced.

Cached memory can be easily reclaimed, take a look at /proc/meminfo "Inactive" list.

> So finally rather than the
> watchdog killing mozilla and all being ok, the linux kernel kills the XFree86
> server in order to free up memory and the system is dead.

Add more swap.

> This last is the
> original reason for us tracking down the problem, however the kernel killing
> processes is not required for the cache problem to occur.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/