# The world of SMP. [SOLVED]

## justincataldo

I'm looking at delving into the world of Symmetric Multi Processing.

At the moment I have a Pentium III 800MHz. I'm not sure what socket it is... but I think it is the same as this one.

cat /proc/cpuinfo tells me this:

```

processor       : 0

vendor_id       : GenuineIntel

cpu family      : 6

model           : 8

model name      : Pentium III (Coppermine)

stepping        : 6

cpu MHz         : 803.854

cache size      : 256 KB

fdiv_bug        : no

hlt_bug         : no

f00f_bug        : no

coma_bug        : no

fpu             : yes

fpu_exception   : yes

cpuid level     : 2

wp              : yes

flags           : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pat pse36 mmx fxsr sse

bogomips        : 1572.86

```

My question is, if I buy another identical CPU (from Ebay or whatever) and get hold of a dual CPU board, will they work?

I know that AMD clued onto the fact that people were using the dual XP CPUs so they bought out the MP versions (but some people got around that by modding the XPs). But what is the go with the good old Pentium II's and Pentium III's? If you get two chips of the same speed can they be used together?

I see on Ebay that you can get a "matched set" of dual CPUs. Is this worth the effort?

I'd love to have a dual Xeon system... but I don't wanna spend that kind of money. Hehe.Last edited by justincataldo on Sun Aug 21, 2005 11:30 pm; edited 1 time in total

----------

## neysx

To the best of my knowledge, there's no XP/MP-style modding as far as the Pentium III is concerned.

I would recommend using same speed & same stepping.

```
# cat /proc/cpuinfo                                                     

processor       : 0

vendor_id       : GenuineIntel

cpu family      : 6

model           : 8

model name      : Pentium III (Coppermine)

stepping        : 3

cpu MHz         : 808.141

cache size      : 256 KB

fdiv_bug        : no

hlt_bug         : no

f00f_bug        : no

coma_bug        : no

fpu             : yes

fpu_exception   : yes

cpuid level     : 2

wp              : yes

flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr sse

bogomips        : 1585.15

processor       : 1

vendor_id       : GenuineIntel

cpu family      : 6

model           : 8

model name      : Pentium III (Coppermine)

stepping        : 3

cpu MHz         : 808.141

cache size      : 256 KB

fdiv_bug        : no

hlt_bug         : no

f00f_bug        : no

coma_bug        : no

fpu             : yes

fpu_exception   : yes

cpuid level     : 2

wp              : yes

flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr sse

bogomips        : 1613.82
```

Hth

----------

## justincataldo

So you mean that no modding is required for Pentium III's? They should just work so long as they have the same speed and stepping?

----------

## Jake

 *justincataldo wrote:*   

> So you mean that no modding is required for Pentium III's? They should just work so long as they have the same speed and stepping?

 

That's been my experience mixing and matching CPUs for a few NetServers, although I never paid attention to the stepping and always matched speeds. I'd be more worried about having the right VRMs if the board you pick out needs them.

----------

## justincataldo

Cool stuff - so I just need a matching CPU and a dual socket board to suit. Sounds pretty managable.

What sort of performance increase can I expect? Will it essentially be doubled?

----------

## Antimatter

 *justincataldo wrote:*   

> Cool stuff - so I just need a matching CPU and a dual socket board to suit. Sounds pretty managable.
> 
> What sort of performance increase can I expect? Will it essentially be doubled?

 

It depends on what application you are using, and if they support multi-threading.

----------

## kueitao

 *Antimatter wrote:*   

>  *justincataldo wrote:*   Cool stuff - so I just need a matching CPU and a dual socket board to suit. Sounds pretty managable.
> 
> What sort of performance increase can I expect? Will it essentially be doubled? 
> 
> It depends on what application you are using, and if they support multi-threading.

 

It doesn't matter too much whether or not you use applications that support multithreading. 

First above all, your kernel will be compiled with SMP activated and will run its own threads on different processors and that is good.

Second, you have always more than a few user applications running on your Linux box and even if they don't use multi-threading they will be distributed over all your CPUs. 

A kernel routine named load_balance() (in linux-2.6.x/kernel/sched.c) is frequently invoked by the scheduler to check the current CPU to ensure it is balanced within its domain. This routine will attempt to move tasks to another CPU if there is an imbalance. 

I won't go into details here. It means that you may have your browser running in CPU0 and your email client running on CPU1.

What's more is that you may find that a multi-threading process has all its threads running on the same CPU while other single threaded processes run on the other CPU. Quite often this is the best choice a scheduler could make for preventing "cache-misses" and synchronization between threads running on different processors.

What I mean is that for example you are running a double thread user process plus two other single threads user processes (in total 4 threads) you may be quite sure that the scheduler will leave the first process on a single CPU and move the other two single thread processes to another CPU. This is the most efficient configuration, because threads in a process share a lot of data that can be maintained on the memory cache of the single CPU they are executing.

For what concerns the amount of performance increase it will never double. You must consider that the kernel compiled for SMP is larger and it starts a lot of syncronization features that aren't necessary when you compile for a single CPU box. Anyway this overhead is minimum and it is well counter-balanced by the power of using a double CPU machine.

I suppose you can expect an overhead penality ranging from 5% to 15% so you will enjoy a performance increase of about 90% or even more.

Cheers.

----------

## justincataldo

 *kueitao wrote:*   

> 
> 
> I suppose you can expect an overhead penality ranging from 5% to 15% so you will enjoy a performance increase of about 90% or even more.
> 
> 

 

Excellent!

I decided if I wanted to do this I was going to do this right, so I just bought Dual Intel Xeon 1.7GHz from Ebay.  :Smile: 

Once I get a board and some ECC RAM I'll be good to go.

So apart from compiling SMP support into the kernel, is there anything else I need to do?

Which Gentoo CD do I need?  x86?  I was going to install from a Minimal Install Disc, but will this allow me to use an SMP kernel?

----------

## kueitao

 *justincataldo wrote:*   

>  *kueitao wrote:*   
> 
> I suppose you can expect an overhead penality ranging from 5% to 15% so you will enjoy a performance increase of about 90% or even more.
> 
>  
> ...

 

Why did you buy two Xeon 1.7GHz? There are more modern and powerful ones.

If you can recede from buying them I would suggest you to purchase two Xeon Prestonia choosing among 2000 to 3060 MHz, fronbus 533 MHz / 4.2 GB/s, 8K L1 data + 12 k L1 instruction and 512 kB L2, Socket 604. There are newer and more powerful ones too, but at least I strongly suggest to buy that above-mentioned Prestonia.

If you don't absolutely need ECC RAM, buy a good quantity (0.5GB to 1.0GB) of regular DDR2 RAM. Choose DDR-333 (PC-2700) or superior ones. You should save some money switching from ECC to the last one I mentioned and that could make you able to buy some more bytes.

For what kernel configuration is concerned, just enable "Symmetric multiprocessing support", "Maximum number of CPUs" and "Enable kernel irq balancing" . All the other options are not strictly linked to that feature. I don't remember if Xeon are hyperthreaded, maybe not. If yes enable also "SMT (Hyperthreading) scheduler support".

Enjoy your new box.

Cheers.

----------

## justincataldo

 *kueitao wrote:*   

> Why did you buy two Xeon 1.7GHz? There are more modern and powerful ones.

 

Because they were cheap.  :Smile: 

Plus, the Tyan Tiger i7500 board I just got will be able to handle up to dual 3.0GHz Xeons, so in a few years time when they are cheap I'll upgrade to some of those. So long as they are socket 603 which is what the board requires...

 *kueitao wrote:*   

> 
> 
> If you don't absolutely need ECC RAM, buy a good quantity (0.5GB to 1.0GB) of regular DDR2 RAM. Choose DDR-333 (PC-2700) or superior ones. You should save some money switching from ECC to the last one I mentioned and that could make you able to buy some more bytes.
> 
> 

 

It requires at least two dimms of Reg ECC PC2100. So I guess I'll get 1GB.

 *kueitao wrote:*   

> 
> 
> For what kernel configuration is concerned, just enable "Symmetric multiprocessing support", "Maximum number of CPUs" and "Enable kernel irq balancing" . All the other options are not strictly linked to that feature. I don't remember if Xeon are hyperthreaded, maybe not. If yes enable also "SMT (Hyperthreading) scheduler support".

 

Ok then. I don't know if the 1.7's support hyperthreading... does anyone else know?

 *kueitao wrote:*   

> 
> 
> Enjoy your new box.
> 
> 

 

I'm sure I will.  :Smile: 

----------

## justincataldo

I've got my dual 1.7GHz Xeons up and running now. They're awesome! The load balancing is just poetry and everything compiles so fast!

Now I just have to learn how to code C++ to make use of SMP...  :Cool: 

----------

## bollucks

 *justincataldo wrote:*   

> I've got my dual 1.7GHz Xeons up and running now. They're awesome! The load balancing is just poetry and everything compiles so fast!
> 
> Now I just have to learn how to code C++ to make use of SMP... 

 

You can write multithreaded software in just about any language, not just C++

----------

