LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 04-17-2011, 03:03 PM   #1
odyrsohn
LQ Newbie
 
Registered: Apr 2011
Posts: 1

Rep: Reputation: 0
New filesystem ramFS with persistency on disk! Is that good or bad?


This is a proposal of a new filesystem based on ramFS but with persistency.

I want to know if would be good to have a filesystem that keeps two devices synchronized (RAM and HDD). They could be separated on layers like CPU multi-level caching system. The goal is that it would be possible to have a ramfs with persistency.
With this system we can have better control in what could be cached directly on RAM. Maybe it could be just a application, but the good thing about it being a FS is that it could be mounted and be as friendly as possible to the user. I dont know but it seems to me to be a good thing to have on a server running both static and dynamic data for performance and realibly reasons.
There are several ways using this kind of system today, some with ramfs mounted and rsync running on a cronjob at 5s intervals copying files to another mounted FS, and some other ways that I rather not mention here (hehe).

Implementation methods for this proposal:
- 1st. method:
It would be something like... on the first time read_data occurs from this FS it will get the data to the layer 0 (RAM) and as it occurs the data is send to application too, after that, if there was no write_data to this virutal blocks already on RAM, in the second time read_data occurs it will be read right at RAM, with all the good things about it.

If write_data occurs, then we have to write directly to layer 1 (HDD) in order to improve reliability, for example in case of power failure the data would be already writed like on a normal filesystem.

- 2nd. method:
Or we can create the RAM FS as a mirror to the mounted FS and all read_data calls read data from RAM and all write calls goes directly to HDD. Then when HDD block are write a dirty flag event occurs and those blocks goes to RAM to replace the older ones. Or something like that.


Kernel Buffer:
I know that Linux Kernel already have the 'buffer system' that caches disk blocks from frequently read blocks. The bad thing about it is that you have no control on data that you want in RAM for fast read.


So I would like to know from you, kernel experts out there, it this a good idea? Why? (And why it isn't?)

If it is a good idea, I would start to design ways to accomplish that task.

Thanks,
Odyr

Last edited by odyrsohn; 04-17-2011 at 03:05 PM.
 
Old 04-17-2011, 03:34 PM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
You may be reinventing the wheel. Sounds a lot like unionfs. I think that the eePC uses this to reduce the number of writes to the SDD. The top layer is ramfs, the bottom layer is the SSD partition. The difference is that writes are cached for a time. The purpose is to increase extend the life of the SSD.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Disk trouble -- bad disk or bad controller? r.stiltskin Linux - Hardware 4 02-26-2010 10:09 AM
Bad disk, bad disk controller, or bad memory? NULL Pointer Linux - General 2 03-01-2009 05:21 PM
make bootable CD from hard disk image and mount root file system as ramfs Mr.J Linux - Embedded & Single-board computer 1 08-19-2008 07:29 AM
RAID1 array down to one disk with bad blocks, clone to good disk with dd noerror? ewolf Linux - Server 2 05-10-2008 12:40 AM
IDE Disk has no more spare sectors -- still good for which filesystem? M_F_H Linux - Hardware 1 08-12-2006 01:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 11:07 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration