public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
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 19:02:04 +0100	[thread overview]
Message-ID: <slo3le-2ni.ln1@hurikhan77.spdns.de> (raw)
In-Reply-To: CA+t6X7eMyK83sHh=DZ42Zm_3+9nQB+8-5A3afgV+g_Wk8SbQVQ@mail.gmail.com

Am Thu, 08 Feb 2018 19:11:48 +0200 schrieb gevisz:

> I never used tmpfs for portage TMPDIR before and now decided to give it
> a try.
> 
> I have 8GB of RAM and 12GB of swap on a separate partition.
> 
> Do I correctly understood
> https://wiki.gentoo.org/wiki/Portage_TMPDIR_on_tmpfs that I can safely
> set in the fstab the size of my tmpfs to 12GB so that the chromium could
> be emerged in tmpfs (using the swap) without the need to set
> notmpfs.conf for chromium and the likes.
> 
> And I am going to set the whole /var/tmp/ on tpmfs instead of just
> /var/tmp/portage Is it ok?

I'm using systemd automounts to discard /var/tmp/portage when there is no
longer a user of this directory. It has one caveat: If you want to
inspect build problems, you should keep a shell running inside.

Here's the configuration:

$ fgrep portage /etc/fstab
none /var/tmp/portage tmpfs noauto,size=150%,uid=250,gid=250,mode=0775,x-systemd.automount 0 0

$ cat /etc/tmpfiles.d/portage.conf
D /var/tmp/portage 0775 portage portage
x /var/tmp/portage

I used ccache before but building in tmpfs is much faster.

I'm currently experimenting with tuning vm.watermark_scaling_factor as the
kernel tends to swap storms with very high desktop latencies during package
builds which consume a lot of tmpfs. This is behavior I'm seeing since
kernel 4.9, worked better before.

As such, I think it makes most sense to put only /var/tmp/portage on tmpfs.
Programs may expect /var/tmp as being non-volatile over reboots.


-- 
Regards,
Kai

Replies to list-only preferred.



      parent reply	other threads:[~2018-02-10 18: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     ` [gentoo-user] " Kai Krakow
2018-02-08 21:57   ` [gentoo-user] " 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 [this message]

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=slo3le-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