View previous topic :: View next topic |
Author |
Message |
certem Tux's lil' helper
Joined: 14 Feb 2013 Posts: 145
|
Posted: Sun Mar 03, 2013 2:33 pm Post subject: [Solved] Can I gain considerable time by using tmpfs |
|
|
Hi all
I'm installing gentoo on a computer with specifications below:
Intel Pentium IV - 2.8 ghz
1 GB ram
256 MB Graphics Card
40 GB Hardisk
Compiling Chromium took about 10 hours and I needed to revdep-rebuild for some reason.
When I searched for ways to speed up installing I met something like this:
Code: | tmpfs /var/tmp/portage tmpfs size=5G 0 0 |
in this url:http://www.eshlox.net/en/2012/07/29/gentoo-speeding-up-the-compilation-time/
I wonder if I start all over again and do it using tmpfs how much time I would gain.
Note: In my installation I followed the handbook and my partitions are the way mentioned in the handbook. I don't want to use binaries.
Edit: Solved
Last edited by certem on Sun Mar 03, 2013 6:42 pm; edited 1 time in total |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54266 Location: 56N 3W
|
Posted: Sun Mar 03, 2013 2:51 pm Post subject: |
|
|
certem,
tmpfs doesn't actually save very much. It puts things in RAM instead of writing them to disk.
However, if you have the RAM for this, the temporary files that get written to disk stay in the buffers in RAM anyway.
The only overhead is setting up the DMA for the HDD transfer and the use of RAM bandwidth for the disk transfer.
You need about 4G RAM for this to happen with most packages.
From memory, you can't usefully use 4G on a P4. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
lexflex Guru
Joined: 05 Mar 2006 Posts: 363 Location: the Netherlands
|
Posted: Sun Mar 03, 2013 2:56 pm Post subject: |
|
|
Since ram is faster then disk, it might indeed speed up your emerge-times.
More on this:
http://www.gentoo-wiki.info/TIP_Speeding_up_portage_with_tmpfs
and elsewhere on this forum; many people also use a tempfs to reduce ssd read/writes.
But indeed:
Jaglover wrote: | You have 1 GB of RAM, tempfs uses RAM instead of hard drive. |
In your example you use a ramdisk of 5G, and you have only 1 G of ram. The ' tmpfs'-disk should fit your memory
So, you should try something like 750 MB max for your tempfsfile.
You might (if you have a more powerful machine at your disposal too) also want to take a look at distcc to distribute your compilation-tasks:
http://www.gentoo.org/doc/en/distcc.xml
Alex.
EDIT I see NeddySeagoon replied in the meantime:
As he explains indeed the 750 MB i suggest might not be enough, so in that case indeed it wont help you... |
|
Back to top |
|
|
darkphader Veteran
Joined: 09 May 2002 Posts: 1217 Location: Motown
|
Posted: Sun Mar 03, 2013 3:17 pm Post subject: |
|
|
Indeed, with only 1GB of ram you would not be able to compile www-client/chromium with the amount of memory you could spare for a /var/tmp/portage residing in tmpfs. A recent Firefox build required over 6GB for /var/tmp/portage and I had to bump my tmpfs space (previously maxed it at 5GB) to accommodate it: Code: | tmpfs /var/tmp/portage tmpfs noatime,size=7000M,mode=0777 0 0 |
But with 32GB it is not problematic. And, of course, you can't use all of your memory for tmpfs space.
BTW, there's no need to "start all over" to do something like this. You could simply manually mount /var/tmp/portage in tmpfs (it will override) or add the above line (adjusting the size parameter) to the bottom of your /etc/fstab. You could try it with a smaller size, such as 256K on some small builds but when you need more space you'll have to umount the tmpfs based /var/tmp/portage and let the physical file system on the hard drive take over.
Outside of a major upgrade adding more memory (RAM) should buy you some performance benefits with a minimal investment.
Chris _________________ WYSIWYG - What You See Is What You Grep |
|
Back to top |
|
|
certem Tux's lil' helper
Joined: 14 Feb 2013 Posts: 145
|
Posted: Sun Mar 03, 2013 6:41 pm Post subject: |
|
|
Thank you for the replies.
This thread has been a very valuable reference for me.
I decided not to break the "long way" compilation right now but next times I'll try distcc and think about putting more ram. |
|
Back to top |
|
|
|