View previous topic :: View next topic |
Author |
Message |
mattboston n00b
Joined: 02 May 2004 Posts: 7 Location: Quincy, MA
|
Posted: Tue May 04, 2004 2:38 am Post subject: Ideas for compiling faster |
|
|
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 |
|
|
Gil-galad55 Tux's lil' helper
Joined: 02 Feb 2004 Posts: 101
|
Posted: Tue May 04, 2004 3:04 am Post subject: |
|
|
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 |
|
|
mattboston n00b
Joined: 02 May 2004 Posts: 7 Location: Quincy, MA
|
Posted: Tue May 04, 2004 6:35 pm Post subject: |
|
|
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 |
|
|
Gil-galad55 Tux's lil' helper
Joined: 02 Feb 2004 Posts: 101
|
Posted: Tue May 04, 2004 6:45 pm Post subject: |
|
|
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 |
|
|
mattboston n00b
Joined: 02 May 2004 Posts: 7 Location: Quincy, MA
|
Posted: Thu May 06, 2004 12:48 pm Post subject: |
|
|
Finally done. Started Monday 8am, done Wednesday Noon. |
|
Back to top |
|
|
robmoss Retired Dev
Joined: 27 May 2003 Posts: 2634 Location: Jesus College, Oxford
|
Posted: Thu May 06, 2004 12:58 pm Post subject: |
|
|
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!
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 |
|
|
dyqik Tux's lil' helper
Joined: 08 May 2003 Posts: 120 Location: Oxford, UK
|
Posted: Thu May 06, 2004 1:13 pm Post subject: |
|
|
You could try using ccache to cache various common compiled stuff
and add
to /etc/make.conf |
|
Back to top |
|
|
Nate_S Guru
Joined: 18 Mar 2004 Posts: 414
|
Posted: Thu May 06, 2004 7:26 pm Post subject: |
|
|
BTW, what hardware are you on? |
|
Back to top |
|
|
StringCheesian l33t
Joined: 21 Oct 2003 Posts: 887
|
Posted: Thu May 06, 2004 8:16 pm Post subject: |
|
|
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 |
|
|
mattboston n00b
Joined: 02 May 2004 Posts: 7 Location: Quincy, MA
|
Posted: Fri May 07, 2004 2:27 am Post subject: |
|
|
PII 300Mhz w/ 256 mb memory |
|
Back to top |
|
|
DarrenM l33t
Joined: 25 Apr 2002 Posts: 653 Location: Sydney, Australia
|
Posted: Fri May 07, 2004 4:06 am Post subject: |
|
|
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 |
|
|
|