8 core Mac Pro: Squeak and Croquet

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

8 core Mac Pro: Squeak and Croquet

Precedia
The following are some screenshots of the CPU monitor
(one bar per core) running Squeak and Croquet on the
latest 8 core Mac Pro.

It appears true that Tiger does elicit "core swapping"
behavior, the movement of threads between cores as they
execute. The performance monitor showed Squeak having two
threads, with activity on all 8 cores during normal operation
(except during one of the infinite loop tests), where the
core activity includes, of course, OS threads for window
management, etc.

This test was certainly not scientific.

With Squeak/Croquet riding atop 24 GHz of
64-bit compute power, plus the muscle of an ATI X1900
GPU, the text editing appears to go smoothly. ;-)

The core swapping issue may supposedly be altered in Leopard.
There is probably little performance degradation if the
thread stays on one quad-core chip with the shared L2 cache,
but if the thread moves to another quad-core chip, the
(instruction/data) cache contents need to be reloaded on the
second chip. The second Squeak infinite loop test appears
to show the main Squeak thread moving between two
quad-core chips.

I purchased this machine for 3D animation rendering. My
render software wonderfully takes advantage of all 8
cores, with some impressive performance gains.

Cheers,
Daniel

CPU core usage
==============

Squeak GUI activity:
        http://idisk.mac.com/iphone2007-Public/Squeak/squeak-8-core-01.jpg

        NOTE: Lots of dragging in a text view.

Squeak in an infinite loop:
        http://idisk.mac.com/iphone2007-Public/Squeak/squeak-8-core- 
infinite-02.jpg

        NOTE: Squeak is remaining on 1 core as nothing
        else happens on the system.

Squeak in an infinite loop (switching applications):
        http://idisk.mac.com/iphone2007-Public/Squeak/squeak-8-core- 
infinite-03.jpg

        NOTE: Squeak's infinite loop is moving between cores
        as I switch between applications.

Croquet GUI activity:
        http://idisk.mac.com/iphone2007-Public/Squeak/croquet.1.0.18-8-core.jpg

        NOTE: I was just walking around inside a space.

Reply | Threaded
Open this post in threaded view
|

RE: 8 core Mac Pro: Squeak and Croquet

J J-6
I'm a little confused here.  Are you running Squeak or Croquet with native
threads somehow?

Thanks,
Jason

>From: Daniel Lanovaz <[hidden email]>
>Reply-To: The general-purpose Squeak developers
>list<[hidden email]>
>To: [hidden email]
>Subject: 8 core Mac Pro: Squeak and Croquet
>Date: Sat, 21 Apr 2007 11:06:14 -0700
>
>The following are some screenshots of the CPU monitor
>(one bar per core) running Squeak and Croquet on the
>latest 8 core Mac Pro.
>
>It appears true that Tiger does elicit "core swapping"
>behavior, the movement of threads between cores as they
>execute. The performance monitor showed Squeak having two
>threads, with activity on all 8 cores during normal operation
>(except during one of the infinite loop tests), where the
>core activity includes, of course, OS threads for window
>management, etc.
>
>This test was certainly not scientific.
>
>With Squeak/Croquet riding atop 24 GHz of
>64-bit compute power, plus the muscle of an ATI X1900
>GPU, the text editing appears to go smoothly. ;-)
>
>The core swapping issue may supposedly be altered in Leopard.
>There is probably little performance degradation if the
>thread stays on one quad-core chip with the shared L2 cache,
>but if the thread moves to another quad-core chip, the
>(instruction/data) cache contents need to be reloaded on the
>second chip. The second Squeak infinite loop test appears
>to show the main Squeak thread moving between two
>quad-core chips.
>
>I purchased this machine for 3D animation rendering. My
>render software wonderfully takes advantage of all 8
>cores, with some impressive performance gains.
>
>Cheers,
>Daniel
>
>CPU core usage
>==============
>
>Squeak GUI activity:
> http://idisk.mac.com/iphone2007-Public/Squeak/squeak-8-core-01.jpg
>
> NOTE: Lots of dragging in a text view.
>
>Squeak in an infinite loop:
> http://idisk.mac.com/iphone2007-Public/Squeak/squeak-8-core- 
>infinite-02.jpg
>
> NOTE: Squeak is remaining on 1 core as nothing
> else happens on the system.
>
>Squeak in an infinite loop (switching applications):
> http://idisk.mac.com/iphone2007-Public/Squeak/squeak-8-core- 
>infinite-03.jpg
>
> NOTE: Squeak's infinite loop is moving between cores
> as I switch between applications.
>
>Croquet GUI activity:
> http://idisk.mac.com/iphone2007-Public/Squeak/croquet.1.0.18-8-core.jpg
>
> NOTE: I was just walking around inside a space.
>

_________________________________________________________________
Mortgage rates near historic lows. Refinance $200,000 loan for as low as
$771/month*
https://www2.nextag.com/goto.jsp?product=100000035&url=%2fst.jsp&tm=y&search=mortgage_text_links_88_h27f8&disc=y&vers=689&s=4056&p=5117


Reply | Threaded
Open this post in threaded view
|

Re: 8 core Mac Pro: Squeak and Croquet

johnmci

On Apr 27, 2007, at 12:25 PM, J J wrote:

> I'm a little confused here.  Are you running Squeak or Croquet with  
> native threads somehow?
>
> Thanks,
> Jason

Well on OS-X the mac carbon VM runs with at least  5 threads.  One  
thread is the UI and the squeak VM interpreter loop
The other 4 threads handle file I/O, sound I/O, socket I/O, desktop  
services, display I/O.

Thus when you send data to socket, write to a file, play sound, draw  
to the screen, and after the squeak VM thread has talked to the
host operating system api and the api is  happy with the data , the  
request is spun off to another native thread for processing.

Of course in this case in Croquet since it's doing Open/GL stuff the  
graphics work is done on other threads once
the open/GL completes whatever processing is required on the Squeak  
thread.   This allows of course on a mulitple processor
machine the ability for you to overlap drawing and I/O without  any  
involvement of the Squeak VM programmer.

So yes Squeak is running one thread for the Squeak VM, but many  
threads processing host operating system calls.

I'll note it was discussed on the VisualWorks mailing list that there  
is a large performance hit if you allow a process to switch from
one CPU core to another, which Daniel notes below. Windows provides  
an API call that allows you to mark an application to be dedicated
to a CPU core, but that led to more discussion about how this was not  
a good solution either. Really the Operating System Vendors need to
be a bit better in their process switching algorithms and ensure a  
restarted thread should restart on the same CPU core to  take  
advantage of
any existing cached bits.  This issue should not rely on special need  
cases hacked by any old programmer.

>
>> From: Daniel Lanovaz <[hidden email]>
>> Reply-To: The general-purpose Squeak developers list<squeak-
>> [hidden email]>
>> To: [hidden email]
>> Subject: 8 core Mac Pro: Squeak and Croquet
>> Date: Sat, 21 Apr 2007 11:06:14 -0700
>>
>> The following are some screenshots of the CPU monitor
>> (one bar per core) running Squeak and Croquet on the
>> latest 8 core Mac Pro.
>>
>> It appears true that Tiger does elicit "core swapping"
>> behavior, the movement of threads between cores as they
>> execute. The performance monitor showed Squeak having two
>> threads, with activity on all 8 cores during normal operation
>> (except during one of the infinite loop tests), where the
>> core activity includes, of course, OS threads for window
>> management, etc.
>>
>> This test was certainly not scientific.
>>
>> With Squeak/Croquet riding atop 24 GHz of
>> 64-bit compute power, plus the muscle of an ATI X1900
>> GPU, the text editing appears to go smoothly. ;-)
>>
>> The core swapping issue may supposedly be altered in Leopard.
>> There is probably little performance degradation if the
>> thread stays on one quad-core chip with the shared L2 cache,
>> but if the thread moves to another quad-core chip, the
>> (instruction/data) cache contents need to be reloaded on the
>> second chip. The second Squeak infinite loop test appears
>> to show the main Squeak thread moving between two
>> quad-core chips.
>>
>> I purchased this machine for 3D animation rendering. My
>> render software wonderfully takes advantage of all 8
>> cores, with some impressive performance gains.
>>
>> Cheers,
>> Daniel
>>
>> CPU core usage
>> ==============
>>
>> Squeak GUI activity:
>> http://idisk.mac.com/iphone2007-Public/Squeak/squeak-8-core-01.jpg
>>
>> NOTE: Lots of dragging in a text view.
>>
>> Squeak in an infinite loop:
>> http://idisk.mac.com/iphone2007-Public/Squeak/squeak-8-core- 
>> infinite-02.jpg
>>
>> NOTE: Squeak is remaining on 1 core as nothing
>> else happens on the system.
>>
>> Squeak in an infinite loop (switching applications):
>> http://idisk.mac.com/iphone2007-Public/Squeak/squeak-8-core- 
>> infinite-03.jpg
>>
>> NOTE: Squeak's infinite loop is moving between cores
>> as I switch between applications.
>>
>> Croquet GUI activity:
>> http://idisk.mac.com/iphone2007-Public/Squeak/croquet.1.0.18-8- 
>> core.jpg
>>
>> NOTE: I was just walking around inside a space.
>>
>
> _________________________________________________________________
> Mortgage rates near historic lows. Refinance $200,000 loan for as  
> low as $771/month* https://www2.nextag.com/goto.jsp?
> product=100000035&url=%
> 2fst.jsp&tm=y&search=mortgage_text_links_88_h27f8&disc=y&vers=689&s=40
> 56&p=5117
>
>

--
========================================================================
===
John M. McIntosh <[hidden email]>
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
========================================================================
===



Reply | Threaded
Open this post in threaded view
|

Re: 8 core Mac Pro: Squeak and Croquet

J J-6
From: John M McIntosh <[hidden email]>
>Reply-To: [hidden email],The general-purpose Squeak
>developers list<[hidden email]>
>To: The general-purpose Squeak developers
>list<[hidden email]>
>Subject: Re: 8 core Mac Pro: Squeak and Croquet
>Date: Fri, 27 Apr 2007 13:09:34 -0700
>
>So yes Squeak is running one thread for the Squeak VM, but many  threads
>processing host operating system calls.

Ah, cool.  Thanks for the info.

>I'll note it was discussed on the VisualWorks mailing list that there  is a
>large performance hit if you allow a process to switch from
>one CPU core to another, which Daniel notes below. Windows provides  an API
>call that allows you to mark an application to be dedicated
>to a CPU core, but that led to more discussion about how this was not  a
>good solution either. Really the Operating System Vendors need to
>be a bit better in their process switching algorithms and ensure a  
>restarted thread should restart on the same CPU core to  take  advantage of
>any existing cached bits.  This issue should not rely on special need  
>cases hacked by any old programmer.

My understanding was that, at least linux, associates a large penalty with
swapping CPU's so that it generally wouldn't happen unless it would be worth
the time hit.

_________________________________________________________________
Get a FREE Web site, company branded e-mail and more from Microsoft Office
Live! http://clk.atdmt.com/MRT/go/mcrssaub0050001411mrt/direct/01/