You are not logged in.

#1 2009-09-14 23:58:13

B4RR13N705
Member
Registered: 2009-06-08
Posts: 87

How to optimize building from source.

Hi, ive read about MAKE options to optimize the package youre building, like "-march, -O3, -pipe and -fomit-frame-pointer"
Is there another ways to improve package speed and optimize?


OS -----> Arch Linux     DE -----> KDE4
CPU ---> 2.66GHz         RAM ---> 512 MB
SWAP -> 2 G                / -------> 10 G
/home -> 50 G             /boot ---> 64 MB

Offline

#2 2009-09-15 07:22:14

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: How to optimize building from source.

http://wiki.archlinux.org/index.php/Pos … r_packages
http://wiki.archlinux.org/index.php/ABS

I don't think rebuilding all your packages w/ optimized flags will really show you a noticeable difference though.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#3 2009-09-15 07:57:04

flamelab
Member
From: Athens, Hellas (Greece)
Registered: 2007-12-26
Posts: 2,160

Re: How to optimize building from source.

http://bbs.archlinux.org/viewtopic.php? … 88#p619088

wink

Don't put -o3, it will propably create a bigger binary and no better performance.

Last edited by flamelab (2009-09-15 07:57:39)

Offline

#4 2009-09-15 08:48:22

sHyLoCk
Member
From: /dev/null
Registered: 2009-06-19
Posts: 1,197

Re: How to optimize building from source.

What is ur CPU? march=native is in general a nice config. I use "-O2 march=prescott mtune=generic -pipe -fomit-frame-pointer"
Remember it also depends on whether you are building a 32 or 64bit OS.


~ Regards,
sHy
ArchBang: Yet another Distro for Allan to break.
Blog | GIT | Forum (。◕‿◕。)

Offline

#5 2009-09-15 08:56:28

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: How to optimize building from source.

I use "march=native -Os -pipe"

Setting mtune=generic does only make sense, if you want to use this package on other systems too

Offline

#6 2009-09-15 15:29:19

B4RR13N705
Member
Registered: 2009-06-08
Posts: 87

Re: How to optimize building from source.

Im running an Intel Pentium D i686 32 Bits.


OS -----> Arch Linux     DE -----> KDE4
CPU ---> 2.66GHz         RAM ---> 512 MB
SWAP -> 2 G                / -------> 10 G
/home -> 50 G             /boot ---> 64 MB

Offline

#7 2009-09-15 15:48:44

Crows
Member
From: Wales
Registered: 2008-09-05
Posts: 92

Re: How to optimize building from source.

B4RR13N705 wrote:

Im running an Intel Pentium D i686 32 Bits.

You may be running a 32-bit kernel, but your CPU is capable of running 64-bit code. That in itself doesn't really matter, though.

My opinion:

-O2 -march=native -pipe

Is just fine. If you're using an older version of GCC, before they added native, then you can use march=nocona instead.

I'm also fairly certain that mtune is only useful for compatibility between systems, too.

Offline

#8 2009-09-15 18:57:18

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: How to optimize building from source.

...has anyone out there rebuilt their packages w/ optimized flags?  Isn't this a gentoo thing?


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#9 2009-09-15 19:19:26

Crows
Member
From: Wales
Registered: 2008-09-05
Posts: 92

Re: How to optimize building from source.

graysky wrote:

...has anyone out there rebuilt their packages w/ optimized flags?  Isn't this a gentoo thing?

Mostly I agree with you. If I'm building from AUR I'll obviously use the ops (why not?), but otherwise flags like this are mostly just placebos. It'll only ever be slightly faster at best, and likely that's only in benchmarks.

Offline

#10 2009-09-16 08:05:38

ugkbunb
Member
Registered: 2009-02-26
Posts: 227

Re: How to optimize building from source.

bangkok_manouel wrote:

I'm surprised no one's using the new graphite branch loop optimizations:

-floop-interchange -floop-strip-mine -floop-block (See http://gcc.gnu.org/gcc-4.4/changes.html)

Using this since GCC4.4 was pushed in [TESTING], no build problems at all. Of course, the performance gain is >>!*HUGE*!<< but won't be noticed by any human being. ;-)

Found this in another thread... not sure how sarcastic he is being... is it worth using those optimizations?

Offline

#11 2009-09-16 08:11:35

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,356

Re: How to optimize building from source.

Uh... sarcasm meter is hitting the roof here.

Then again, this is the internet. *Nobody* writes sarcastically, especially with such important things as build optimizations in a binary distribution.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

Board footer

Powered by FluxBB