Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Tue Mar 23, 2004 8:21 pm 
Offline
Senior Newbie

Joined: Tue Mar 23, 2004 6:16 pm
Posts: 18
Location: Texas
Just setup a linode today and I'm currently using Gentoo (the only distro I know). I have a couple other Gentoo servers at home and work and the CFLAGS I've been using are
Code:
CFLAGS="-O3 -march=<whatever.arch.it.is> -fomit-frame-pointer -pipe"

Are there any CFLAGS I should use or avoid on my linode?
What about USE flags?


Top
   
 Post subject:
PostPosted: Tue Mar 23, 2004 10:17 pm 
Offline
Senior Member

Joined: Mon Nov 10, 2003 5:23 am
Posts: 57
AOL: aGoodBoy13
Location: Japan
This is what I've added to my make.conf file:

Code:
USE="apache2 cjk fam gd imagemagick imap maildir mysql sasl unicode -oss -alsa -apm -arts -avi -cups -encode -foomaticdb -gpm -gtk -gtk2 -imlib -kde -gnome -libg++ -mad -mikmod -motif -mpeg -oggvorbis -opengl -qt -quicktime -sdl -svga -truetype -X -xmms -xv"


I haven't changed the CFLAGS, and I'm not sure what I'd change them for anyway.



.

_________________
Programs that crash have been proven to be less useful than those that don't.
• Apple TechNote 117 •


Top
   
 Post subject:
PostPosted: Wed Mar 24, 2004 9:27 pm 
Offline
Senior Newbie

Joined: Tue Mar 23, 2004 6:16 pm
Posts: 18
Location: Texas
I'm no programmer so I don't really know what they all mean, but I think the CFLAGS have to do with compiler optimizations. Check out this thread from the Gentoo Forums. I was hoping someone might be able to recommend some CFLAGS that would be beneficial in a UML environment... cuz this stuff is all Greek to me.

Oh.. and from what I understand.. adding atleast "-fomit-frame-pointer" boosts performance or memory usage or something... and it's a pretty "safe" CFLAG to use, so why not? Anyone else have recommendations or advice?


Top
   
 Post subject: -O2
PostPosted: Thu Mar 25, 2004 3:56 am 
Offline
Senior Member
User avatar

Joined: Wed Mar 17, 2004 4:11 pm
Posts: 554
Website: http://www.unixtastic.com
Location: Europe
At home I use:

CFLAGS="-O2 -march=pentium3 -fprefetch-loop-arrays -pipe"

Although you most likely want -march=athlon-xp instead of -march=pentium3 on your linode.

-O3 often isn't faster than -O2. Try it and see.


Personally I would rather use debian on a linode. Gentoo may be a great system but it use a fair old amount of space for the portage tree.


Top
   
 Post subject:
PostPosted: Thu Mar 25, 2004 8:57 am 
Offline
Senior Member
User avatar

Joined: Fri Oct 24, 2003 3:51 pm
Posts: 965
Location: Netherlands
-fomit-frame-pointer disables the use of a CPU register as a frame pointer. Upside: having another register available makes software run faster (less frequent access to memory). Downside: stack trace debugging is disabled - but you probably don't care unless you are developing or seriously testing software on your Linode.

sednet wrote:
Although you most likely want -march=athlon-xp instead of -march=pentium3 on your linode.

Linodes are dual Xeon boxes so -march=pentium3 is presumably the way to go.

Tinkering with CFLAGS is a surprisingly easy way of building software that bombs in obscure circumstances. Unless you are doing something very unusual with your Linode, you will be I/O bound, not processor bound and I would stick with the defaults.


Top
   
 Post subject:
PostPosted: Thu Mar 25, 2004 9:55 am 
Offline
Senior Member

Joined: Mon Nov 10, 2003 5:23 am
Posts: 57
AOL: aGoodBoy13
Location: Japan
I would assume caker set some good defaults for the CFLAGS, so I have never looked into changing them...

The USE flags on the other hand could use some tweaking in the default setup. They are very desktop-centric, which is probably not what most people want/need from a Linode...

_________________
Programs that crash have been proven to be less useful than those that don't.

• Apple TechNote 117 •


Top
   
 Post subject:
PostPosted: Thu Mar 25, 2004 12:16 pm 
Offline
Senior Newbie

Joined: Tue Mar 23, 2004 6:16 pm
Posts: 18
Location: Texas
pclissold wrote:
Tinkering with CFLAGS is a surprisingly easy way of building software that bombs in obscure circumstances. Unless you are doing something very unusual with your Linode, you will be I/O bound, not processor bound and I would stick with the defaults.


Good point... I don't consider my CFLAGS to be overly aggressive so I think I'm fine for now... I don't plan to tinker with them anymore.

wazdog wrote:
I would assume caker set some good defaults for the CFLAGS, so I have never looked into changing them...

Actually, in my Gentoo setup I didn't notice any CFLAGS at all.


Top
   
 Post subject:
PostPosted: Thu Mar 25, 2004 1:04 pm 
Offline
Senior Member
User avatar

Joined: Fri Oct 24, 2003 3:51 pm
Posts: 965
Location: Netherlands
lurkus wrote:
Actually, in my Gentoo setup I didn't notice any CFLAGS at all.

CFLAGS are set in /etc/make.globals.

emerge info will tell you what your defaults are - my Linode gives CFLAGS="-O2 -mcpu=i686 -pipe" which is unchanged since distro install and pretty conservative.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


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

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group