From: Duncan <1i5t5.duncan@cox.net>
To: linux-btrfs@vger.kernel.org
Subject: Re: ENOSPC while creating snapshot
Date: Sat, 5 Mar 2016 05:34:39 +0000 (UTC) [thread overview]
Message-ID: <pan$691ee$6e394beb$af481c7f$72f2b3f6@cox.net> (raw)
In-Reply-To: CAJCQCtS6cMjc0MQZresKJpkDnhLF7st2wyvwCKmsPSaT3mYmbw@mail.gmail.com
Chris Murphy posted on Fri, 04 Mar 2016 19:46:34 -0700 as excerpted:
> On Fri, Mar 4, 2016 at 4:16 PM, Martin Mlynář <nexus@smoula.net> wrote:
[Mount options line split/wrapped for followup]
>>>> rw,noatime,nodatasum,nodatacow,ssd,discard,space_cache,
>>>> enospc_debug,commit=900,subvolid=5,subvol=/
>>>
>>> Most likely unrelated but commit time of 15 minutes? Umm, OK why?
>>
>> I'm trying to reduce writes to my ssd.
>
> This will not reduce writes. It will only delay them. And it increases
> the chance of data loss by a lot.
AFAIK, to the extent that temporary files are created and then deleted
again, within that 900 seconds aka 15 minutes, it will indeed reduce
writes.
This can be the case for the build-tmp location for people running build-
from-sources distros such as gentoo, for instance, as many packages will
be built and tmp-installed to that build-tmp, before being quick-merged
to the live system and the work deleted from build-tmp in well under 15
minutes, at least on today's reasonably powerful quad-core-plus systems.
Tho on gentoo, the recommendation for those with the memory available is
to point that build-tmp at a tmpfs instead of a permanent-storage backed
filesystem of any sort.
And in general, for those without the memory to support build-tmp in
tmpfs, a 15-minute commit time isn't going to help either, because if
they have enough memory to avoid flushing to free up memory for that full
15 minutes, they obviously have enough memory to store all those files
that would be in tmpfs if they'd have simply pointed build-tmp at that,
instead.
Another use-case is laptops and other mobile systems with enough memory
to cache the normal working set, is to power down the storage devices for
as long as possible between powerups. However, the heavy power usage
there is normally on spinning up the disk and/or keeping it spinning, and
SSDs obviously aren't subject to that. While some small amount of power
may still be saved by powering down the SSD, I expect it to be pretty
small, and the writes are going to take the same amount of power no
matter when they're done.
In either case, 15 minute commit times are rather extreme, because as has
been pointed out, that's potentially 15 minutes of lost work should the
system crash before those writes are completed, and losing 15 minutes
worth of work is well beyond the acceptable risk level for most people.
5 minutes, much more common, 10 minutes, not so common but you'll fine
people doing it. 15 minutes, pretty rare, I expect.
The point being, yes, there are use-cases where 15 minute commit times
makes sense. But the given reason, a bare wish to reduce writes to the
ssd, without support such as one of the above use-cases or something
similar, really doesn't make sense, at least on its face. I'll agree
with other posters on that.
--
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:[~2016-03-05 5:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-04 21:10 ENOSPC while creating snapshot nexus
2016-03-04 22:37 ` Chris Murphy
[not found] ` <CAJ88j0axsFA3HFc6Cr5o-dtYxLau_iDS2Mx2uVzKvF5HCe9F5Q@mail.gmail.com>
2016-03-05 2:46 ` Chris Murphy
2016-03-05 5:34 ` Duncan [this message]
2016-03-05 10:24 ` Martin Mlynář
2016-03-04 22:49 ` Roman Mamedov
2016-03-05 2:09 ` Duncan
2016-03-05 10:46 ` Filipe Manana
2016-03-05 12:29 ` Martin Mlynář
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$691ee$6e394beb$af481c7f$72f2b3f6@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 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).