[Top] [All Lists]

Re: Inode cache uses a lot of memory

To: Sebastian Kun <seb@xxxxxxxxxxxxx>
Subject: Re: Inode cache uses a lot of memory
From: Steve Lord <lord@xxxxxxx>
Date: 25 Feb 2002 14:42:53 -0600
Cc: linux-xfs@xxxxxxxxxxx
In-reply-to: <012601c1be25$cc6b8370$4902a8c0@consensys.com>
References: <012601c1be25$cc6b8370$4902a8c0@consensys.com>
Sender: owner-linux-xfs@xxxxxxxxxxx
On Mon, 2002-02-25 at 11:56, Sebastian Kun wrote:
> Hi,
> I've been doing some SPEC SFS97 (http://www.spec.org/osg/sfs97r1/) testing
> for my company.  SFS is a benchmark
> for evaluating NFS performance, measuring both throughput (NFS ops/sec), and
> latency (ORT, overall response time).  In our case, the benchmark created a
> 50GB fileset, consisting of 2 million files and 65000 directories.  During
> the test, approximately 10% of the fileset was accessed (read, write,
> getattr, lookup, etc.).
> I have some questions about some unusual behaviour I've noticed under XFS.
> There seems to be a problem with freeing up memory used for the inode cache.
> During the test run, I periodically checked the amount of free memory using
> the top command:
> Mem:    2063220K av, 2050000K used, 13220K free, 0K shrd, 640K buff 138420K
> cached
> There's a lot of memory unaccounted for (even taking into account userspace
> apps).  I ran 'cat /proc/slabinfo' which came up with the following entries
> of interest:
> xfs_ili           505795 505848    136 18066 18066
> xfs_inode         1433589 1501336    468 187667 187667
> inode_cache       1188597 1279404    512 182772 182772
> (The format of these entries is [name] [active_obj] [total_obj] [obj_size]
> [active_pages] [total_pages])
> As you can see, the xfs_inode cache takes up over 180,000 pages, or around
> 750MB of memory.  The inode_cache takes up another 700MB.  Even after doing
> several gigabytes of I/O to another filesystem (reiserfs), the memory used
> by the inode caches was still around 1GB.  This memory is only freed when
> the filesystem is unmounted.
> Question 1: Is this behaviour normal for XFS?
> Question 2: Is there any way to limit the amount of memory used by the inode
> cache?

Well, the xfs inode cache is pretty much controlled via the inode cache,
which is only shrunk if you get into the cache pruning code if you run
short of memory.

I can easily prune out my inode cache without doing unmounts, but my 
memory size is a lot smaller than yours.

I presume you do not see this issue with other filesystems?



Steve Lord                                      voice: +1-651-683-3511
Principal Engineer, Filesystem Software         email: lord@xxxxxxx

<Prev in Thread] Current Thread [Next in Thread>