Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Ideas for compiling faster
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
mattboston
n00b
n00b


Joined: 02 May 2004
Posts: 7
Location: Quincy, MA

PostPosted: Tue May 04, 2004 2:38 am    Post subject: Ideas for compiling faster Reply with quote

Other than getting a faster computer/server or upgrading the hardware. What can I do to compile faster if performance of my machine didn't matter? So far I have turned off all un-needed services/daemons, exited my X and quit any programs that I was running.

Is there anything I can modify to push my processor to the limit to get it to compile as fast as it could while still keeping the Linux up. Somewhere I heard about using a flag with gcc to perform multiple compilation threads at the same time.

Any ideas???
Back to top
View user's profile Send private message
Gil-galad55
Tux's lil' helper
Tux's lil' helper


Joined: 02 Feb 2004
Posts: 101

PostPosted: Tue May 04, 2004 3:04 am    Post subject: Reply with quote

If you have some extra machines, you can try using distcc. gcc 3.4 also offers a profiled bootstrap option (automagically done by the ebuild) that will make the compiler itself faster. Also, if you turn your optimization options down, code will compile much more quickly. Of course, who wants to do that?
_________________
a^2 + b^2 = c^2
"To strive, to seek, to find, and not to yield." Tennyson
Back to top
View user's profile Send private message
mattboston
n00b
n00b


Joined: 02 May 2004
Posts: 7
Location: Quincy, MA

PostPosted: Tue May 04, 2004 6:35 pm    Post subject: Reply with quote

any other ideas? I'm going on 48 hours compiling KDE (and related packages), yes i did USE="-gtk -gnome".

i don't have any other servers or workstations to offload compiling to

there has to be some way to push it harder, since this is a new workstation, and nothing is running on it, i don't mind if the console is unusable
Back to top
View user's profile Send private message
Gil-galad55
Tux's lil' helper
Tux's lil' helper


Joined: 02 Feb 2004
Posts: 101

PostPosted: Tue May 04, 2004 6:45 pm    Post subject: Reply with quote

48 hours? Hmm... shouldn't take that long. I think my first emerge, compiling all of the dependencies, only took on the order of 10 hours. Are your hard drives using DMA? Also, are you using '-pipe' in your CFLAGS? That causes the compiler to use UNIX pipes to control I/O between compiler pieces as opposed to temporary files -- much faster.
_________________
a^2 + b^2 = c^2
"To strive, to seek, to find, and not to yield." Tennyson
Back to top
View user's profile Send private message
mattboston
n00b
n00b


Joined: 02 May 2004
Posts: 7
Location: Quincy, MA

PostPosted: Thu May 06, 2004 12:48 pm    Post subject: Reply with quote

Finally done. Started Monday 8am, done Wednesday Noon. :(
Back to top
View user's profile Send private message
robmoss
Retired Dev
Retired Dev


Joined: 27 May 2003
Posts: 2634
Location: Jesus College, Oxford

PostPosted: Thu May 06, 2004 12:58 pm    Post subject: Reply with quote

Personally, I'm of the opinion that KDE is pretty much unusable on any machine that takes it longer than 12 hours to compile it, but then that's just me, I'm a speed freak! :twisted:

Hopefully, at some point in the dim, distant future, the KDE devs will finally realise that seeing as all their code is written in C++, and GCC 3.4.0 supports precompiled headers, they'll go the way of the QT devs and support such things, so it would only have taken you 5 or 6 hours...
_________________
Reality is for those who can't face Science Fiction.

emerge -U will kill your Gentoo
ecatmur, Lord of Portage Bash Scripts
Back to top
View user's profile Send private message
dyqik
Tux's lil' helper
Tux's lil' helper


Joined: 08 May 2003
Posts: 120
Location: Oxford, UK

PostPosted: Thu May 06, 2004 1:13 pm    Post subject: Reply with quote

You could try using ccache to cache various common compiled stuff

Code:

emerge ccache


and add

Code:

FEATURES="ccache"


to /etc/make.conf
Back to top
View user's profile Send private message
Nate_S
Guru
Guru


Joined: 18 Mar 2004
Posts: 414

PostPosted: Thu May 06, 2004 7:26 pm    Post subject: Reply with quote

BTW, what hardware are you on?
Back to top
View user's profile Send private message
StringCheesian
l33t
l33t


Joined: 21 Oct 2003
Posts: 887

PostPosted: Thu May 06, 2004 8:16 pm    Post subject: Reply with quote

Changing -O2 in your CFLAGS (in /etc/make.conf) to -Os seems to decrease compile time. It will also decrease app load time, but they may run a little slower after loading.

Also, adding -pipe to your CFLAGS will decrease compile time alot. It makes it so that source code and/or compiled binary files are cached in memory so they don't have to be re-read from the harddrive when they're needed again during compilation (or something like that).

Also, before emerging kde, try "emerge -pv kde" first. See if there are any packages you don't need or want, like kdetoys, or kdeaccessibility. Then emerge only the packages you want. But if you really need everything and the kitchen sink, go ahead and do "emerge kde".
Back to top
View user's profile Send private message
mattboston
n00b
n00b


Joined: 02 May 2004
Posts: 7
Location: Quincy, MA

PostPosted: Fri May 07, 2004 2:27 am    Post subject: Reply with quote

PII 300Mhz w/ 256 mb memory
Back to top
View user's profile Send private message
DarrenM
l33t
l33t


Joined: 25 Apr 2002
Posts: 653
Location: Sydney, Australia

PostPosted: Fri May 07, 2004 4:06 am    Post subject: Reply with quote

I'm surprised it took so long on that machine though the entire kde is pretty huge. Maybe it was running in swap and/or dma isn't enabled on your hdd.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
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