Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
lightspeed emerging without any tools..
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
batistuta
Veteran
Veteran


Joined: 29 Jul 2005
Posts: 1384
Location: Aachen

PostPosted: Tue Feb 21, 2006 5:43 pm    Post subject: Speeding up compilation with tmpfs Reply with quote

I know that this was mentioned 1000 times before, but after I've tried it today I was so impressed, that I thought about mentioning it again for all people new with Gentoo. I even think that the installation manual should say something about it. :D

tmpfs provides a way dinamically allocate RAM for your /tmp or /var/tmp partition. You can enable it and disable it as you wish on the fly, and it dramatically reduces your compilation time (at least for my system) by minimizing the I/O access. 8)
Check it out
Back to top
View user's profile Send private message
irondog
l33t
l33t


Joined: 07 Jul 2003
Posts: 715
Location: Voor mijn TV. Achter mijn pc.

PostPosted: Tue Feb 21, 2006 6:18 pm    Post subject: Reply with quote

Yep. Tmpfs rules. It doesn't claim free memory if it isn't in use. It's also swappable, which means it won't waste your free memory if tmpfs is populated with garbage.
You might want to add this to /etc/fstab
Code:
none /var/tmp/portage tmpfs size=800M 0 0

There also is no need to clean /var/tmp/portage anymore. Every reboot your /var/tmp/portage is clean.
_________________
Alle dingen moeten onzin zijn.
Back to top
View user's profile Send private message
pussi
l33t
l33t


Joined: 08 May 2004
Posts: 727
Location: Finland

PostPosted: Tue Feb 21, 2006 7:26 pm    Post subject: Reply with quote

Wow! Thanks for the tip.

Finally I was able to get rid of the ccache ;)
Back to top
View user's profile Send private message
PaveQ
Apprentice
Apprentice


Joined: 11 Feb 2005
Posts: 225
Location: Finland

PostPosted: Tue Feb 21, 2006 8:51 pm    Post subject: Reply with quote

pussi wrote:
Wow! Thanks for the tip.

Finally I was able to get rid of the ccache ;)


Why would you get rid of ccache? It still speeds up compiling no matter if you got tmpfs. They are completely separate things.
Back to top
View user's profile Send private message
pussi
l33t
l33t


Joined: 08 May 2004
Posts: 727
Location: Finland

PostPosted: Tue Feb 21, 2006 10:26 pm    Post subject: Reply with quote

PaveQ wrote:
Why would you get rid of ccache? It still speeds up compiling no matter if you got tmpfs. They are completely separate things.
I know, but I actually tried compiling with both tempfs and ccache, and it was faster with tempfs only.

Anyway, I've been thinking of stopping using ccache because it takes too much disk space and tempfs makes compilations faster without that side effect.
Back to top
View user's profile Send private message
ThamanX
n00b
n00b


Joined: 29 Nov 2005
Posts: 46
Location: AUT / Gmunden

PostPosted: Wed Feb 22, 2006 12:31 pm    Post subject: Reply with quote

I have 512 MB RAM installed in my System. How many RAM shoulde i use for it ??

Could it be that this Drive gets full ?? How can i prevent me from this ??
Back to top
View user's profile Send private message
lnxz
Guru
Guru


Joined: 03 Jul 2005
Posts: 472
Location: Earth

PostPosted: Wed Feb 22, 2006 12:37 pm    Post subject: Reply with quote

You should make a script that mounts a tmpfs on /var/tmp/portage before the emerge and unmounts it afterwards, because some packages will be larger than your ram space, which will cause the compilation to be terminated.
The script should probably empty /var/tmp/portage after each subsequent emerge, too (if you compile several packages at once).
Back to top
View user's profile Send private message
tomk
Bodhisattva
Bodhisattva


Joined: 23 Sep 2003
Posts: 7221
Location: Sat in front of my computer

PostPosted: Wed Feb 22, 2006 1:02 pm    Post subject: Reply with quote

Merged from here.
_________________
Search | Read | Answer | Report | Strip
Back to top
View user's profile Send private message
Sheepdogj15
Guru
Guru


Joined: 07 Jan 2005
Posts: 430
Location: Backyard

PostPosted: Sun Mar 12, 2006 1:28 pm    Post subject: Reply with quote

in case anyone is still curious, tmpfs will swap out if you run out of RAM, whereas ramfs won't. otherwise the theory is the same: dynamically changes in size with how much data is in there, you specify a max size, etc.
_________________
Sheepdog
Why Risk It? | Samba Howto
Back to top
View user's profile Send private message
Naib
Watchman
Watchman


Joined: 21 May 2004
Posts: 6053
Location: Removed by Neddy

PostPosted: Sun Mar 12, 2006 1:36 pm    Post subject: Reply with quote

nyda wrote:
Or your compiler cache kicked in.

Code:

root, root/ # genlop -t xorg-x11
 * x11-base/xorg-x11

     Tue Sep  7 16:19:39 2004 --> x11-base/xorg-x11-6.7.99.904
       merge time: 49 minutes and 39 seconds.

     Tue Sep 14 21:29:06 2004 --> x11-base/xorg-x11-6.8.0
       merge time: 38 minutes and 51 seconds.

     Fri Sep 17 15:27:04 2004 --> x11-base/xorg-x11-6.8.0-r1
       merge time: 24 minutes and 20 seconds.



How long

Code:

Fluid jrb # genlop -t xorg-x11
 * x11-base/xorg-x11

     Mon Apr 11 00:39:30 2005 >>> x11-base/xorg-x11-6.8.2-r1
       merge time: 1 hour, 8 minutes and 19 seconds.

     Sun Jun  5 05:15:37 2005 >>> x11-base/xorg-x11-6.8.2-r1
       merge time: 1 hour, 32 minutes and 40 seconds.

     Sun Jun  5 10:40:30 2005 >>> x11-base/xorg-x11-6.8.2-r1
       merge time: 1 hour, 1 minute and 58 seconds.

     Wed Jun 15 09:35:40 2005 >>> x11-base/xorg-x11-6.8.2-r2
       merge time: 1 hour, 15 minutes and 25 seconds.

     Tue Sep 13 00:38:00 2005 >>> x11-base/xorg-x11-6.8.2-r3
       merge time: 1 hour, 4 minutes and 38 seconds.

     Tue Sep 13 12:19:21 2005 >>> x11-base/xorg-x11-6.8.2-r3
       merge time: 1 hour, 10 minutes and 43 seconds.

     Sun Sep 18 04:34:36 2005 >>> x11-base/xorg-x11-6.8.2-r4
       merge time: 1 hour, 23 minutes and 28 seconds.

     Fri Sep 23 09:09:33 2005 >>> x11-base/xorg-x11-6.8.2-r5
       merge time: 1 hour, 3 minutes and 12 seconds.

     Sun Oct  9 02:21:54 2005 >>> x11-base/xorg-x11-6.8.2-r6
       merge time: 55 minutes and 27 seconds.

     Sat Mar 11 20:49:37 2006 >>> x11-base/xorg-x11-7.0-r1
       [b]merge time: 4 seconds.[/b]


only took 4seconds for me :wink:
_________________
Quote:
Removed by Chiitoo
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum