Florian Philipp writes:

> tmpfs uses as much memory as necessary and nothing more. In theory, it
> doesn't hurt to add all your memory to it as tmpfs will start to swap
> when you run out of memory. However, it is usually a better idea to
> unmount the tmpfs and use a regular file system whenever you need more
> space.
> 
> As Volker noted, it is probably best to use 2GB tmpfs and when you
> emerge libreoffice, (and maybe firefox and co.) to switch back to using
> a regular fs. You could also expand tmpfs so that it can eat all memory
> not used by your applications under normal circumstances.

In order to avoid manual intervention when building large packages, I do
it that way: In /etc/portage/package.env I have entries like these:

app-emulation/virtualbox        safecflags.conf j1.conf
app-office/libreoffice          notmpfs.conf j1.conf
dev-java/icedtea                notmpfs.conf
dev-lang/R                      j1.conf
games-fps/alienarena            notmpfs.conf
games-fps/worldofpadman         notmpfs.conf
kde-base/kdm                    j1.conf
kde-base/plasma-workspace       j1.conf
kde-base/systemsettings         j1.conf
mail-client/thunderbird         notmpfs.conf
media-sound/amarok              debug.conf
~net-mail/dovecot-2.1.15        j1.conf
net-misc/nx                     j1.conf
sys-boot/grub                   grub.conf
www-client/firefox              notmpfs.conf

Which means that for those packages the .conf scripts
in /etc/portage/env.d/ are sourced.

j1.conf has the line 'MAKEOPTS=-j1' in it, so those packages are not
being compiled in parallel. I happen to have problems with many packages
due to my MAKEOPTS being '--jobs --lod 5', somehow this make much more
trouble than MAKEOPTS=-<somelarge number>.

notmpfs.conf has 'PORTAGE_TMPDIR=/var/portage/tmp', while my normal
PORTAGE_TMPDIR is /var/portage/tmpfs. It is 4G in size, still this is not
enough for many packages. Firefox and Thunrbird are fine with the size,
but they tend to be compiled both at once, and then it is not enough.

safecflags.conf is:
  CFLAGS="-pipe -march=amdfam10 -O2"
CXXFLAGS=$CFLAGS

debug.conf:
  CFLAGS="$CFLAGS -O2 -ggdb"
CXXFLAGS=$CFLAGS
FEATURES="-buildpkg splitdebug"

And grub.conf is 'export DONT_MOUNT_BOOT=blabla', this avoids Grub
messing around with my /boot directory.

Isn't portage just cool?

        Wonko

Attachment: signature.asc
Description: PGP signature

Reply via email to