Portage TMPDIR on tmpfs
During emerge, you can build packages in tmpfs. Instead of having large build files in hdd. This speeds up emerge times and reduces hdd/ssd wearing.
You can mount Portage TMPDIR to tmpfs with following config:
Then mount Portage TMPDIR:
Considering tmpfs size
Tmpfs should be big enough. When it gets full, emerge fails at that point. Most packages dont need much space but there are few very large packages. For example: app-office/openoffice: 10G or so. www-client/chromium: More than 2GB.
Per package choise for TMPFS / HDD
You can configure emerge to build large packages outside of the tmpfs drive.
Create the file to tell portage where to place the temporary files directory.
Create the temporary files directory.
Create the file in which you will list all the packages that need some special environment variable settings.