From: Kai Krakow <hurikhan77@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: [gentoo-user] Re: /var/tmp on tmpfs
Date: Sat, 10 Feb 2018 20:01:56 +0100 [thread overview]
Message-ID: <46s3le-2ni.ln1@hurikhan77.spdns.de> (raw)
In-Reply-To: CAGfcS_meFSc++eGA9BRAtt+8qc-Y1=QTb7VbN5QYTzw-ndacYA@mail.gmail.com
Am Thu, 08 Feb 2018 14:50:31 -0500 schrieb Rich Freeman:
> On Thu, Feb 8, 2018 at 2:17 PM, Dale <rdalek1967@gmail.com> wrote:
>> As someone else pointed out, if you start using swap, that generally
>> defeats the purpose of tmpfs.
>>
>>
> I'll just add one thing to this, which I've probably already said ages
> ago:
>
> In an ideal world swap would STILL be better than building on disk,
> because it gives the kernel fewer constraints around what gets written
> to disk.
>
> Anything written to disk MUST end up on the disk within the dirty
> writeback time limit. Anything written to tmpfs doesn't ever have to
> end up on disk, and if it is swapped the kernel need not do it in any
> particular timeframe. Also, the swapfile doesn't need the same kinds of
> integrity features as a filesystem, which probably lowers the cost of
> writes somewhat (if nothing else after a reboot there is no need to run
> tmpreaper on it).
>
> So, swapping SHOULD still be better than building on disk, because any
> object file that doesn't end up being swapped is a saved disk IO, and
> the stuff that does get swapped will hopefully get written at a more
> opportune time vs forcing the kernel to stop what is doing after 30s (by
> default) to make sure that something gets written no matter what (if it
> wasn't deleted before then).
I can only second this.
> That's all in an ideal world. In practice I've never found the kernel
> swapping algorithms to be the best in the world, and I've seen a lot of
> situations where it hurts. I run without a swapfile for this reason.
> It pains me to do it because I can think of a bunch of reasons why this
> shouldn't help, and yet for whatever reason it does.
I really prefer having inactive things being swapped out than discarding
cache from memory. But since kernel 4.9 this no longer works so well. I'm
still seeking the reason. But for that reason, building in tmpfs is no
longer such an appealing option as before.
Otherwise, I was quite happy with swap behavior, exactly for the reasons
you initially outlined.
--
Regards,
Kai
Replies to list-only preferred.
next prev parent reply other threads:[~2018-02-10 19:02 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-08 17:11 [gentoo-user] /var/tmp on tmpfs gevisz
2018-02-08 17:47 ` [gentoo-user] " Nikos Chantziaras
2018-02-08 18:13 ` Rich Freeman
2018-02-08 19:05 ` Nikos Chantziaras
2018-02-08 19:42 ` Rich Freeman
2018-02-08 21:52 ` gevisz
2018-02-08 21:57 ` Rich Freeman
2018-02-08 22:16 ` gevisz
2018-02-09 1:50 ` Dale
2018-02-09 11:52 ` gevisz
2018-02-08 22:32 ` Nikos Chantziaras
2018-02-08 21:31 ` gevisz
2018-02-08 22:19 ` Nikos Chantziaras
2018-02-08 22:32 ` gevisz
2018-02-08 22:38 ` Rich Freeman
2018-02-08 22:50 ` Tsukasa Mcp_Reznor
2018-02-09 10:07 ` gevisz
2018-02-09 11:00 ` Neil Bothwick
2018-02-08 23:42 ` Grant Taylor
2018-02-10 18:56 ` Kai Krakow
2018-02-10 19:38 ` Wols Lists
2018-02-10 19:52 ` Kai Krakow
2018-02-10 20:06 ` Rich Freeman
2018-02-10 21:13 ` Kai Krakow
2018-02-10 21:20 ` Wol's lists
2018-02-10 22:17 ` Kai Krakow
2018-02-08 19:17 ` [gentoo-user] " Dale
2018-02-08 19:41 ` [gentoo-user] " Nikos Chantziaras
2018-02-09 1:31 ` Dale
2018-02-08 19:50 ` [gentoo-user] " Rich Freeman
2018-02-09 1:24 ` Dale
2018-02-09 10:55 ` gevisz
2018-02-10 19:01 ` Kai Krakow [this message]
2018-02-08 21:57 ` gevisz
2018-02-09 1:35 ` Dale
2018-02-08 20:56 ` Grant Taylor
2018-02-08 23:18 ` Wol's lists
2018-02-08 23:28 ` Grant Taylor
2018-02-09 0:02 ` Rich Freeman
2018-02-09 1:15 ` Wol's lists
2018-02-09 2:15 ` [gentoo-user] " Ian Zimmerman
2018-02-09 11:57 ` gevisz
2018-02-10 19:11 ` Kai Krakow
2018-02-09 8:11 ` [gentoo-user] " Neil Bothwick
2018-02-09 10:12 ` Peter Humphrey
2018-02-09 10:58 ` Neil Bothwick
2018-02-10 19:06 ` [gentoo-user] " Kai Krakow
2018-02-09 10:30 ` [gentoo-user] " gevisz
2018-02-09 10:57 ` Neil Bothwick
2018-02-09 10:58 ` Gerrit Kühn
2018-02-09 22:03 ` Grant Taylor
2018-02-10 19:08 ` [gentoo-user] " Kai Krakow
2018-02-10 18:02 ` Kai Krakow
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=46s3le-2ni.ln1@hurikhan77.spdns.de \
--to=hurikhan77@gmail.com \
--cc=gentoo-user@lists.gentoo.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