Linux NILFS development
 help / color / mirror / Atom feed
From: Ryusuke Konishi <ryusuke-sG5X7nlA6pw@public.gmane.org>
To: users-JrjvKiOkagjYtjvyW6yDsg@public.gmane.org,
	reinoud-S783fYmB3Ccdnm+yROfE0A@public.gmane.org,
	Jiro SEKIBA <jir-hfpbi5WX9J54Eiagz67IpQ@public.gmane.org>
Subject: Re: How does NILFS2 handle directory management
Date: Sat, 26 Sep 2009 00:47:30 +0900 (JST)	[thread overview]
Message-ID: <20090926.004730.113223425.ryusuke@osrg.net> (raw)
In-Reply-To: <20090925122109.GD6624-5cYspOl2ggRz6xQTk39kMVfVdRo2wo/d@public.gmane.org>

Hi,
On Fri, 25 Sep 2009 14:21:09 +0200, Reinoud Zandijk wrote:
> Hi folks,
> 
> On Thu, Sep 24, 2009 at 05:49:09PM +0900, Jiro SEKIBA wrote:
> > Reinoud Zandijk wrote:
> > > > I think it should be considered along with ext3 approach.
> > > 
> > > What is is the ext3 approach? What is different compared to ext2? And is it
> > > really such a big improvement? Will it complicate directory reading/writing
> > > more?
> > 
> > ext3 approach is a hashed index for file names, stored on disk.
> > So it always costs constant time to lookup the block filename stored.
>
> So its basicly the same aproach as mine only with the disadvantage
> that the hash is stored on-disc and hacked into the directory
> entries.  That explains the deletion penelty to be paid since the
> has to be updated. One could cheat by not updating the hash on disc
> on deletion since its result will backfire on lookup but thats
> silly.

You have a point.  Ext3 inserts intermediate structures on directory
files in somewhat tricky way.  So, it would suffer penalty for
deletion.  It's actually one of my concern for this approach.

Sekiba-san, thank you for gathering useful links.  As shown in the
figure you pointed to, I recognize improving the directory
implemenetation is one of priorities especially for file creation.

> Hmm...  with these things in mind, i'd still opt for the application of my
> hash scheme in NiLFS2. It does have the penalty that the directory has to be
> sequentially read once but no further penalties and no disc layout change.
> Note that it *only* needs the directory contents to be read, the inodes don't
> have to be visited/created and is thus a cheap alternative.

Well, I think your on-memory hash scheme is a hopeful candidate.
What kind of on-memory structures are used in your implementation?

I'd like to know how to rebuild your approach on Linux basis.  If
possible, I'd like to compare patches including the ext3 approach with
benchmarks.

> The only time it will be slower than ext3 is when you randomly delete files
> from large directories visiting each directory once... an event thats not
> remotely realistic.
>
> Looking into the papers you sent me, they refer to my scheme as a `cached
> index' if i read it correctly. The disadvantages they bring forward are not
> that realistic in common use. Especially not if you keep the cache entries
> small like the 24/28 bytes it takes for mine and if it also keeps track of the
> free entries.
> 
> Thoughts?

So, it uses 24/28 bytes on-memory entry per valid on-disk dirent.  How
about lifetime of the cache entries?  Are the entries designed to be
left on memory until they get shrunk by memory pressure?
Or flushed out in LRU ?

With regards,
Ryusuke Konishi

  parent reply	other threads:[~2009-09-25 15:47 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-10 19:16 How does NILFS2 handle directory management Prasenjit Giri
     [not found] ` <2324ff2b0909101216q31dad1a8y43ea0f229923a0c3-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-09-10 19:26   ` Reinoud Zandijk
     [not found]     ` <20090910192619.GA1263-bVHBekiX4bNgoMqBc1r0ESegHCQxtGRMHZ5vskTnxNA@public.gmane.org>
2009-09-11  1:21       ` Ryusuke Konishi
     [not found]         ` <20090911.102118.69189169.ryusuke-sG5X7nlA6pw@public.gmane.org>
2009-09-11  3:48           ` Jiro SEKIBA
     [not found]             ` <873a6u16qy.wl%jir-27yqGEOhnJbQT0dZR+AlfA@public.gmane.org>
2009-09-11  4:13               ` Ryusuke Konishi
2009-09-11  3:58           ` Prasenjit Giri
     [not found]             ` <2324ff2b0909102058g1ee407fco3f2482b4732dacca-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-09-11  6:23               ` Ryusuke Konishi
2009-09-11  5:22           ` Reinoud Zandijk
     [not found]             ` <20090911052213.GA24899-5cYspOl2ggRz6xQTk39kMVfVdRo2wo/d@public.gmane.org>
2009-09-11  6:44               ` Ryusuke Konishi
     [not found]                 ` <20090911.154452.43227079.ryusuke-sG5X7nlA6pw@public.gmane.org>
2009-09-14 10:27                   ` Reinoud Zandijk
     [not found]                     ` <20090914102731.GA154-5cYspOl2ggRz6xQTk39kMVfVdRo2wo/d@public.gmane.org>
2009-09-24  8:49                       ` Jiro SEKIBA
     [not found]                         ` <87hbusbud6.wl%jir-27yqGEOhnJbQT0dZR+AlfA@public.gmane.org>
2009-09-25 12:21                           ` Reinoud Zandijk
     [not found]                             ` <20090925122109.GD6624-5cYspOl2ggRz6xQTk39kMVfVdRo2wo/d@public.gmane.org>
2009-09-25 15:47                               ` Ryusuke Konishi [this message]
     [not found]                                 ` <20090926.004730.113223425.ryusuke-sG5X7nlA6pw@public.gmane.org>
2009-09-25 16:23                                   ` Reinoud Zandijk
     [not found]                                     ` <20090925162334.GA14945-5cYspOl2ggRz6xQTk39kMVfVdRo2wo/d@public.gmane.org>
2009-09-26  1:16                                       ` Ryusuke Konishi
     [not found]                                         ` <20090926.101634.31873031.ryusuke-sG5X7nlA6pw@public.gmane.org>
2009-09-27 22:10                                           ` Reinoud Zandijk
     [not found]                                             ` <20090927221049.GA14618-5cYspOl2ggRz6xQTk39kMVfVdRo2wo/d@public.gmane.org>
2009-09-27 23:03                                               ` Jiro SEKIBA
2009-09-27 11:34                                       ` Jiro SEKIBA

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=20090926.004730.113223425.ryusuke@osrg.net \
    --to=ryusuke-sg5x7nla6pw@public.gmane.org \
    --cc=jir-hfpbi5WX9J54Eiagz67IpQ@public.gmane.org \
    --cc=reinoud-S783fYmB3Ccdnm+yROfE0A@public.gmane.org \
    --cc=users-JrjvKiOkagjYtjvyW6yDsg@public.gmane.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