linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Question regarding to store file system metadata in database
@ 2006-03-19  4:48 Xin Zhao
  2006-03-19  5:07 ` Mikado
  2006-03-19 23:06 ` Alan Cox
  0 siblings, 2 replies; 25+ messages in thread
From: Xin Zhao @ 2006-03-19  4:48 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-fsdevel

I was wondering why only few file system uses database to store file
system metadata. Here, metadata primarily refers to directory entries.
For example, one can setup a database to store file pathname, its
inode number, and some extended attribution. File pathname can be used
as primary key. As such, we can achieve pathname to inode mapping as
well as many other features such as fast search and extended file
attribute management. In contrast, storing file system entries in
directory files may result in slow dentry search. I guess that's why
ReiserFS and some other file systems proposed to use B+ tree like
strucutre to manage file entries. But why not simple use database to
provide the same feature? DB has been heavily optimized to provide
fast search and should be good at managing metadata.

 I guess one concern about this idea is  performance impact caused by
database system. I ran a test on a mysql database: I inserted about
1.2 million such kind of records into an initially empty mysql
database. Average insertion rate is about 300 entries per second,
which is fast enough to handle normal file system burden, I think.  I
haven't try the query speed, but I believe it should be fast enough
too (maybe I am wrong, if so, please point that out.).

Then I am a little curious why only few people use database to store
file system metadata, although I know WinFS plans to use database to
manage metadata. I guess one reason is that it is difficult for kernel
based file system driver to access database. But this could be
addressed by using efficient kernel/user communication mechanism.
Another reason could be the worry about database system. If database
system crashes, file system will stop functioning too. However, the
feature needed by file system is really a small part of database
system, A reduced database system should be sufficient to provide this
feature and be stable enough to support a file system.

Can someone point out more issues that could become obstables to using
database to manage metadata for a file system?

Many thanks!
Xin

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2006-03-22 15:21 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-19  4:48 Question regarding to store file system metadata in database Xin Zhao
2006-03-19  5:07 ` Mikado
2006-03-19 17:48   ` Xin Zhao
2006-03-19 17:58     ` Ming Zhang
2006-03-19 18:11       ` Xin Zhao
2006-03-19 18:26         ` Ming Zhang
2006-03-19 18:50           ` Xin Zhao
2006-03-19 19:47             ` Al Viro
     [not found]               ` <441DC2D6.4060001@societasilluminati.org>
2006-03-19 21:24                 ` Ming Zhang
2006-03-20 13:09               ` Theodore Ts'o
2006-03-20 15:13                 ` Xin Zhao
2006-03-20 19:36                   ` Xin Zhao
2006-03-20 19:58                     ` Al Viro
2006-03-20 22:53                       ` Xin Zhao
2006-03-20 23:32                         ` Al Viro
2006-03-20 21:08                     ` Matti Aarnio
2006-03-20 22:28                     ` Erez Zadok
2006-03-20 22:19                   ` Theodore Ts'o
2006-03-21  6:51                     ` Miklos Szeredi
2006-03-21 20:05                   ` Pavel Machek
2006-03-22 15:21                     ` Xin Zhao
2006-03-19 21:34             ` Ming Zhang
2006-03-20  8:30         ` Matti Aarnio
2006-03-19 23:06 ` Alan Cox
2006-03-19 23:44   ` Matthew Wilcox

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).