Gentoo Prefix: PORTAGE_TMPDIR on NFS solution.
Gentoo Prefix allows you to place a "prefixed environment" wherever you would like. So, if you want to be able to access your prefix on a NFS network it would make sense to put the prefix in /home for example. I don't have any solid numbers but I can imagine that the IO for the nfs server is pretty high when emerging. I would rather not suffer the penalties of compile on NFS but also I WOULD like to access PORTAGE_TMPDIR from any host. For the longest time, I was trying to think of a solution for this, that is..to not compile on a NFS share but also be able to see/access PORTAGE_TMPDIR no matter what host I am on in the network. This is a tricky situation that can be solved by setting PORTAGE_TMPDIR to another NFS mount which just happens to reside on the local machine!
I like it!!
My solution is to symlink $EPREFIX/var/tmp to the other NFS mount on the localhost. In my case, /net/$(hostname)/public/tmp.
UPDATE: The above 'solution' isn't that great. It resulted in a total time increase of about 12%. However, making the symlink point to the local hard drive resulted in a total time decrease of about 31%. (on emerge -e system) Therefore, my latest recommendation is to create the symlink as described originally and override it with PORTAGE_TMPDIR set to the local path.




[...] Jeremy Olexa has done some interesting work with prefix portage that could be of use if you’re looking for a setup like [...]
My Solaris 10/Sparc installation used to have PORTAGE_TMPDIR on an NFS mount from a Solaris 10/x64 machime. After I set that to /var/tmp configure and installing became about 2-3x faster. Conclusion: indeed, don't build on NFS