All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jaegeuk Kim <jaegeuk.kim@gmail.com>
To: Vyacheslav Dubeyko <slava@dubeyko.com>
Cc: Jaegeuk Kim <jaegeuk.kim@samsung.com>,
	"'Marco Stornelli'" <marco.stornelli@gmail.com>,
	"'Al Viro'" <viro@zeniv.linux.org.uk>,
	tytso@mit.edu, gregkh@linuxfoundation.org,
	linux-kernel@vger.kernel.org, chur.lee@samsung.com,
	cm224.lee@samsung.com, jooyoung.hwang@samsung.com,
	linux-fsdevel@vger.kernel.org
Subject: RE: [PATCH 00/16] f2fs: introduce flash-friendly file system
Date: Fri, 12 Oct 2012 23:25:36 +0900	[thread overview]
Message-ID: <1350051936.2299.29.camel@kjgkr> (raw)
In-Reply-To: <1350045007.2026.97.camel@slavad-ubuntu>

2012-10-12 (금), 16:30 +0400, Vyacheslav Dubeyko:
> On Wed, 2012-10-10 at 18:43 +0900, Jaegeuk Kim wrote:
> > [snip]
> > > > How about the following scenario?
> > > > 1. data "a" is newly written.
> > > > 2. checkpoint "A" is done.
> > > > 3. data "a" is truncated.
> > > > 4. checkpoint "B" is done.
> > > >
> > > > If fs supports multiple snapshots like "A" and "B" to users, it cannot reuse the space allocated by
> > > > data "a" after checkpoint "B" even though data "a" is safely truncated by checkpoint "B".
> > > > This is because fs should keep data "a" to prepare a roll-back to "A".
> > > > So, even though user sees some free space, LFS may suffer from cleaning due to the exhausted free
> > > space.
> > > > If users want to avoid this, they have to remove snapshots by themselves. Or, maybe automatically?
> > > >
> > > 
> > > I feel that here it exists some misunderstanding in checkpoint/snapshot terminology (especially, for
> > > the NILFS2 case). It is possible that NILFS2 volume can contain only checkpoints (if user doesn't
> > > created any snapshot). You are right, snapshot cannot be deleted because, in other word, user marked
> > > this file system state as important point. But checkpoints can be reclaimed easily. I can't see any
> > > problem to reclaim free space from checkpoints in above-mentioned scenario in the case of NILFS2. But
> > 
> > I meant that snapshot does checkpoint.
> > And, the problem is related to real file system utilization managed by NILFS2.
> >                      [fs utilization to users]   [fs utilization managed by NILFS2]
> >                                 X - 1                       X - 1
> > 1. new data "a"            X                            X
> > 2. snapshot "A"            X                            X
> > 3. truncate "a"            X - 1                       X
> > 4. snapshot "B"            X - 1                       X
> > 
> > After this, user can see X-1, but the performance will be affected by X.
> > Until the snapshot "A" is removed, user will experience the performance determined by X.
> > Do I misunderstand?
> > 
> 
> Ok. Maybe I have some misunderstanding but checkpoint and snapshot are different things for me (especially, in the case of NILFS2). :-)
> 
> The most important is that f2fs has more efficient scheme of working with checkpoints, from your point of view. If you are right then it is very good. And I need to be more familiar with f2fs code.
> 

Ok, thanks.

> [snip]
> > > As I know, NILFS2 has Garbage Collector that removes checkpoints automatically in background. But it
> > > is possible also to force removing as checkpoints as snapshots by hands with special utility using. As
> > 
> > If users may not want to remove the snapshots automatically, should they configure not to do this too?
> > 
> 
> As I know, NILFS2 doesn't delete snapshots automatically but checkpoints - yes. Moreover, it exists nilfs_cleanerd.conf configuration file that makes possible to manage by NILFS cleanerd daemon's behavior (min/max number of clean segments, selection policy, check/clean intervals and so on).
> 

Ok.

> [snip]
> > > > IMHO, user does not need to know how many snapshots there exist and track the fs utilization all the
> > > time.
> > > > (off list: I don't know why cleaning process should be tuned by users.)
> > > >
> > > 
> > > What do you plan to do in the case of users' complains about issues with free space reclaiming? If
> > > user doesn't know about checkpoints and haven't any tools for accessing to checkpoints then how is it
> > > possible to investigate issues with free space reclaiming on an user side?
> > 
> > Could you explain why reclaiming free space is an issue?
> > IMHO, that issue is caused by adopting multiple snapshots.
> > 
> 
> I didn't mean that reclaiming free space is an issue. I hope that f2fs
> is stable but unfortunately it is not possible for any software to be
> completely without bugs. So, anyway, f2fs users can have some issues
> during using. One of the possible issue can be unexpected situation
> with not reclaiming of free space. So, my question was about
> possibility to investigate such bug on the user's side. From my point
> of view, NILFS2 has very good utilities for such investigation.

You mean fsck?
Of course, we've implemented fsck tool also.
But, why I didn't open it is that code is a mess.
Another reason is that current fsck tool only checks
the consistency of f2fs.
Now we're still working on it to open.

> 
> [snip]
> > > > In our experiments *also* on android phones, we've seen many random patterns with frequent fsync
> > > calls.
> > > > We found that the main problem is database, and I think f2fs is beneficial to this.
> > > 
> > > I think that database is not main use-case on Android phones. The dominating use-case can be operation
> > > by multimedia information and operations with small files, from my point of view.
> > > 
> > > So, it is possible to extract such key points from the shared paper: (1) file has complex structure;
> > > (2) sequential access is not sequential; (3) auxiliary files dominate; (4) multiple threads perform
> > > I/O.
> > > 
> > > I am afraid that random modification of different part of files and I/O operations from multiple
> > > threads can lead to significant fragmentation as file fragments as directory meta-information because
> > > of garbage collection.
> > 
> > Could you explain in more detail?
> > 
> 
> I mean that complex structure of modern files can lead to random modification of small file's parts.
> Moreover, such modifications can occur from multiple threads.
> So, it means for me that Copy-On-Write policy can lead to file's content fragmentation.
> Then GC can make additional fragmentation also.
> But maybe I have some misunderstanding of f2fs internal techniques.
> 

Right. Random modification may cause data fragmentation due to COW in LFS.
But, this is from the host side view only.
If we consider FTL with file system adopting the in-place-update scheme,
eventually FTL should handle the fragmentation issue instead of
file system.
So, I think fragmentation is not a particular issue in LFS only.

> With the best regards,
> Vyacheslav Dubeyko.
> 
> 

-- 
Jaegeuk Kim
Samsung


  reply	other threads:[~2012-10-12 14:25 UTC|newest]

Thread overview: 155+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <415E76CC-A53D-4643-88AB-3D7D7DC56F98@dubeyko.com>
2012-10-06 13:54 ` [PATCH 00/16] f2fs: introduce flash-friendly file system Vyacheslav Dubeyko
2012-10-06 20:06   ` Jaegeuk Kim
2012-10-07  7:09     ` Marco Stornelli
2012-10-07  9:31       ` Jaegeuk Kim
2012-10-07  9:31         ` Jaegeuk Kim
2012-10-07 12:08         ` Vyacheslav Dubeyko
2012-10-07 12:08           ` Vyacheslav Dubeyko
2012-10-08  8:25           ` Jaegeuk Kim
2012-10-08  8:25             ` Jaegeuk Kim
2012-10-08  9:59             ` Namjae Jeon
2012-10-08  9:59               ` Namjae Jeon
2012-10-08 10:52               ` Jaegeuk Kim
2012-10-08 11:21                 ` Namjae Jeon
2012-10-08 12:11                   ` Jaegeuk Kim
2012-10-09  3:52                     ` Namjae Jeon
2012-10-09  8:00                       ` Jaegeuk Kim
2012-10-09  8:31                 ` Lukáš Czerner
2012-10-09 10:45                   ` Jaegeuk Kim
2012-10-09 10:45                     ` Jaegeuk Kim
2012-10-09 11:01                     ` Lukáš Czerner
2012-10-09 12:01                       ` Jaegeuk Kim
2012-10-09 12:39                         ` Lukáš Czerner
2012-10-09 13:10                           ` Jaegeuk Kim
2012-10-09 21:20                         ` Dave Chinner
2012-10-09 21:20                           ` Dave Chinner
2012-10-10  2:32                           ` Jaegeuk Kim
2012-10-10  4:53                       ` Theodore Ts'o
2012-10-10  4:53                         ` Theodore Ts'o
2012-10-12 20:55                         ` Arnd Bergmann
2012-10-10 10:36                   ` David Woodhouse
2012-10-12 20:58                     ` Arnd Bergmann
2012-10-13  4:26                       ` Namjae Jeon
2012-10-13 12:37                         ` Jaegeuk Kim
2012-10-13 12:37                           ` Jaegeuk Kim
2012-10-17 11:12                           ` Namjae Jeon
     [not found]                             ` <000001cdacef$b2f6eaa0$18e4bfe0$%kim@samsung.com>
2012-10-18 13:39                               ` Vyacheslav Dubeyko
2012-10-18 22:14                                 ` Jaegeuk Kim
2012-10-19  9:20                                 ` NeilBrown
2012-10-08 19:22             ` Vyacheslav Dubeyko
2012-10-09  7:08               ` Jaegeuk Kim
2012-10-09  7:08                 ` Jaegeuk Kim
2012-10-09 19:53                 ` Jooyoung Hwang
2012-10-09 19:53                   ` Jooyoung Hwang
2012-10-10  8:05                   ` Vyacheslav Dubeyko
2012-10-10  9:02                   ` Theodore Ts'o
2012-10-10 11:52                     ` SQLite on flash (was: [PATCH 00/16] f2fs: introduce flash-friendly file system) Clemens Ladisch
     [not found]                       ` <50756199.1090103-P6GI/4k7KOmELgA04lAiVw@public.gmane.org>
2012-10-10 12:47                         ` Richard Hipp
2012-10-10 17:17                           ` light weight write barriers Andi Kleen
     [not found]                             ` <m2fw5mtffg.fsf_-_-Vw/NltI1exuRpAAqCnN02g@public.gmane.org>
2012-10-10 17:48                               ` Richard Hipp
2012-10-11 16:38                                 ` [sqlite] " Nico Williams
2012-10-11 16:38                                   ` Nico Williams
2012-10-11 16:48                                   ` [sqlite] " Nico Williams
2012-10-11 16:48                                     ` Nico Williams
2012-10-11 16:32                             ` [sqlite] " 杨苏立 Yang Su Li
2012-10-11 16:32                               ` 杨苏立 Yang Su Li
2012-10-11 17:41                               ` [sqlite] " Christoph Hellwig
2012-10-23 19:53                               ` Vladislav Bolkhovitin
2012-10-24 21:17                                 ` Nico Williams
2012-10-24 21:17                                   ` Nico Williams
2012-10-24 22:03                                   ` [sqlite] " david
2012-10-25  0:20                                     ` Nico Williams
2012-10-25  0:20                                       ` Nico Williams
2012-10-25  1:04                                       ` [sqlite] " david
2012-10-25  5:18                                         ` Nico Williams
2012-10-25  5:18                                           ` Nico Williams
2012-10-25  6:02                                           ` [sqlite] " Theodore Ts'o
2012-10-25  6:58                                             ` david
2012-10-25 14:03                                               ` Theodore Ts'o
2012-10-25 14:03                                                 ` Theodore Ts'o
2012-10-25 18:03                                                 ` [sqlite] " david
2012-10-25 18:03                                                   ` david-gFPdbfVZQbY
2012-10-25 18:29                                                   ` [sqlite] " Theodore Ts'o
2012-10-25 18:29                                                     ` Theodore Ts'o
2012-11-05 20:03                                                     ` [sqlite] " Pavel Machek
2012-11-05 20:03                                                       ` Pavel Machek
2012-11-05 22:04                                                       ` Theodore Ts'o
2012-11-05 22:04                                                         ` Theodore Ts'o
     [not found]                                                         ` <20121105220440.GB25378-AKGzg7BKzIDYtjvyW6yDsg@public.gmane.org>
2012-11-05 22:37                                                           ` Richard Hipp
2012-11-05 23:00                                                             ` [sqlite] " Theodore Ts'o
2012-11-05 23:00                                                               ` Theodore Ts'o
2012-10-30 23:49                                             ` [sqlite] " Nico Williams
2012-10-25  5:42                                     ` Theodore Ts'o
2012-10-25  7:11                                       ` david
2012-10-27  1:52                                   ` Vladislav Bolkhovitin
2012-10-25  5:14                                 ` Theodore Ts'o
2012-10-25 13:03                                   ` Alan Cox
2012-10-25 13:50                                     ` Theodore Ts'o
2012-10-25 13:50                                       ` Theodore Ts'o
2012-10-27  1:55                                       ` [sqlite] " Vladislav Bolkhovitin
2012-10-27  1:54                                   ` Vladislav Bolkhovitin
2012-10-27  4:44                                     ` Theodore Ts'o
2012-10-27  4:44                                       ` Theodore Ts'o
2012-10-30 22:22                                       ` [sqlite] " Vladislav Bolkhovitin
2012-10-31  9:54                                         ` Alan Cox
2012-10-31  9:54                                           ` Alan Cox
2012-11-01 20:18                                           ` [sqlite] " Vladislav Bolkhovitin
2012-11-01 21:24                                             ` Alan Cox
2012-11-01 21:24                                               ` Alan Cox
2012-11-02  0:15                                               ` [sqlite] " Vladislav Bolkhovitin
2012-11-02  0:38                                               ` Howard Chu
2012-11-02  0:38                                                 ` Howard Chu
     [not found]                                                 ` <50931601.4060102-aQkYFu9vm6AAvxtiuMwx3w@public.gmane.org>
2012-11-02 12:24                                                   ` Richard Hipp
2012-11-13  3:41                                                     ` [sqlite] " Vladislav Bolkhovitin
2012-11-02 12:33                                                 ` Alan Cox
2012-11-02 12:33                                                   ` Alan Cox
2012-11-13  3:41                                                   ` [sqlite] " Vladislav Bolkhovitin
2012-11-13  3:41                                                     ` Vladislav Bolkhovitin
2012-11-13 17:40                                                     ` Alan Cox
2012-11-13 17:40                                                       ` Alan Cox
2012-11-13 19:13                                                       ` [sqlite] " Nico Williams
2012-11-13 19:13                                                         ` Nico Williams
2012-11-15  1:17                                                         ` [sqlite] " Vladislav Bolkhovitin
2012-11-15 12:07                                                           ` David Lang
2012-11-15 12:07                                                             ` David Lang
     [not found]                                                             ` <alpine.DEB.2.02.1211150353080.32408-UEhY+ZBZOcqqLGM74eQ/YA@public.gmane.org>
2012-11-15 16:14                                                               ` 杨苏立 Yang Su Li
2012-11-17  5:02                                                                 ` [sqlite] " Vladislav Bolkhovitin
2012-11-17  5:02                                                                   ` Vladislav Bolkhovitin
2012-11-16 15:06                                                             ` Howard Chu
2012-11-16 15:06                                                               ` Howard Chu
2012-11-16 15:31                                                               ` [sqlite] " Ric Wheeler
2012-11-16 15:54                                                                 ` Howard Chu
2012-11-16 15:54                                                                   ` Howard Chu
2012-11-16 18:03                                                                   ` [sqlite] " Ric Wheeler
2012-11-16 18:03                                                                     ` Ric Wheeler
2012-11-16 19:14                                                               ` David Lang
2012-11-16 19:14                                                                 ` David Lang
2012-11-17  5:02                                                             ` [sqlite] " Vladislav Bolkhovitin
2012-11-17  5:02                                                               ` Vladislav Bolkhovitin
2012-11-15 17:06                                                           ` Ryan Johnson
2012-11-15 17:06                                                             ` Ryan Johnson
2012-11-15 22:35                                                             ` [sqlite] " Chris Friesen
2012-11-17  5:02                                                               ` Vladislav Bolkhovitin
2012-11-17  5:02                                                                 ` Vladislav Bolkhovitin
2012-11-20  1:23                                                                 ` Vladislav Bolkhovitin
2012-11-20  1:23                                                                   ` Vladislav Bolkhovitin
2012-11-26 20:05                                                                   ` Nico Williams
2012-11-26 20:05                                                                     ` Nico Williams
2012-11-29  2:15                                                                     ` Vladislav Bolkhovitin
2012-11-29  2:15                                                                       ` Vladislav Bolkhovitin
2012-11-15  1:16                                                       ` [sqlite] " Vladislav Bolkhovitin
2012-11-15  1:16                                                         ` Vladislav Bolkhovitin
2012-11-13  3:37                                                 ` Vladislav Bolkhovitin
     [not found]                                     ` <508B3EED.2080003-d+Crzxg7Rs0@public.gmane.org>
2012-11-11  4:25                                       ` 杨苏立 Yang Su Li
2012-11-13  3:42                                         ` [sqlite] " Vladislav Bolkhovitin
2012-11-13  3:42                                           ` Vladislav Bolkhovitin
2012-10-10  7:57                 ` [PATCH 00/16] f2fs: introduce flash-friendly file system Vyacheslav Dubeyko
2012-10-10  9:43                   ` Jaegeuk Kim
2012-10-11  3:14                     ` Namjae Jeon
     [not found]                       ` <CAN863PuyMkSZtZCvqX+kwei9v=rnbBYVYr3TqBXF_6uxwJe2_Q@mail.gmail.com>
2012-10-17 11:13                         ` Namjae Jeon
2012-10-17 23:06                           ` Changman Lee
2012-10-12 12:30                     ` Vyacheslav Dubeyko
2012-10-12 14:25                       ` Jaegeuk Kim [this message]
2012-10-07 10:15     ` Vyacheslav Dubeyko
2012-10-07 10:15       ` Vyacheslav Dubeyko
2012-10-05 11:55 김재극

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=1350051936.2299.29.camel@kjgkr \
    --to=jaegeuk.kim@gmail.com \
    --cc=chur.lee@samsung.com \
    --cc=cm224.lee@samsung.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jaegeuk.kim@samsung.com \
    --cc=jooyoung.hwang@samsung.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marco.stornelli@gmail.com \
    --cc=slava@dubeyko.com \
    --cc=tytso@mit.edu \
    --cc=viro@zeniv.linux.org.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.