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 v2 0/1] nilfs2: add mount option that reduces super block writes
Date: Sun, 2 Feb 2014 17:50:08 +0100 [thread overview]
Message-ID: <cover.1391359219.git.andreas.rohner@gmx.net> (raw)
Hi,
This is an experimental patch. I am not suggesting to use this as a
default recovery option. I had some time over the weekend to improve my
first version significantly. The primary goal of this patch is to test
how bad a linear scan of all segments really is for performance.
The patch introduces a mount option that allows the user to disable the
periodic overwrite of the super block during normal file system
operation. The super block needs to point to the latest segment, to
allow the file system to recover in case of an unclean shutdown, but
this leads to a lot of writes to this one particular block. This is
usually not a problem, but it can lead to wear leveling problems with
cheap flash based storage devices.
Instead of periodically writing to the super block, this patch only
writes at mount and umount time and performs a linear scan for the
latest segment in case a recovery is necessary.
Here are the test results for some devices:
100GB HDD:
Recovery: 45.042s
Normal Mount: 0.165s
100GB SSD:
Recovery: 0.752s
Normal Mount: 0.059s
16GB SD-Card:
Recovery: 3.833s
Normal Mount: 0.652s
16GB Micro-SD-Card:
Recovery: 4.011s
Normal Mount: 1.104s
8GB USB-Stick:
Recovery: 1.704s
Normal Mount: 0.549s
The HDD is obviously intolerably slow for this task, but still the read
ahead improved its time significantly.
SSDs are really really good for these kind of random read operations. I
measured it three times to be sure. Since I know the addresses of the
blocks in advance, I do a 64 block read ahead so that the I/O queue of
the SSD is always full. That way it can read with almost full bandwidth.
The SD-Cards and the USB-Stick are not particularly fast, but they are
small enough so that the recovery time is tolerable.
Best regards,
Andreas Rohner
---
v2: Add validity checks
Add history of recent segments
Add check of partial segments
Add readahead
Add fast crc checksum replacing ss_pad
Andreas Rohner (1):
nilfs2: add mount option that reduces super block writes
fs/nilfs2/recovery.c | 248 ++++++++++++++++++++++++++++++++++++++++++++++
fs/nilfs2/segbuf.c | 16 ++-
fs/nilfs2/segment.c | 3 +-
fs/nilfs2/segment.h | 1 +
fs/nilfs2/super.c | 10 +-
fs/nilfs2/the_nilfs.c | 3 +
include/linux/nilfs2_fs.h | 6 +-
7 files changed, 281 insertions(+), 6 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-02-02 16:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-02 16:50 Andreas Rohner [this message]
[not found] ` <cover.1391359219.git.andreas.rohner-hi6Y0CQ0nG0@public.gmane.org>
2014-02-02 16:50 ` [PATCH v2 1/1] nilfs2: add mount option that reduces super block writes Andreas Rohner
[not found] ` <dd489a00bca481cea1cb69e755ed5db5b186a5e5.1391359219.git.andreas.rohner-hi6Y0CQ0nG0@public.gmane.org>
2014-02-05 20:21 ` Clemens Eisserer
2014-02-11 12:31 ` Ryusuke Konishi
[not found] ` <20140211.213138.107755196.konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org>
2014-02-11 14:07 ` Andreas Rohner
[not found] ` <52FA2EB4.6030401-hi6Y0CQ0nG0@public.gmane.org>
2014-02-11 18:11 ` Ryusuke Konishi
[not found] ` <20140212.031115.172542304.konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org>
2014-02-11 19:58 ` Andreas Rohner
[not found] ` <52FA80F5.1090003-hi6Y0CQ0nG0@public.gmane.org>
2014-02-12 0:58 ` Ryusuke Konishi
[not found] ` <20140212.095831.397309935.konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org>
2014-02-12 1:23 ` Ryusuke Konishi
2014-02-09 15:36 ` [PATCH v2 0/1] " Clemens Eisserer
[not found] ` <CAFvQSYT0cdeETZX-qdq07t6T4jq9Z=wJxXwBzycyn9Ue_JV8FA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-02-10 8:56 ` Andreas Rohner
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.1391359219.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox