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. With 16GB ram here, that would probably cause
things like emerging libreoffice or firefox or gcc to abort.

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

# 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
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.

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

Cheers,
Wol

Reply via email to