LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Arch
User Name
Password
Arch This Forum is for the discussion of Arch Linux.

Notices


Reply
  Search this Thread
Old 11-20-2010, 04:52 AM   #1
TheStarLion
Member
 
Registered: Nov 2009
Location: UK
Distribution: Gentoo
Posts: 472

Rep: Reputation: 41
Makepkg CFLAGS and performance


With a little help from the ArchWiki page on makepkg.conf and a few Gentoo Wiki pages it linked to, I've found that recompiling certain packages with '-march=k8-sse3 -mtune=k8' (what '-march=native' gives me) has resulted in some things being more responsive or snappier.

So far I've seen noticible improvements in Firefox and to a lesser degree Wine.

It was suggested on the main IRC channel for Arch that recompiling the entire system using these CFLAGS in place of the default '-march=i686 -mtune=generic' might help, but was probably a bad idea or not really worth it.

So what I'm interested in is what packages might be worth recompiling with the new CFLAGS, or what ones might show some improvement with them instead.

I could also, in theory, move to x86_64, as the processor supports it. With less than 4GB of RAM on the system though, is it really worth it?
 
Old 11-20-2010, 06:28 AM   #2
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,994

Rep: Reputation: 76
If you want the maximum performance boost for the least amount of recompiling, then recompile the kernel and/or libc; these are used my most programs across the board and so should make the most noticeable difference.

Quote:
Originally Posted by TheStarLion View Post
I could also, in theory, move to x86_64, as the processor supports it. With less than 4GB of RAM on the system though, is it really worth it?
It depends on what you're doing, but it's generally still not a good idea to use 64-bit executables on systems with less that 4GB of RAM, unless you're doing something that would significantly benefit from a specific 64-bit extension, or run mathematical programs that use a lot of 64-bit variables (astronomical simulations spring to mind).

The problem is that your data variables get aligned on 8-byte (64-bit) boundaries instead of 4-byte, resulting in a lot of wasted memory space between variables. In turn, this means you're using memory less efficiently, and have less memory to use as a cache space, resulting in more direct disk I/O. This tends to wipe out any performance gain you get just from moving larger numbers around. Because you have less free memory, you may even find your system swapping more quickly, which very quickly causes performance problems. So I'd stick to 32-bit if I were you.

Hope that helps,

—Robert J Lee
 
Old 11-20-2010, 06:30 AM   #3
TheStarLion
Member
 
Registered: Nov 2009
Location: UK
Distribution: Gentoo
Posts: 472

Original Poster
Rep: Reputation: 41
Useful information, thanks.
At about what point after 4GB of RAM do the benefits start to out-weigh those issues?
 
  


Reply

Tags
cflags, makepkg, march, mtune, recompilation


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
makepkg rigelan Slackware 4 04-28-2009 07:12 PM
makepkg - 10.2 and/or 11.0 TL_CLD Slackware 2 10-10-2006 02:49 PM
anybody use makepkg? servnov Slackware 20 12-23-2005 03:27 PM
Makepkg Question Eklipz Slackware 5 11-12-2004 02:25 PM
makepkg? digital bots Linux - Newbie 0 10-21-2002 10:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Arch

All times are GMT -5. The time now is 03:42 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration