public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sash <Sash_lkl@linuxhowtos.org>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Idea about a disc backed ram filesystem
Date: Thu, 8 Jun 2006 23:12:02 +0200	[thread overview]
Message-ID: <200606082312.02494.Sash_lkl@linuxhowtos.org> (raw)
In-Reply-To: <20060608204306.GA560@csclub.uwaterloo.ca>

Am Thursday, 8. June 2006 22:43 schrieben Sie:
> On Thu, Jun 08, 2006 at 10:33:13PM +0200, Sascha Nitsch wrote:
> > ....
> > ....
> 
> I am a bit puzzled.  How is your idea different in use than the current
> caching system that the kernel already applies to reads of all block
> devices, other than essentially locking the cached data into ram, rather
> than letting it get kicked out if it isn't used.  Writing is similarly
> cached unless the application asks for it to not be cached.  It is
> flushed out within a certain amount of time, or when there is an idle
> period.  I fail to see where having to explicitly specify something as
> having to be cached in ram and locked in is an improvement over simply
> caching anything that is used a lot from any disk.  Your idea also
> appears to break any application that asks for sync since you take over
> control of when things are flushed to disk. 
> 
> I just don't get it. :)
> 
> Len Sorensen
> 

True, my idea is indeed similar to the existing cache, thats why I had one of the
ideas for the implementation.
If you ever had the possibility to run a database application on a tmpfs you got
to "experience" the difference :)

The idea was simply born to have a fast tmpfs but with the safety of permanent
data storage in case of reboots/crashes without user level app modification.

The problem with the current cache implementation is that I have not much
control about what keeps cached and what not. (which is fine for normal usage).

On a normal server with mixed load my database caches are flushed and
used for other stuff (like mail or webserver cache). If I access the database
files again, they have to be reloaded from disc which slows it down.
Same applies to other applications as well, this is just an example from my
daily work. (~1GB database on a 2GB ram box) and a lot of disc io because
of cache misses with a read/write ratio of ~20:1). Putting that DB into RAM is
dangerous because of the data loss risk.

The idea enables me to have a defined set of files/dirs permanently cached,
and take the choice away from the kernel (for a fixed amount of memory and files).

You are right, the idea in the current form may break application that ask for
sync. Maybe this can be honored by the implementation to access that files
directly.

If someone has a better idea to get the desired effect, feel free to post
them here.

One of the reasons I posted the idea here is to have some useful comments
from people with far more kernel/fs knowledge than I have.

I hope I could clear the clouds a bit.

Sascha Nitsch

  reply	other threads:[~2006-06-08 21:12 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Sash_lkl@linuxhowtos.org>
2006-06-08 20:33 ` Idea about a disc backed ram filesystem Sascha Nitsch
2006-06-08 20:43   ` Lennart Sorensen
2006-06-08 21:12     ` Sash [this message]
2006-06-09 10:45       ` Jan Engelhardt
2006-06-08 21:51   ` Horst von Brand
2006-06-08 22:39     ` Joshua Hudson
2006-06-08 22:48   ` Matheus Izvekov
2006-06-08 23:40     ` Måns Rullgård
2006-06-09  1:01       ` Matheus Izvekov
2006-06-09  8:52         ` Måns Rullgård
2006-06-09  2:17     ` Horst von Brand
2006-06-09  4:59       ` Matheus Izvekov
2006-06-09 13:43         ` Horst von Brand
2006-06-09 15:07           ` Matheus Izvekov
2006-06-09 18:43             ` Lee Revell
2006-06-09 19:27               ` Matheus Izvekov
2006-06-09 19:31                 ` Lee Revell
2006-06-09 19:43                   ` Matheus Izvekov
2006-06-09 20:03                     ` Lee Revell
2006-06-09 21:23                       ` Matheus Izvekov
2006-06-09 23:37             ` Horst von Brand
2006-06-09  6:33   ` Andi Kleen

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=200606082312.02494.Sash_lkl@linuxhowtos.org \
    --to=sash_lkl@linuxhowtos.org \
    --cc=linux-kernel@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