LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-12-2005, 03:04 PM   #1
spaceman27
LQ Newbie
 
Registered: Oct 2004
Location: Los Angeles
Distribution: Fedora Core 2
Posts: 15

Rep: Reputation: 0
GCC 3.3.3 SMP optimization


Hi,

I am running 2.6.10-1.771_FC2smp on a P43.2G machine with HT.

my c programs that run overnight seem to use only 50% of the system CPU (when i do a top). while the process CPU usage is listed as 100% (when i run m program only)


I was wondering if there are any GCC optimization that are specific to the SMP kernel?

if not i'll need to change my whole program to use 100% of the system CPU is it?


-Spaceman
 
Old 04-13-2005, 10:40 PM   #2
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 53
processes have what's called affinity for one cpu otherwise if scheduling changed cpu
there would be all kinds of undesirable mmu cache thrashing.

one thing to remember is you don't actually have two cpus so when it says 50% the other unused and idle cpu is "virtual" as in it doesn't really exist.

with that said using smp for some types of things like you describe does slow things down but not alot
i would say if you used a single processor kernel disabled ht in your bios the process in question would run no more than 5% faster.

you could pick up that 5% and double it by just recompiling your kernel with P4 optimization flags and keeping smp

smp and ht generally make things run better
 
Old 04-14-2005, 03:47 AM   #3
spaceman27
LQ Newbie
 
Registered: Oct 2004
Location: Los Angeles
Distribution: Fedora Core 2
Posts: 15

Original Poster
Rep: Reputation: 0
Thanks f00_bar_f00

I get what you are saying,
Could you point me towards specific p4 optimization flags in GCC? are there any details I could read up that is available?

Thanks for your reply,
-Spaceman
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
gcc compilation optimization (Intel Centrino) IamDaniel Linux - Software 7 07-06-2005 07:24 PM
GCC 3.4/3.3 Optimization Flags monohouse Linux - Software 0 10-28-2004 10:48 AM
gcc optimization flags: rules of thumb elyk Linux - Software 3 08-04-2004 11:49 PM
gcc multiple optimization levels ? Ikebo Programming 2 07-11-2004 11:26 PM
GCC Processor Optimization ? Tomasfuego Programming 1 12-20-2003 02:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:43 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