You are not logged in.

#1 2013-03-18 01:39:34

timxx
Member
Registered: 2013-03-18
Posts: 4

Why gcc compile so slow on Arch?

That's a big project, it takes about 30 mins compile by "make -j4" on Ubuntu.
Compare to Ubuntu, Arch take more 20 mins compile time!

The only different thing is Arch installed in SSD (project code too), Ubuntu in traditional disk.
Due to the project can't compile with 64bit system, Arch and Ubuntu all is 32bit OS.

The Arch already installed PAE kernel from AUR.

Anyone can help? Thanks in advance and sorry for my bad English.

Offline

#2 2013-03-18 03:38:58

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Why gcc compile so slow on Arch?

Are you compiling using the same processor? Are you doing anything else at the same time apart from compiling on this computer?
On Arch, are you compiling using 'make -j4' or are you using makepkg and a PKGBUILD?

Offline

#3 2013-03-18 03:47:23

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,642

Re: Why gcc compile so slow on Arch?

Moved to Pacman and Package Upgrade Issues


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#4 2013-03-18 03:48:13

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,727

Re: Why gcc compile so slow on Arch?

And what build flags are you using (specifically optimizations):

Offline

#5 2013-03-18 04:04:06

timxx
Member
Registered: 2013-03-18
Posts: 4

Re: Why gcc compile so slow on Arch?

karol wrote:

Are you compiling using the same processor? Are you doing anything else at the same time apart from compiling on this computer?
On Arch, are you compiling using 'make -j4' or are you using makepkg and a PKGBUILD?

I'm quit sure using 'make -j4' both on Ubuntu and Arch, and of course the same computer.

I'm not using makepkg because we don't support yet currently .

I've tried several times to compare build time, not occasionally.

The project's build system is CMake, I don't think cmake is the problem.

Offline

#6 2013-03-18 11:00:54

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: Why gcc compile so slow on Arch?

Try the vanilla kernel without PAE and see if it is faster, then optimize the PAE PKGBUILD.

Offline

#7 2013-03-18 11:02:30

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: Why gcc compile so slow on Arch?

I would speculate that the -j4 isn't taking effect.

How does "-j1" compare to "-j4", especially in your Arch?

Offline

#8 2013-03-18 12:04:00

timxx
Member
Registered: 2013-03-18
Posts: 4

Re: Why gcc compile so slow on Arch?

Awebb wrote:

Try the vanilla kernel without PAE and see if it is faster, then optimize the PAE PKGBUILD.

Without PAE, it take about 10 mins less than PAE kernel. But still a bit slow.

Anyway, how to optimize the PAE PKGBUILD?
I tried to change makepkg.conf FLAGS -march=i686 to -march=native,  but nothing change.

Offline

#9 2013-03-18 12:09:35

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: Why gcc compile so slow on Arch?

You should have a look at the Ubuntu patches applied at the kernel, maybe some of them are responsible for boosting PAE. You should also try the same scenario with another distribution (Fedora for example) to see, if Arch is especially slow or Ubuntu fast. Also compare the patches applied to the compiler.

Offline

#10 2013-03-18 13:54:08

timxx
Member
Registered: 2013-03-18
Posts: 4

Re: Why gcc compile so slow on Arch?

Awebb wrote:

You should have a look at the Ubuntu patches applied at the kernel, maybe some of them are responsible for boosting PAE. You should also try the same scenario with another distribution (Fedora for example) to see, if Arch is especially slow or Ubuntu fast. Also compare the patches applied to the compiler.

Thanks, I'll try tomorrow

Offline

Board footer

Powered by FluxBB