From: Ju Hyung Park <qkrwngud825@gmail.com>
To: Chao Yu <yuchao0@huawei.com>
Cc: Jaegeuk Kim <jaegeuk@kernel.org>,
linux-kernel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH 1/2] f2fs: set 4KB discard granularity by default
Date: Tue, 4 Sep 2018 23:36:14 +0900 [thread overview]
Message-ID: <CAD14+f15yadDMY-fwSW5TVHRF1JAz-8kKocN0t258H7c1CTDAw@mail.gmail.com> (raw)
In-Reply-To: <8dd153c2-5611-728b-e4a9-0c59486f53a4@huawei.com>
Hi,
I was wondering what would be the negatives on reducing the discard granularity
other than making discard more aggressive(hence higher overhead and latency?).
Thanks.
On Tue, Aug 14, 2018 at 4:08 PM Chao Yu <yuchao0@huawei.com> wrote:
>
> On 2018/8/14 12:13, Jaegeuk Kim wrote:
> > On 08/10, Chao Yu wrote:
> >> Small granularity (size < 64K) fragmentation will cause f2fs suspending
> >> all pending discards, result in performance regression, so let's set
> >> 4KB discard granularity by default.
> >>
> >> So that without fstrim, we also have the ability to avoid any performance
> >> regression caused by non-alignment mapping between fs and flash device.
> >
> > This is why we added a sysfs entry. Why do we need to change the default
> > value every time?
>
> Of course, I didn't forget it. But, mostly, our user didn't know very well about
> our filesystem including each configuration's meaning, mechanism, or usage
> scenario, most of the time, they will choose to test f2fs with all default
> option, and then make the conclusion.
>
> Currently, with default 64k granularity, if we simulate fragmentation scenario
> of filesystem, like by a)writing 4k file and b)deleting even indexing file, then
> all 4k discards won't be issued, result in exhaustion of free space of flash
> storage, and performance degradation.
>
> So I think we'd better to consider and set default value of configuration more
> elaborately to avoid obvious weakness.
>
> Thoughts?
>
> Thanks,
>
> >
> >>
> >> Signed-off-by: Chao Yu <yuchao0@huawei.com>
> >> ---
> >> fs/f2fs/f2fs.h | 2 +-
> >> 1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
> >> index 58431b9bfd8f..273ffdaf4891 100644
> >> --- a/fs/f2fs/f2fs.h
> >> +++ b/fs/f2fs/f2fs.h
> >> @@ -248,7 +248,7 @@ struct discard_entry {
> >> };
> >>
> >> /* default discard granularity of inner discard thread, unit: block count */
> >> -#define DEFAULT_DISCARD_GRANULARITY 16
> >> +#define DEFAULT_DISCARD_GRANULARITY 1
> >>
> >> /* max discard pend list number */
> >> #define MAX_PLIST_NUM 512
> >> --
> >> 2.18.0.rc1
> >
> > .
> >
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Linux-f2fs-devel mailing list
> Linux-f2fs-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
next prev parent reply other threads:[~2018-09-04 14:36 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-10 10:08 [PATCH 1/2] f2fs: set 4KB discard granularity by default Chao Yu
2018-08-10 10:08 ` [PATCH 2/2] f2fs: tune discard speed with storage usage rate Chao Yu
2018-08-14 4:19 ` Jaegeuk Kim
2018-08-14 7:41 ` Chao Yu
2018-08-14 17:23 ` Jaegeuk Kim
2018-08-15 1:46 ` Chao Yu
2018-08-15 2:33 ` Jaegeuk Kim
2018-08-15 2:51 ` Chao Yu
2018-08-15 2:56 ` Jaegeuk Kim
2018-08-15 3:01 ` Chao Yu
2018-08-15 3:20 ` Jaegeuk Kim
2018-08-15 3:30 ` Chao Yu
[not found] ` <CAD14+f1MoAjEuXwGSmL3=0ROX_f=9jZVmvNsU9gnTP=UNxsTrg@mail.gmail.com>
2018-08-16 1:23 ` [f2fs-dev] " Jaegeuk Kim
2018-08-16 11:25 ` Chao Yu
2018-08-17 18:30 ` Jaegeuk Kim
2018-08-14 4:13 ` [PATCH 1/2] f2fs: set 4KB discard granularity by default Jaegeuk Kim
2018-08-14 7:08 ` Chao Yu
2018-09-04 14:36 ` Ju Hyung Park [this message]
2018-09-05 2:33 ` [f2fs-dev] " Chao Yu
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=CAD14+f15yadDMY-fwSW5TVHRF1JAz-8kKocN0t258H7c1CTDAw@mail.gmail.com \
--to=qkrwngud825@gmail.com \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=yuchao0@huawei.com \
/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;
as well as URLs for NNTP newsgroup(s).