From: Andreas Rohner <andreas.rohner-hi6Y0CQ0nG0@public.gmane.org>
To: linux-nilfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Andreas Rohner <andreas.rohner-hi6Y0CQ0nG0@public.gmane.org>
Subject: [PATCH 0/4] nilfs-utils: new feature to skip inefficient gc
Date: Sun, 19 Jan 2014 15:01:38 +0100 [thread overview]
Message-ID: <cover.1390139797.git.andreas.rohner@gmx.net> (raw)
Hi,
This patch set implements a small new feature and there shouldn't be
any compatibility issues. It enables the GC to check how much free
space can be gained from cleaning a segment and if it is less than a
certain threshold it will abort the operation and try a different
segment. Although no blocks need to be moved, the SUFILE entry of the
corresponding segment needs to be updated to avoid an infinite loop.
This is potentially useful for all gc policies, but it is especially
beneficial for the timestamp policy. Lets assume for example a NILFS2
volume with 20% static files, which is not unreasonable, and lets assume these
static files are in the oldest segments. So the current timestamp
policy will select the oldest segments and since the data is static
it needs to be moved to new segments. Now it is in the newest segments,
but after a while they will become the oldest segments again. Then
timestamp will move them again. These moving operations are expensive
and unnecessary.
I designed a benchmark that uses a fresh NILFS2 volume, initialized
with 20% static data. Above that, normal file operations are simulated,
but the static data is never touched. These are the results:
SSD:
Timestamp GB Written: 1857.88
Timestamp GB Read: 711.1417
Timestamp Runtime: 10724.27s
Patched GB Written: 823.6395
Patched GB Read: 222.1085
Patched Runtime: 6374.93s
HDD:
Timestamp GB Written: 609.026
Timestamp GB Read: 382.4147
Timestamp Runtime: 13123.15s
Patched GB Written: 423.8563
Patched GB Read: 199.2632
Patched Runtime: 9460.73s
Admittedly the benchmark is a bit biased to highlight the problem. On a
real system the static data won't be so completely static and so the
performance improvements are probably not so extreme.
This is my first patch set to this mailing list. I hope
everything is formally correct.
Best regards,
Andreas Rohner
Andreas Rohner (4):
nilfs-utils: cldconfig add an option to set minimal free blocks
nilfs-utils: cleanerd: add custom error value to enable fast retry
nilfs-utils: refactoring of nilfs_reclaim_segment to add minblocks
param
nilfs-utils: add support for and define some nilfs_argv flags
include/nilfs.h | 2 +-
include/nilfs2_fs.h | 6 ++++++
include/nilfs_gc.h | 6 ++++--
lib/gc.c | 21 +++++++++++++++++----
lib/nilfs.c | 3 ++-
sbin/cleanerd/cldconfig.c | 20 ++++++++++++++++++++
sbin/cleanerd/cldconfig.h | 2 ++
sbin/cleanerd/cleanerd.c | 15 ++++++++++++---
sbin/nilfs-resize/nilfs-resize.c | 2 +-
9 files changed, 65 insertions(+), 12 deletions(-)
--
1.8.5.3
--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next reply other threads:[~2014-01-19 14:01 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-19 14:01 Andreas Rohner [this message]
[not found] ` <cover.1390139797.git.andreas.rohner-hi6Y0CQ0nG0@public.gmane.org>
2014-01-19 14:01 ` [PATCH 1/4] nilfs-utils: cldconfig add an option to set minimal free blocks Andreas Rohner
[not found] ` <685e5c720189d1e451ed8a0d65581aa8c5a3f7f0.1390139797.git.andreas.rohner-hi6Y0CQ0nG0@public.gmane.org>
2014-01-20 10:14 ` Vyacheslav Dubeyko
2014-01-20 10:52 ` Andreas Rohner
[not found] ` <52DCFFEB.4070809-hi6Y0CQ0nG0@public.gmane.org>
2014-01-20 11:05 ` Vyacheslav Dubeyko
2014-01-20 11:13 ` Ryusuke Konishi
2014-01-20 11:55 ` Andreas Rohner
2014-01-19 14:01 ` [PATCH 2/4] nilfs-utils: cleanerd: add custom error value to enable fast retry Andreas Rohner
[not found] ` <a203a9d8105dc1b449e469158fb07fbffbf2da18.1390139797.git.andreas.rohner-hi6Y0CQ0nG0@public.gmane.org>
2014-01-20 10:46 ` Vyacheslav Dubeyko
2014-01-20 12:02 ` Andreas Rohner
2014-01-19 14:01 ` [PATCH 3/4] nilfs-utils: refactoring of nilfs_reclaim_segment to add minblocks param Andreas Rohner
2014-01-19 14:01 ` [PATCH 4/4] nilfs-utils: add support for and define some nilfs_argv flags Andreas Rohner
2014-01-19 14:02 ` [PATCH] nilfs2: depending on flags, update segment usage instead of cleaning Andreas Rohner
[not found] ` <1390140141-4432-1-git-send-email-andreas.rohner-hi6Y0CQ0nG0@public.gmane.org>
2014-01-19 16:49 ` Ryusuke Konishi
[not found] ` <20140120.014916.57469358.konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org>
2014-01-19 17:17 ` Andreas Rohner
2014-01-21 14:17 ` Andreas Rohner
2014-01-20 9:43 ` [PATCH 0/4] nilfs-utils: new feature to skip inefficient gc Vyacheslav Dubeyko
2014-01-20 10:37 ` Andreas Rohner
[not found] ` <52DCFC61.7050608-hi6Y0CQ0nG0@public.gmane.org>
2014-01-20 10:54 ` Vyacheslav Dubeyko
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=cover.1390139797.git.andreas.rohner@gmx.net \
--to=andreas.rohner-hi6y0cq0ng0@public.gmane.org \
--cc=linux-nilfs-u79uwXL29TY76Z2rM5mHXA@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 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.