# Changing cpu, what else do I need to do?[Answered]

## calicoman

I am changing from a 2.4ghz Pentium4 to a 3.2ghz Pentium4 with hyper threading. Other than changing to SMP in the kernel, are there other things I have to do. I hope I don't have to recompile the entire tree, but if so....

Thanks in advance for help.Last edited by calicoman on Tue Mar 09, 2010 5:30 pm; edited 1 time in total

----------

## Rexilion

Well, if the new CPU represents new march options then a recompile is advised since you gain some new optimizations  :Smile:  . Furthermore, did you look at irqbalance (since your are using SMP now)?

----------

## calicoman

I have not installed the new processor yet. I just ordered it today and when it gets here I want to know what all I am going to have to do. So I am just getting ready.

 My current march is:

CFLAGS="-O2 -march=pentium4 -pipe"

and CHOST="i686-pc-linux-gnu".

Had not heard of irqbalance, but I will install it when I upgrade.

----------

## krinn

-march=native

So it will enable optimizations your new p4 have that the old one didn't have (like sse3 or things like that).

then rebuild your toolchain with new cpu & optimizations

emerge gcc && emerge glibc && emerge gcc 

irqbalance: you were certainly already using it even with a non-smp cpu, i suppose he was thinking about the cpu scheduler (and if you don't care, one will be choose auto when smp option will be pickup)

once your toolchain is clean & rebuild, you can wait later to rebuild anything else.

(But seriously, you're sure you will wait to rebuild programs? With the new speed and smp it will be too tempting)

----------

## Mad Merlin

A regular P4, not a Pentium D? That's just SMT, not SMP. You'll still see 2 cores in top, but don't expect more than a 5-10% performance boost (vs close to 100% with real SMP) with 2 threads instead of 1. For your kernel config you'll need to enable both SMP and SMT though.

----------

## Rexilion

 *krinn wrote:*   

> -march=native
> 
> So it will enable optimizations your new p4 have that the old one didn't have (like sse3 or things like that).
> 
> then rebuild your toolchain with new cpu & optimizations
> ...

 

Not sure, I mean this

----------

## calicoman

Thanks for the replies.

krinn - why not march=prescott? My /usr/share/portage/config/make.conf.examples does not show a march=native.

Yes, I will rebuild the both system and world.

----------

## krinn

it might be the same if you own a prescott cpu, native will just detect your cpu and enable flags that cpu can handle.

As long as your not using distcc/cross compiling or build binaries for another cpu, it's safe to use native and let gcc care for you about what flags you can enable.

http://www.gentoo.org/doc/en/gcc-optimization.xml?style=printable

see 2.3 section, or gcc manual.

make.conf.examples is an example, might be outdated or as i said, just an example, not something that should cover all cases.

----------

## calicoman

Thanks everyone for responding. This should take care of everything and I have put answered in the title.

----------

