From: Duncan <1i5t5.duncan@cox.net>
To: linux-btrfs@vger.kernel.org
Subject: Re: price to pay for nocow file bit?
Date: Thu, 8 Jan 2015 06:30:59 +0000 (UTC) [thread overview]
Message-ID: <pan$2625$dcbfe450$9a65d855$d7e62f1e@cox.net> (raw)
In-Reply-To: 54AD929E.608@fb.com
Josef Bacik posted on Wed, 07 Jan 2015 15:10:06 -0500 as excerpted:
>> Does this have any effect on functionality? As I understood snapshots
>> still work fine for files marked like that, and so do reflinks. Any
>> drawback functionality-wise? Apparently file compression support is
>> lost if the bit is set? (which I can live with too, journal files are
>> internally compressed anyway)
>>
>>
> Yeah no compression, no checksums. If you do reflink then you'll COW
> once and then the new COW will be nocow so it'll be fine. Same goes for
> snapshots. So you'll likely incur some fragmentation but less than
> before, but I'd measure to just make sure if it's that big of a deal.
>
>> What about performance? Do any operations get substantially slower by
>> setting this bit? For example, what happens if I take a snapshot of
>> files with this bit set and then modify the file, does this result in a
>> full (and hence slow) copy of the file on that occasion?
>>
>>
> Performance is the same.
The otherwise nocow on-snapshot "cow1" is per-block (4096-byte AFAIK), so
some fragmentation, but slower.
The "perfect storm" situation is people doing automated per-minute
snapshots or similar (some people go to extremes with snapper or the
like...), in which case setting nocow often doesn't help a whole lot,
depending on how active the file-writing is, of course.
But for something like append-plus-pointer-update-pattern log files with
something like per-day snapshotting, nocow should at least in theory help
quite a bit, since the write-frequency and thus the prevented cows should
be MUCH higher than the daily snapshot and thus the forced-block-cow1s.
-
FWIW, I'm systemd on btrfs here, but I use syslog-ng for my non-volatile
logs and have Storage=volatile in journald.conf, using journald only for
current-session, where unit status including last-10-messages makes
troubleshooting /so/ much easier. =:^) Once past current-session, text
logs are more useful to me, which is where syslog-ng comes in. Each to
its strength, and keeping the journals from wearing the SSDs[1] is a very
nice bonus. =:^)
---
[1] I can and do filter what syslog-ng writes, but couldn't find a way to
filter journald's writes, only queries/reads. That alone saves writes
for repeated noise I'm filtering out with syslog before it's ever
written, that journald would still be writing if I let it write non-
volatile.
--
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard Stallman
next prev parent reply other threads:[~2015-01-08 6:32 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-07 17:43 price to pay for nocow file bit? Lennart Poettering
2015-01-07 20:10 ` Josef Bacik
2015-01-07 21:05 ` Goffredo Baroncelli
2015-01-07 22:06 ` Josef Bacik
2015-01-08 6:30 ` Duncan [this message]
2015-01-10 12:00 ` Martin Steigerwald
2015-01-10 12:23 ` Martin Steigerwald
2015-01-08 8:24 ` Chris Murphy
2015-01-08 8:35 ` Koen Kooi
2015-01-08 13:30 ` Lennart Poettering
2015-01-08 18:24 ` Konstantinos Skarlatos
2015-01-08 18:48 ` Goffredo Baroncelli
2015-01-09 15:52 ` David Sterba
2015-01-10 10:30 ` Martin Steigerwald
2015-01-11 20:39 ` Chris Murphy
2015-01-08 15:56 ` Zygo Blaxell
2015-01-08 16:53 ` Lennart Poettering
2015-01-08 18:36 ` Zygo Blaxell
2015-01-09 15:41 ` David Sterba
2015-01-09 16:14 ` Zygo Blaxell
2015-01-08 20:42 ` Roger Binns
2015-01-15 19:06 ` Chris Mason
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='pan$2625$dcbfe450$9a65d855$d7e62f1e@cox.net' \
--to=1i5t5.duncan@cox.net \
--cc=linux-btrfs@vger.kernel.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.