Dual CPU problem?

Dual CPU problem?

Post by Christian Golt » Tue, 23 Jul 1996 04:00:00



Dear Everybody,

by dual cpu I mean two processors.
Does any app automatically take advantage of dual cpus under Solaris2.5?
Could it on the contrary be that an app becomes even slower when not
made for dual cpus and run on a dual cpu machine?
I know this can happen with dual Pentium and NT.

Any hints appreciated,
sincerely,
--
Dr. Christian Goltz
Institut fuer Geophysik, Universitaet Kiel
Olshausenstr. 40-60, D-24118 Kiel, Germany
Tel. +49-431-880-3881, Fax -4432

 
 
 

Dual CPU problem?

Post by Bryan O'Sulliv » Tue, 23 Jul 1996 04:00:00



c> Does any app automatically take advantage of dual cpus under
c> Solaris2.5?

Some do.

c> Could it on the contrary be that an app becomes even slower when
c> not made for dual cpus and run on a dual cpu machine?

This is very unlikely.

        <b

--
Let us pray:
What a Great System.
Please Do Not Crash.


 
 
 

Dual CPU problem?

Post by Andy Tucke » Wed, 24 Jul 1996 04:00:00



> I don't think SunOS or Solaris has a smart process queue,
> where the process would give up its position in front of the
> queue if the free CPU is not the one it ran last on.
> The scheduler as I know it works on a round robin.

The Solaris scheduler (as of 2.2) has per-processor run queues,
where processes are preferentially scheduled onto the last
processor on which they ran, if they ran on that processor
within a short period of time.  If a process blocks or is
preempted for a longer period of time, it is assumed that any
previously cached data (its "affinity" for the processor) has been
replaced and the process may be scheduled onto another processor
to improve load balancing.  Also, if one processor is idle and
another has more than one process waiting to run, the idle
processor may "steal" processes from the busy one.

Temporary loads can sometimes cause a process to migrate between
processors on a lightly loaded system, since the process may be
preempted and either lose its affinity for the processor or be
stolen by another idle processor.

This doesn't necessarily mean that a single-threaded process
will always run as fast on an MP as a UP.  Details of application
behavior, bus latency, additional scheduler overhead, etc. come
into play.  But if you have a CPU-bound application that
frequently switches processors on an unloaded system running a
recent release of Solaris I'd like to see it.

--
Andy Tucker

Solaris Kernel Development
I speak only for myself, not SunSoft or Sun Microsystems.

 
 
 

Dual CPU problem?

Post by Ling Wan » Wed, 24 Jul 1996 04:00:00





> l> Because a program running in an SMP environment could run on any
> l> CPU, 50% of the time, one would run on an different CPU than the
> l> last time the program was on queue.

> A process will generally stay on a particular CPU for long enough to
> bring the cache hit rate up to something useful, so it turns out that
> single-threaded programs do not, in general, run more slowly on
> multiprocessors.

I did various single threaded tests which basically allocates
about enough memory from a few K to just about what would fit
onto a TMS390Z55 1M cache, and did various operations on it.
Running it on SS10/40, 50, 51, 512, 61.
It turns out the test result on the 512 is the
least consistant.  On the 51 and 61, the peak speed is
achieved with memory allocation of pretty much up to 1M,
which turned out to be ~50-60Mflops.
On 512's sometimes, I hit full thruput, other times
it is not much faster than a SS10/50, which would average
around 12Mflops on big sizes.
Because the penalty for a cache miss is so much greater
than a cache hit, even a cache miss of a few percent more
will increase execution time by a factor or two.

Run mps and you would see the process jumping back and forth
between processors.
Run mpstat and you have CPU utilization of ~50% each, verifying
that the process is randomly distributed.
I don't think SunOS or Solaris has a smart process queue,
where the process would give up its position in front of the
queue if the free CPU is not the one it ran last on.
The scheduler as I know it works on a round robin.

 
 
 

Dual CPU problem?

Post by Ling Wan » Wed, 24 Jul 1996 04:00:00





> c> Does any app automatically take advantage of dual cpus under
> c> Solaris2.5?

> Some do.

> c> Could it on the contrary be that an app becomes even slower when
> c> not made for dual cpus and run on a dual cpu machine?

> This is very unlikely.

It definitely might become slower.
Because a program running in an SMP environment could run
on any CPU, 50% of the time, one would run on an different
CPU than the last time the program was on queue.
This invalidates all recent cache entries and memory
prefetches done by the other CPU.  Since no machine has
a shared cache arch, and Vikings does not utilize write-copy
or read-copy cache, For a SS20 512, you end up running at speeds
closer to a 50 than a 51.
 
 
 

Dual CPU problem?

Post by Bryan O'Sulliv » Wed, 24 Jul 1996 04:00:00



l> Because a program running in an SMP environment could run on any
l> CPU, 50% of the time, one would run on an different CPU than the
l> last time the program was on queue.

A process will generally stay on a particular CPU for long enough to
bring the cache hit rate up to something useful, so it turns out that
single-threaded programs do not, in general, run more slowly on
multiprocessors.

        <b

--
Let us pray:
What a Great System.
Please Do Not Crash.

 
 
 

Dual CPU problem?

Post by Stephan Neuha » Thu, 25 Jul 1996 04:00:00




Quote:> I did various single threaded tests which basically allocates
> about enough memory from a few K to just about what would fit
> onto a TMS390Z55 1M cache, and did various operations on it.

AFAIR, the caches on the SuperSparc processor series are
direct mapped.  Did you take that into account?  With the
wrong memory access pattern, you'll have a cache miss every
time you access some memory.

Just a thought,

Stephan
--
To err is human; to really * things up requires the root password

 
 
 

Dual CPU problem?

Post by Alan L. Stang » Fri, 26 Jul 1996 04:00:00


Post the code!  Let's do some tests.

-- Alan





> > > I did various single threaded tests which basically allocates
> > > about enough memory from a few K to just about what would fit
> > > onto a TMS390Z55 1M cache, and did various operations on it.

> > AFAIR, the caches on the SuperSparc processor series are
> > direct mapped.  Did you take that into account?  With the
> > wrong memory access pattern, you'll have a cache miss every
> > time you access some memory.

> > Just a thought,

> Didn't take that into account.
> I just saw the numbers.
> On 4.1.3
> SS10-40/51/61 gave consistent numbers of ~12/50/60mflops
> SS10-512 Gave wildly varying numbers of ~12-45mflops

--

 
 
 

Dual CPU problem?

Post by Ling Wan » Fri, 26 Jul 1996 04:00:00





> > I did various single threaded tests which basically allocates
> > about enough memory from a few K to just about what would fit
> > onto a TMS390Z55 1M cache, and did various operations on it.

> AFAIR, the caches on the SuperSparc processor series are
> direct mapped.  Did you take that into account?  With the
> wrong memory access pattern, you'll have a cache miss every
> time you access some memory.

> Just a thought,

Didn't take that into account.
I just saw the numbers.
On 4.1.3
SS10-40/51/61 gave consistent numbers of ~12/50/60mflops
SS10-512 Gave wildly varying numbers of ~12-45mflops
 
 
 

Dual CPU problem?

Post by Glenn Weinbe » Sat, 27 Jul 1996 04:00:00



Quote:>On 4.1.3
>SS10-40/51/61 gave consistent numbers of ~12/50/60mflops
>SS10-512 Gave wildly varying numbers of ~12-45mflops

If the SS10-512 numbers are from 4.1.3 as well (it's hard to tell for sure
what you meant above), I'm hardly surprised.

Try it on Solaris 2.5.1 and see what happens.

        Regards,

        Glenn
---

Eng. Mgr., Solaris Migration Team    http://www.sun.com/smcc/solaris-migration/
Opinions expressed above should not be construed as representing any position,
official or unofficial, of SMCC or Sun Microsystems, Inc.

 
 
 

Dual CPU problem?

Post by Bryan O'Sulliv » Tue, 30 Jul 1996 04:00:00



l> I read some antique usenix with a paper by some sun guy talking
l> about different impletementations of the scheduler besides the
l> round robin method.  I am surprised it took sun that long to
l> actually implement it.

What makes you think it took Sun a long time to implement the features
discussed in that paper?

        <b

--
Let us pray:
What a Great System.
Please Do Not Crash.

 
 
 

Dual CPU problem?

Post by Andy Tucke » Tue, 30 Jul 1996 04:00:00





> > >On 4.1.3
> > >SS10-40/51/61 gave consistent numbers of ~12/50/60mflops
> > >SS10-512 Gave wildly varying numbers of ~12-45mflops

> > If the SS10-512 numbers are from 4.1.3 as well (it's hard to tell for sure
> > what you meant above), I'm hardly surprised.

> The original thread is about SunOS and multiprocessing

Actually, the original post referred to Solaris 2.5 (SunOS 5.5).

Quote:> And I said SunOS with multiple CPU's might even
> be slower because the round robin scheduler does not
> send a process to it's last exec'd CPU in order to
> preserve the cached data from there.

True for SunOS 4.x, not for 5.x.

Quote:> > Try it on Solaris 2.5.1 and see what happens.

> I read some antique usenix with a paper by some sun guy
> talking about different impletementations of the scheduler
> besides the round robin method.  I am surprised it
> took sun that long to actually implement it.

It was implemented long ago.  Try 2.3 if you prefer, or 2.2 if you
can find a system still running it.

--
Andy Tucker

Solaris Kernel Development
I speak only for myself, not SunSoft or Sun Microsystems.

 
 
 

Dual CPU problem?

Post by Ling Wan » Tue, 30 Jul 1996 04:00:00




> >On 4.1.3
> >SS10-40/51/61 gave consistent numbers of ~12/50/60mflops
> >SS10-512 Gave wildly varying numbers of ~12-45mflops

> If the SS10-512 numbers are from 4.1.3 as well (it's hard to tell for sure
> what you meant above), I'm hardly surprised.

The original thread is about SunOS and multiprocessing
And I said SunOS with multiple CPU's might even
be slower because the round robin scheduler does not
send a process to it's last exec'd CPU in order to
preserve the cached data from there.

Quote:> Try it on Solaris 2.5.1 and see what happens.

I read some antique usenix with a paper by some sun guy
talking about different impletementations of the scheduler
besides the round robin method.  I am surprised it
took sun that long to actually implement it.
 
 
 

Dual CPU problem?

Post by Ling Wan » Tue, 30 Jul 1996 04:00:00



> Post the code!  Let's do some tests.

Write your own.
how hard is it to write:

Iterate thru 10k-2M
 Allocate the memory
  Do some CPU ops with that memory X times
 end
end

Anyway.  Now I only have solaris, so a compiler is not readily
available to compile anything.

 
 
 

Dual CPU problem?

Post by Griff Mill » Wed, 31 Jul 1996 04:00:00





>> Post the code!  Let's do some tests.

>Write your own.
>how hard is it to write:

Why not post yours and save us all the time? Is it proprietary or
something?

Quote:>Iterate thru 10k-2M
> Allocate the memory
>  Do some CPU ops with that memory X times
> end
>end

>Anyway.  Now I only have solaris, so a compiler is not readily
>available to compile anything.

There's gcc. Works great.

--
Griff Miller                         "Keep my mind on higher things; keep my
Systems Administrator   '95 Z-28      mind on truth."
Positron Corporation    '85 VF1100S

 
 
 

1. tyan 1662D Natoma 4.0e Dual CPU problems

I've installed a New evaluation BIOS on my Tyan TITAN PRO 1662D motherboard
and even though the BIOS recognises 2 CPUs Linux no longer does.

I know that my kernel is SMP because the 3.03 bios worked fine,  
unfortunately the 3.03 bios does not allow me to boot from my SCSI harddisk.

It comes up with the error message:

Booting CPU 1 stack 00002000: Not responding
Error only 1 cpu detected.

and drops out of SMP mode.

I thought this would be a problem with the BIOS but have been informed
(in the Tyan NG) that other SMP os's do not have this problem.

Anyone had the experience?
Or any SMP kernel hackers want to do some debugging?

--
-- mark heath - Unix System Programmer/Engineer - Netspace Online Systems.  
-- http://www.netspace.net.au/                        [Personal /~mheath]
-- Linux:      The only software that fixes all the problems with Windows
:wq

2. Solaris 2.5.1 NIS client with a RedHat Enterprise ES release 3 NIS master..

3. Dual CPU Problem - IBM PC365

4. Using lfu

5. Dual cpu problem

6. The Java story... or how to right a good Unix utility?

7. PROBLEM: Dual (2) AMD ATHLON MP 1900+ CPUs gives APIC error on CPU[0]: 00(02)

8. Can't mount NFS volume on RH7.2

9. dual cpu motherboard for Red Hat Linux 6.2 on X86 cpu

10. High system CPU% in dual CPU System

11. dual cpu vs single cpu for apache

12. dual cpu act like a 4 cpu (intel SE7500CW2)

13. 2 single CPU mother board and one dual-CPU mother board