On 05/09/2015 18:59, Dale wrote: > [email protected] wrote: >> On 09/05/2015 08:30 AM, Dale wrote: >> [snip] >>> >>> Well, you can leave that in fstab for when you can use it. This is my >>> understanding. Putting portage's work directory on tmpfs speeds up the >>> compile because it is done in memory instead of a hard drive. Thing is, >>> there may be times when some packages don't have enough space to >>> compile, you run out of tmpfs basically. One example, libreoffice which >>> uses a lot. I've also found that Firefox also uses a lot of space too. >>> Of course, I have enough memory at the moment for both to compile. You >>> may not tho. >>> >>> When you don't have enough for say Libreoffice to compile on tmpfs, you >>> then set a exception for that package. That is where notmpfs comes in. >>> That allows you to use tmpfs for all the other packages but puts it back >>> on spinning rust for that package, and any other package you set it for >>> such as Firefox. >>> >>> So, if you have the memory even for large packages like Libreoffice, >>> just remove the notmpfs part and leave fstab like it was. Basically, >>> ignore that part of the wiki since you don't need to set that. If you >>> have say 6GBs of ram, you would need that line in fstab AND the part >>> about notmpfs. You would not be able to compile Libreoffice with that >>> small amount of ram and even Firefox may not either. >>> >>> Does that clear up the muddy waters any or am I making it worse? Maybe >>> the better question would be, how much memory does your rig have on it? >>> Then folks can advise on where to go based on that. ;-) >>> >>> Dale >> Thanks Dale for explanation. >> I have 8GB RAM and with fstab: >> tmpfs /var/tmp/portage tmpfs defaults 0 >> 0 >> >> it creates 3.9Gb ram disk but that is not enough for firefox I think my >> default setup was OK with: >> /etc/portage/package.env >> /etc/portage/env/notmpfs.conf >> >> Thelma >> >> > > > What I would do, use tmpfs for everything you can and set up a exception > for Firefox and anything else that requires a lot of space to compile. > Basically, follow this part of the wiki for those exceptions like Firefox. > > https://wiki.gentoo.org/wiki/Portage_TMPDIR_on_tmpfs#Per-Package_Choices_at_Compile_Time > > > > That should give you the best of both worlds. You can use tmpfs to get > some speed up on smaller packages and use spinning rust for the larger > packages. Also, you don't have to do all this by hand when you get > ready to upgrade those since you can tell portage what exceptions you > need and it will do it for you. I seem to recall when this first > started a few years ago, a person would have to notice that something > big was going to be updated and disable tmpfs by hand so to speak and > then re-enable it afterwards. Having a way to tell portage what to do > is much easier and less prone to forgetfulness. > > You may want to see if Alan agrees with this advice. I've had 16GBs on > this rig ever since it was built. I love when stuff is on sale. lol
Yes, that's how it works best. If you don't specify a size for a tmpfs, it defaults to half available RAM. That doesn't mean it takes up that much RAM (it's not a ramdisk), it uses up to that maximum if it is available. It's backed by swap and the kernel does it's usual memory management magic to keep everything ticking along. There's probably less than 10 packages in the tree that need more that 4G build space. Libreoffice and firefox are the common two. And like you say these days portage tells you if there isn't enough space for a package, so you make an exception for that one. Yes, I remember those bad old days. I also remember the bad old days when we needed emerge -e every six months to dig portage out of the holes it was making for itself :-) -- Alan McKinnon [email protected]

