linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Avishay Traeger <atraeger@cs.sunysb.edu>
To: addy soft <addysoft@gmail.com>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: using pgmeter for benchmarking
Date: Thu, 01 Nov 2007 10:06:37 -0400	[thread overview]
Message-ID: <1193925997.4008.3.camel@localhost> (raw)
In-Reply-To: <b6623f930711010345y640214c8ta929061cca69fb93@mail.gmail.com>

On Thu, 2007-11-01 at 16:15 +0530, addy soft wrote:
> hello all,
> 
> I am a newbie in filesystem field and wanted to benchmark filesystem
> using pgmeter.
> 
> But the source that i have downloaded from
> http://pgmeter.sourceforge.net/  CVS seems to be too old and have a
> kernel patch with it which is for kernel 2.2.6.
> 
> There is a syscall implemented with that version of pgmeter which is
> used to flush the page cache for a particular file.

Since 2.6.16 there has been a drop_caches proc file.  Instead of porting
this system call, I think you could modify pgmeter to use this.  Here
are some details:

===============================================
Writing to this will cause the kernel to drop clean caches, dentries and
inodes from memory, causing that memory to become free.
To free pagecache:
      * echo 1 > /proc/sys/vm/drop_caches
To free dentries and inodes:
      * echo 2 > /proc/sys/vm/drop_caches
To free pagecache, dentries and inodes:
      * echo 3 > /proc/sys/vm/drop_caches
As this is a non-destructive operation and dirty objects are not
freeable, the user should run "sync" first!
===============================================

So instead of calling the system call, you should be able to call sync()
and then write either 1 or 3 to the proc file.

Hope that helps!
Avishay


      reply	other threads:[~2007-11-01 14:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-01 10:45 using pgmeter for benchmarking addy soft
2007-11-01 14:06 ` Avishay Traeger [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=1193925997.4008.3.camel@localhost \
    --to=atraeger@cs.sunysb.edu \
    --cc=addysoft@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).