LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   GCC 3.3.3 SMP optimization (https://www.linuxquestions.org/questions/linux-general-1/gcc-3-3-3-smp-optimization-312509/)

spaceman27 04-12-2005 03:04 PM

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

foo_bar_foo 04-13-2005 10:40 PM

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

spaceman27 04-14-2005 03:47 AM

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


All times are GMT -5. The time now is 06:00 PM.