All of lore.kernel.org
 help / color / mirror / Atom feed
From: Colin McCabe <cmccabe@alumni.cmu.edu>
To: Sylar Shen <kimulaaa@gmail.com>
Cc: Sage Weil <sage@newdream.net>, ceph-devel <ceph-devel@vger.kernel.org>
Subject: Re: The cache problem of re-export NFS test
Date: Thu, 14 Apr 2011 10:56:56 -0700	[thread overview]
Message-ID: <BANLkTin_PT2+X4iDQHpBW=6yYDbstYtn6Q@mail.gmail.com> (raw)
In-Reply-To: <BANLkTinV8T5Vq8P5grvLtuwxB2BO-T=vLg@mail.gmail.com>

On Thu, Apr 14, 2011 at 1:52 AM, Sylar Shen <kimulaaa@gmail.com> wrote:
> Hi Sage,
> Thanks for your reply. I really appreciated.
> I tried what you suggested to set the argument "sync" in /etc/exports.
> I also checked "man 5 exports" and it showed that sync means reply to
> requests only after the changes have been committed to stable storage.
> It didn't mention that the export server won't do the cache task.
> However, after I did the experiment, I found that the memory usage of
> Ceph-client still went up to maximum value while writing the data
> which means Ceph-client did the cache task.
> So...are there other possible ways to solve my problem?

I don't think the page cache is a "problem," really. It is there to
improve performance!

However, if you really want to remove pages from the page cache, there
is a little-known syscall called fadvise. fadvise(FADV_DONTNEED, ...)
will request that the kernel flush a region of the file out of the
page cache. I think someone wrote a patch for tar(1) that calls
fadvise(FADV_DONTNEED) the files after tar reads them, on the
assumption that they would probably not be read again in the near
future.

Also, there is this: http://code.google.com/p/pagecache-mangagement/

Of course, if you're trying to do performance measurement, I don't
think you want to tweak the page cache settings.

cheers,
Colin

      parent reply	other threads:[~2011-04-14 17:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-12 14:57 The cache problem of re-export NFS test Sylar Shen
2011-04-12 15:35 ` Sage Weil
2011-04-14  8:52   ` Sylar Shen
2011-04-14 12:30     ` Brian Chrisman
2011-04-14 12:49       ` Sylar Shen
2011-04-14 15:19         ` Henry Chang
2011-04-14 17:12     ` Sage Weil
2011-04-14 17:56     ` Colin McCabe [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='BANLkTin_PT2+X4iDQHpBW=6yYDbstYtn6Q@mail.gmail.com' \
    --to=cmccabe@alumni.cmu.edu \
    --cc=ceph-devel@vger.kernel.org \
    --cc=kimulaaa@gmail.com \
    --cc=sage@newdream.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.