public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: "Josef 'Jeff' Sipek" <jeffpc@josefsipek.net>
To: Michael Monnerie <michael.monnerie@is.it-management.at>
Cc: xfs@oss.sgi.com
Subject: Re: Slab memory usage
Date: Mon, 27 Apr 2009 04:40:35 -0400	[thread overview]
Message-ID: <20090427084035.GO3709@josefsipek.net> (raw)
In-Reply-To: <200904262351.22970@zmi.at>

On Sun, Apr 26, 2009 at 11:51:22PM +0200, Michael Monnerie wrote:
> On Samstag 25 April 2009 Eric Sandeen wrote:
> > *from Documentation/sysctl/vm.txt:
> >
> > vfs_cache_pressure
> > ------------------
> >
> > Controls the tendency of the kernel to reclaim the memory which is
> > used for caching of directory and inode objects.
> >
> > At the default value of vfs_cache_pressure=100 the kernel will
> > attempt to reclaim dentries and inodes at a "fair" rate with respect
> > to pagecache and swapcache reclaim.  Decreasing vfs_cache_pressure
> > causes the kernel to prefer to retain dentry and inode caches.
> >  Increasing vfs_cache_pressure beyond 100 causes the kernel to prefer
> > to reclaim dentries and inodes.
> 
> So if I decrease it, lets say to 60, Linux prefers to remember 
> files/dirs over their content. An increase to 150 would mean Linux 
> prefers to keep file contents over dirs/files?

Yep, that's right.

> If so, I think for a fileserver for many users accessing many 
> dirs/files, I'd prefer a lower value, in order to prevent searching. 
> Disk contents can be read fast, with all the read-ahead caching of 
> disks/controllers and Linux itself, but the scattered dirs take loooong 
> to scan sometimes. (Example: a foto collection with 50.000 files in many 
> dirs). Am I right?

Approximate answer is: it depends on the frequency of meta-data reads vs.
data reads. Your reasoning is fine if whoever access the photo collection
does not frequently read the photos themselves.

Best answer is: benchmark it with the exact workload you have to deal with

Josef 'Jeff' Sipek.

-- 
Intellectuals solve problems; geniuses prevent them
		- Albert Einstein

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

      reply	other threads:[~2009-04-27  8:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-24 23:01 Slab memory usage Poul Petersen
2009-04-25  1:01 ` Eric Sandeen
2009-04-26 21:51   ` Michael Monnerie
2009-04-27  8:40     ` Josef 'Jeff' Sipek [this message]

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=20090427084035.GO3709@josefsipek.net \
    --to=jeffpc@josefsipek.net \
    --cc=michael.monnerie@is.it-management.at \
    --cc=xfs@oss.sgi.com \
    /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