public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Peter Humphrey <peter@prh.myzen.co.uk>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] is multi-core really worth it?
Date: Tue, 05 Dec 2017 13:07:16 +0000	[thread overview]
Message-ID: <7155996.JnYQhvlp2Z@peak> (raw)
In-Reply-To: <5A267913.5030902@youngman.org.uk>

On Tuesday, 5 December 2017 10:46:43 GMT Wols Lists wrote:
> On 05/12/17 10:09, Peter Humphrey wrote:
> >> I assume using a ramdisk would help with this? I wouldn't want to do a
> >> 
> >> > SSD as I assume it would excessively wear by doing compiles.
> > 
> > I use tmpfs, like this:
> > 
> > $ grep tmpfs /etc/fstab
> > tmpfs   /var/tmp/portage  tmpfs  
> > noatime,uid=portage,gid=portage,mode=0775  0 0 tmpfs   /tmp            
> >          tmpfs   noatime,nosuid,nodev,noexec,mode=1777   0 0
> > 
> > If a tmpfs fills up, the excess gets swapped out, but with 32GB RAM here
> > I haven't yet seen any swap used at all - not even in an emerge -e
> > world.
> Same here. Note that tmpfs defaults to half ram, so that would give you
> a 16GB /var/tmp/portage.

That's the starting size, yes. The kernel will expand it or shrink it with 
changes in the demands on the system.

> With 16GB ram here, that would probably cause things like emerging
> libreoffice or firefox or gcc to abort.

Not unless you run out of swap space - remember that tmpfs gets swapped like 
anything else in memory. Or unless one compile job requires a single 
temporary file bigger than your tmpfs file system, which hardly seems 
likely.

> My fstab has these lines ... note the SIZE option ...

Yes, I know about the size option. I haven't needed to use it on this box.

> # glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for
> # POSIX shared memory (shm_open, shm_unlink).
> # (tmpfs is a dynamically expandable/shrinkable ramdisk, and will
> #  use almost no memory if not populated with files)
> shm                     /dev/shm        tmpfs
> nodev,nosuid,noexec     0 0

You shouldn't need that shm entry any more.

> portage                 /var/tmp/portage        tmpfs
> size=30G,mode=0777      0 0
> tmp                     /tmp            tmpfs
> size=10G,mode=0777      0 0
> 
> My swap partitions are twice max ram, so I currently have two 32GB
> partitions giving me 80GB total ram and swap.

So you shouldn't find big compiler jobs aborting on out-of-memory.

> (My new system when I get it working maxes out at 64GB ram so I'll have
> 256GB swap and (currently) 16GB ram)

I've halved my original 4GB swap to 2GB since it never seems to be used. I'm 
not brave enough to do away with it altogether though.

-- 
Regards,
Peter.



  parent reply	other threads:[~2017-12-05 13:07 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-22  6:52 [gentoo-user] is multi-core really worth it? Raffaele Belardi
2017-11-22  7:21 ` R0b0t1
2017-11-22  7:26 ` Jeremi Piotrowski
2017-11-22  8:23   ` Neil Bothwick
2017-11-22  8:34   ` David Haller
2017-11-22 10:07     ` [gentoo-user] " Martin Vaeth
2017-11-22 11:26       ` David Haller
2017-11-23 22:47         ` Martin Vaeth
2017-11-22 13:12   ` [gentoo-user] " Raffaele Belardi
2017-11-22 13:23     ` J. Roeleveld
2017-11-22 14:11     ` Tsukasa Mcp_Reznor
2017-11-22 14:34       ` Wols Lists
2017-11-22 16:27         ` J. Roeleveld
2017-12-05  4:11           ` Taiidan
2017-12-05  4:17             ` R0b0t1
2017-12-05 10:09             ` Peter Humphrey
2017-12-05 10:46               ` Wols Lists
2017-12-05 11:13                 ` Raffaele Belardi
2017-12-05 11:39                   ` Mick
2017-12-05 13:07                 ` Peter Humphrey [this message]
2017-12-05 13:57                   ` Wols Lists
2017-12-05 14:13                     ` Peter Humphrey
2017-12-05 21:56               ` Neil Bothwick
2017-12-06 13:29                 ` Wols Lists
2017-12-06 15:34                   ` Alan McKinnon
2017-12-06 16:07                     ` Wols Lists
2017-12-06 23:51                       ` [gentoo-user] " Ian Zimmerman
2017-12-06 16:12                     ` [gentoo-user] " Wols Lists
2017-12-06 17:24                     ` Kai Peter
2017-11-22  7:48 ` David Haller
2017-11-22  8:32   ` J. Roeleveld
2017-11-22  8:57     ` David Haller
2017-11-22 12:16       ` Peter Humphrey
2017-11-22 16:36       ` Neil Bothwick
2017-11-28 10:07 ` [gentoo-user] " Raffaele Belardi
2017-12-01 10:39   ` J. Roeleveld

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=7155996.JnYQhvlp2Z@peak \
    --to=peter@prh.myzen.co.uk \
    --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