Hi
bash_vi asked me to write a short resume about how to emerge programs by using the ramfs for speedup.
Here’s how to do so:
mount -t ramfs -o size=2g ramfs /var/tmp/portage/
- The “-t ramfs” is obviously self explainatory.
- The “-o size” tells the ramfs driver how much space of the RAM should be reserved for this specific mount point.
- “/var/tmp/portage/” is the place where portage usually unpacks the source boundles and begins to compile them.
You can also put it into your /etc/fstab
in order to keep it for each reboot with
echo -e "ramfs\t/var/tmp/portage/\tramfs\tsize=2g\t0\t0" >> /etc/fstab
Now you can compile your stuff within RAMFS
Links:
- http://de.gentoo-wiki.com/wiki/Emerge_beschleunigen
- http://www.thegeekstuff.com/2008/11/overview-of-ramfs-and-tmpfs-on-linux/
But after reboot, everything’s gone…
@Claude:
Why would you want to keep the temporary compilation data anyway?
@Leviathan:
Solving problems you wouldn’t have without gentoo. :/
“Solving problems you wouldn’t have without gentoo. :/”
I was just bitched at by some Debian guys because I tried to modify and compile a package a way they didn’t like…
Also sometimes recompiling the whole system makes perfectly sense, e.g when a binary distro is using a specific glibc which already causes /sbin/init to segfault
“But after reboot, everything’s gone…”
Which is absolutely ok, because you only wanna compile and install the binaries.
The working directory can be thrown away anyway 🙂
/var/tmp/portage/ – DAMN! I didn’t mind the “/tmp/” :/
I was thinking of the whole portage tree… Allright, now it makes perfectly sense of course 🙂