[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: memory usage
From: |
Samuel Thibault |
Subject: |
Re: memory usage |
Date: |
Mon, 20 Aug 2007 02:09:00 +0200 |
User-agent: |
Mutt/1.5.12-2006-07-14 |
Samuel Thibault, le Mon 20 Aug 2007 02:06:18 +0200, a écrit :
> Hi,
>
> Samuel Thibault, le Mon 06 Aug 2007 21:10:02 +0200, a écrit :
> > Also, something odd: say I have a big file /tmp/foo
> >
> > $ cat /tmp/foo > /dev/null
> > ... "inactive" grows in vmstat, takes some time...
> > $ cat /tmp/foo > /dev/null
> > takes almost no time since it's all cached.
> > $ find /var -printf ""
> > ... "inactive" falls down to the original value
> > $ cat /tmp/foo > /dev/null
> > ... "inactive" grows in vmstat again, takes some time...
> >
> > It looks like resolving directories/files entries somehow flushes out
> > the page cache. There actually doesn't seem to be any caching for
> > directories/files: find /var/log always reads from the disk (the led
> > flashes).
>
> I've found the "problem": vm/vm_object.c:171:
> int vm_object_cached_max = 200; /* may be patched*/
>
> Only 200 objects at a time may be held in memory. By nowadays'
> standards, that seems quite low. In the case I've raised (find /var),
> it's just not enough (the result can't fit into 200 objects). We should
> probably raise it in debian at least.
Just as a clue: on my linux, lsof | wc -l returns 1000 without X
desktop, and 2000 with X desktop...
Samuel