I found this article a few days ago - http://en.gentoo-wiki.com/wiki/Portage_TMPDIR_on_tmpfs. Speed up compilation? Why not? Let’s see it! ;-)
Kernel configuration.
File systems ---> Pseudo filesystems ---> [*] Virtual memory file system support (former shm fs)
Fstab.
tmpfs /var/tmp/portage tmpfs size=5G 0 0
Mount
mount -a
That’s all. We may test. Firstly, some informations about configuration and my Dell Inspiron Q17R. django-ldap-and-ssl make.conf
CFLAGS="-march=native -O2 -pipe"CXXFLAGS="${CFLAGS}"CHOST="x86_64-pc-linux-gnu"MAKEOPTS="-j9"
cpu
eshlox eshlox # cat /proc/cpuinfo | grep -i "model name"model name : Intel(R) Core(TM) i7-2630QM CPU @ 2.00GHzmodel name : Intel(R) Core(TM) i7-2630QM CPU @ 2.00GHzmodel name : Intel(R) Core(TM) i7-2630QM CPU @ 2.00GHzmodel name : Intel(R) Core(TM) i7-2630QM CPU @ 2.00GHzmodel name : Intel(R) Core(TM) i7-2630QM CPU @ 2.00GHzmodel name : Intel(R) Core(TM) i7-2630QM CPU @ 2.00GHzmodel name : Intel(R) Core(TM) i7-2630QM CPU @ 2.00GHzmodel name : Intel(R) Core(TM) i7-2630QM CPU @ 2.00GHz
memory
eshlox eshlox # cat /proc/meminfo | grep -i memtotalMemTotal: 8090296 kB
disk
eshlox eshlox # lshw -class disk *-disk description: ATA Disk product: ST9640423AS vendor: Seagate physical id: 0.0.0 bus info: scsi@0:0.0.0 logical name: /dev/sda version: 0001 serial: 5WS1NRQM size: 596GiB (640GB) capabilities: partitioned partitioned:dos configuration: ansiversion=5 signature=7caf9f72
Below the results of my tests.
Standard compilation
CPU Usage: 100%Memory Usage: before compilation: 1.3GB during compilation: 2.0GBMax temperature: ~95°C
Thu Jul 19 23:39:33 2012 >>> media-sound/amarok-2.5.0-r4 merge time: 12 minutes and 48 seconds.Thu Jul 19 22:12:20 2012 >>> net-im/kadu-0.11.3 merge time: 15 minutes and 12 seconds.Mon Jul 28 21:45:46 2012 >>> www-client/firefox-10.0.5 merge time: 41 minutes and 1 second.Mon Mar 5 17:31:07 2012 >>> sys-devel/gcc-4.5.3-r2 merge time: 18 minutes and 58 seconds.Wed Apr 25 10:42:53 2012 >>> sys-libs/glibc-2.14.1-r3 merge time: 12 minutes and 40 seconds.
Tmpfs
CPU Usage: 100%Memory Usage: before compilation: 1.3GB during compilation: 1.4GBMax temperature: 85°C
Sun Jul 29 12:23:52 2012 >>> media-sound/amarok-2.5.0-r4 merge time: 2 minutes and 9 seconds.Thu Jul 19 22:16:49 2012 >>> net-im/kadu-0.11.3 merge time: 52 seconds.Sun Jul 29 12:20:03 2012 >>> www-client/firefox-10.0.6 merge time: 13 minutes and 28 seconds.Sun Jul 29 12:41:32 2012 >>> sys-devel/gcc-4.5.3-r2 merge time: 17 minutes and 7 seconds.Fri Aug 17 14:46:58 2012 >>> sys-libs/glibc-2.15-r2 merge time: 12 minutes and 33 seconds.
Conclusion? If any compilation would speed up as Kadu.. But without exaggeration. It is better.
PS. LibreOffice compilation? No, I’m not interested. ;-)