Squeak on the PlayStation 3

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

Squeak on the PlayStation 3

Aaron Reichow
Hello everyone-

I just had a quick question- does anyone here have a PlayStation 3?  
If so, have you tried running Squeak? You do have to install it  
yourself, but it can be done without a modchip or anything else DMCA-
breaking.
You can use a keyboard and a mouse, attached using USB- no need to  
write new code to use the controller, though that'd be fun too.  I'm  
curious what a "0 tinyBenchmarks" produces, not that is the best  
benchmark in the world or the VM would be optimized.  Anywho, if  
anyone is working on this I'd be interested in hearing about it!

Info on getting Linux on your PS3 here:
http://www-128.ibm.com/developerworks/power/library/pa-linuxps3-1/?
ca=dgr-lnxw07Linux-and-PlayStation%203

Regards,
Aaron

Reply | Threaded
Open this post in threaded view
|

Re: Squeak on the PlayStation 3

Jerry Bell-2
Hi,

Squeak runs fine on the PS3.

76190476 bytecodes/sec, 2862429 sends/sec

Yellow Dog Linux 5.0, 3.9-7067 image, and 3.7-7 Unix vm.  VM compiled  
fine once I disabled the browser plug-in.

It looks very nice on an HDTV.  The system feels very responsive and  
has been stable.

But remember this is not taking advantage of the nifty bits of the  
Cell processor.  On the PS3 you have 6 available SPE units with 128  
128 bit registers and 256KB local memory per SPE.  The stock Squeak  
is not going to do anything with those at all.

I think there are a couple of ways to take advantage of the SPEs.

One approach would be to write special primitives that offload work  
to the SPEs.   That seems relatively straightforward although I'm  
sure it would take a good bit of work.

The other would involve building an entirely new VM that runs  
(partially or completely) directly on one or more of the SPEs.   SPEs  
are not just vector processors, they can do general purpose computing  
too.  Also, I believe SPEs can access the local stores of the other  
SPEs and maybe directly access other SPE registers as well.  I think  
the potential for "memory bandwidth, memory bandwidth, and memory  
bandwidth" is there, but I don't know how efficient they would be in  
that situation, or lots of other things about how that might work.  
But I think it would be interesting.

I found a paper where a Java VM was ported to the Cell PPE and  
SPE's:   http://www.ics.uci.edu/~franz/Site/pubs-pdf/ICS-TR-06-17.pdf

I would appreciate any input from VM gurus on the potential  
performance of a Squeak Cell-enabled VM.

-Jerry Bell








On Jan 17, 2007, at 12:18 PM, Aaron Reichow wrote:

> Hello everyone-
>
> I just had a quick question- does anyone here have a PlayStation  
> 3?  If so, have you tried running Squeak? You do have to install it  
> yourself, but it can be done without a modchip or anything else  
> DMCA-breaking.
> You can use a keyboard and a mouse, attached using USB- no need to  
> write new code to use the controller, though that'd be fun too.  
> I'm curious what a "0 tinyBenchmarks" produces, not that is the  
> best benchmark in the world or the VM would be optimized.  Anywho,  
> if anyone is working on this I'd be interested in hearing about it!
>
> Info on getting Linux on your PS3 here:
> http://www-128.ibm.com/developerworks/power/library/pa-linuxps3-1/?
> ca=dgr-lnxw07Linux-and-PlayStation%203
>
> Regards,
> Aaron
>



Reply | Threaded
Open this post in threaded view
|

Re: Squeak on the PlayStation 3

timrowledge

On 17-Jan-07, at 1:44 PM, Jerry Bell wrote:

> Hi,
>
> Squeak runs fine on the PS3.
>
> 76190476 bytecodes/sec, 2862429 sends/sec
Are you sure you transcribed those numbers correctly? That seems  
rather slow for 3-ish GHz PPC


tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Useful random insult:- Cackles a lot, but I ain't seen no eggs yet.



Reply | Threaded
Open this post in threaded view
|

Re: Squeak on the PlayStation 3

Jerry Bell-2
Tried it again,  this time it's 76,281,287 bytecodes/second, and 2,774,915 sends/second.

Is it possible that I screwed something up when I built the VM? 

Also the PPC unit in the Cell is a "dual-issue, in-order processor with dual-thread support" - would the in-order execution make a difference?

Thanks

Jerry

On Jan 18, 2007, at 12:49 PM, tim Rowledge wrote:


On 17-Jan-07, at 1:44 PM, Jerry Bell wrote:

Hi,

Squeak runs fine on the PS3.

76,190,476 bytecodes/sec, 2,862,429 sends/sec
Are you sure you transcribed those numbers correctly? That seems rather slow for 3-ish GHz PPC


tim
--
Useful random insult:- Cackles a lot, but I ain't seen no eggs yet.






Reply | Threaded
Open this post in threaded view
|

Re: Squeak on the PlayStation 3

johnmci
In reply to this post by timrowledge
If the interp.c was not gnuified correctly then you can expect to see  
poor numbers.
If someone wants to zip and send me (and NOT the list) the interp.c  
that they know was compiled for the VM, I can cross check.
that would be the gnu-interp.c which is the output from the gnuify step.

On Jan 18, 2007, at 10:49 AM, tim Rowledge wrote:

>
> On 17-Jan-07, at 1:44 PM, Jerry Bell wrote:
>
>> Hi,
>>
>> Squeak runs fine on the PS3.
>>
>> 76190476 bytecodes/sec, 2862429 sends/sec
> Are you sure you transcribed those numbers correctly? That seems  
> rather slow for 3-ish GHz PPC
>
>
> tim
> --
> tim Rowledge; [hidden email]; http://www.rowledge.org/tim
> Useful random insult:- Cackles a lot, but I ain't seen no eggs yet.
>
>
>

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



Reply | Threaded
Open this post in threaded view
|

Re: Squeak on the PlayStation 3

johnmci
In reply to this post by Jerry Bell-2
Ok, just to cross check, by pulling some old email:

1 tinyBenchmarks shows on my old PowerBook 17inch 1.5Ghz.
'113,274,336 bytecodes/sec; 5,111,787 sends/sec'

A mac carbon universal VM  on a mac mini 1.5Ghz solo does
'226,548,672 bytecodes/sec; 5,811,339 sends/sec'

So ya those numbers suck.
Which version of GCC are you using?

On Jan 18, 2007, at 11:20 AM, Jerry Bell wrote:

> Tried it again,  this time it's 76,281,287 bytecodes/second, and  
> 2,774,915 sends/second.
>
> Is it possible that I screwed something up when I built the VM?
--
========================================================================
===
John M. McIntosh <[hidden email]>
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
========================================================================
===



Reply | Threaded
Open this post in threaded view
|

Re: Squeak on the PlayStation 3

Jon Hylands
In reply to this post by Jerry Bell-2
On Thu, 18 Jan 2007 13:20:01 -0600, Jerry Bell <[hidden email]>
wrote:

> Tried it again,  this time it's 76,281,287 bytecodes/second, and  
> 2,774,915 sends/second.

I get about 4x that on my IBM T60p laptop (2.1 GHz Core Duo).

360309641 bytecodes/sec; 10425752 sends/sec

Seems slow for sure...

Later,
Jon

--------------------------------------------------------------
   Jon Hylands      [hidden email]      http://www.huv.com/jon

  Project: Micro Raptor (Small Biped Velociraptor Robot)
           http://www.huv.com/blog

Reply | Threaded
Open this post in threaded view
|

Re: Squeak on the PlayStation 3

Alan Grimes-2
In reply to this post by johnmci
> So ya those numbers suck.
> Which version of GCC are you using?

Other thing to check, which VM version are you using? Because Squeak.org
didn't link to SqueakVM.org I was under the false impression that 3.7.7
was the latest VM. It only gets about 60m sends/sec on 1.2ghz dual
athlon/gcc4.1. The 3.9 VM gets 120m sends/sec on same machine/compiler.

3.7 or 3.8 with gcc 3.3.6 used to get 126m sends/sec...

--
|/-\|/-\|

Reply | Threaded
Open this post in threaded view
|

Re: Squeak on the PlayStation 3

Elod Kironsky
Alan Grimes wrote:
>> So ya those numbers suck.
>> Which version of GCC are you using?
>>    
>
> Other thing to check, which VM version are you using? Because Squeak.org
> didn't link to SqueakVM.org I was under the false impression that 3.7.7
> was the latest VM.
Me too. But when I checked squeakvm.org, I realized, that it still
applies for Windows. As I use
Squeak mixed on Win and *nix, I would appreciate to have the new VM
versions also in .exe :-)

Another thing is x64 support. I think there should be 64-bit version of
both VM and image on the
squeak.org site. Btw, anybody has comparisons or benchmarks between
32-bit and 64-bit versions
of Squeak on the same machine?

Elod

Reply | Threaded
Open this post in threaded view
|

Re: Squeak on the PlayStation 3

Aaron Reichow
In reply to this post by johnmci
Wow... As an aside, the results from my new Mac Book Pro, with a 2.16  
GHz Core 2 Duo:

483,931,947 bytecodes/sec; 10,129,460 sends/sec

Comparing this to the Mac Mini 1.5 GHz Core Solo:

224 million bytecodes/sec per GHz for Core 2 Duo
150 million bytecodes/sec per GHz for Core Solo

Mind you, there might be differences in VM or image version.  But  
still, I was surprised to see that my new MBP was doing 50% more  
million bytecodes/sec per GHz than the previous revision of the Intel  
Core CPU.  The Core 2 isn't supposed to be that much faster, which  
makes me wonder-

is there any way the second core in the CPU is getting used?  I mean,  
obviously it isn't be used by Squeak through native threads, but  
would various prims being called be managed by different cores in the  
CPU, as delegated by Mac OS X? Just curious...

Vewy vewy interesting...  Interesting to see the PS3's numbers, even  
if they are horrid. :)

Regards,
Aaron

On Jan 18, 2007, at 1:38 PM, John M McIntosh wrote:

> Ok, just to cross check, by pulling some old email:
>
> 1 tinyBenchmarks shows on my old PowerBook 17inch 1.5Ghz.
> '113,274,336 bytecodes/sec; 5,111,787 sends/sec'
>
> A mac carbon universal VM  on a mac mini 1.5Ghz solo does
> '226,548,672 bytecodes/sec; 5,811,339 sends/sec'
>
> So ya those numbers suck.
> Which version of GCC are you using?
>
> On Jan 18, 2007, at 11:20 AM, Jerry Bell wrote:
>
>> Tried it again,  this time it's 76,281,287 bytecodes/second, and  
>> 2,774,915 sends/second.
>>
>> Is it possible that I screwed something up when I built the VM?
> --
> ======================================================================
> =====
> John M. McIntosh <[hidden email]>
> Corporate Smalltalk Consulting Ltd.  http://
> www.smalltalkconsulting.com
> ======================================================================
> =====
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Squeak on the PlayStation 3

Jon Hylands
On Fri, 19 Jan 2007 14:20:39 -0600, Aaron Reichow <[hidden email]>
wrote:

> Wow... As an aside, the results from my new Mac Book Pro, with a 2.16  
> GHz Core 2 Duo:
>
> 483,931,947 bytecodes/sec; 10,129,460 sends/sec

Very interesting - your results are more than 50% higher than mine, with
the same CPU.

I'm running the normal 3.7.1 VM with a 3.8 image under Windows.

I wonder if a new VM would help...

Later,
Jon

--------------------------------------------------------------
   Jon Hylands      [hidden email]      http://www.huv.com/jon

  Project: Micro Raptor (Small Biped Velociraptor Robot)
           http://www.huv.com/blog

Reply | Threaded
Open this post in threaded view
|

Re: Squeak on the PlayStation 3

Jon Hylands
On Fri, 19 Jan 2007 17:27:33 -0500, Jon Hylands <[hidden email]> wrote:

> Very interesting - your results are more than 50% higher than mine, with
> the same CPU.

Sorry, wrong math - 33% higher...

Later,
Jon

--------------------------------------------------------------
   Jon Hylands      [hidden email]      http://www.huv.com/jon

  Project: Micro Raptor (Small Biped Velociraptor Robot)
           http://www.huv.com/blog

Reply | Threaded
Open this post in threaded view
|

Re: Squeak on the PlayStation 3

timrowledge
In reply to this post by Aaron Reichow

On 19-Jan-07, at 12:20 PM, Aaron Reichow wrote:


>
> is there any way the second core in the CPU is getting used?  I  
> mean, obviously it isn't be used by Squeak through native threads,  
> but would various prims being called be managed by different cores  
> in the CPU, as delegated by Mac OS X? Just curious...

I suspect what is happening is that when running something intensive  
like a benchmark Squeak is getting basically uninterrupted attention  
from one cpu and all the other work is going to the other core. What  
this indicates is that about 30% of all the time on a single core  
machine is being wasted on trivia like running the OS and all the  
rest of the stuff that sits there sucking up cycles.

Now we have a basis for supporting Dan Ingall's old comment about OSs  
and how there shouldn't be one :-)


tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Useful random insult:- Trying out for the javelin retrieval team.



Reply | Threaded
Open this post in threaded view
|

Re: Squeak on the PlayStation 3

Bryce Kampjes
In reply to this post by Aaron Reichow
Aaron Reichow writes:
 > Wow... As an aside, the results from my new Mac Book Pro, with a 2.16  
 > GHz Core 2 Duo:
 >
 > 483,931,947 bytecodes/sec; 10,129,460 sends/sec
 >
 > Comparing this to the Mac Mini 1.5 GHz Core Solo:
 >
 > 224 million bytecodes/sec per GHz for Core 2 Duo
 > 150 million bytecodes/sec per GHz for Core Solo
 >
 > Mind you, there might be differences in VM or image version.  But  
 > still, I was surprised to see that my new MBP was doing 50% more  
 > million bytecodes/sec per GHz than the previous revision of the Intel  
 > Core CPU.  The Core 2 isn't supposed to be that much faster, which  
 > makes me wonder-

I get interpreted:
219,554,030 bytecodes/sec; 7,049,155 sends/sec

This is executing 1.2 instructions per clock on an Athon 64 2.2 GHz.
The Athlon can execute a maximum of 3 instructions per clock. I'd
guess that the Core 2 is doing better than that. Pentium-M's are good
machines for running the interpreter, it's possible that the Cores are
even better.

That said such differences may not show up while running larger
programs that have more branches to mispredict and memory to cache.
Performance is not as simple as it once was.

Bryce

Reply | Threaded
Open this post in threaded view
|

Re: Squeak on the PlayStation 3

johnmci
In reply to this post by Jon Hylands
The macIntel carbon VM has been carefully whacked with a hammer to  
ensure
GCC does the right thing for the Core Duo. Many byte codes are  
executed in 9 instructions.

Less optimal GCC choices using older versions of GCC result in the  
same byte codes taking 12 instructions, or MORE.

So 33% faster, mmm 9 instructions, versus 12, yes one might see  
that...  If people care to dig back they'll see comments from me to  
Ian last
fall about the unix VM being 33% slower on the macintel versus the  
carbon VM because of the unix VM's darwin less optimal gcc choices.

If anyone is able to build a windows VM I'll share some suggestions,  
someone did ask if anyone was maintaining the window VM anymore the  
other
day, can't say I saw a response? Anyone know?

Mind when dealing with different CPU vendors and types it makes it a  
bit harder, perhaps you just run with the lowest common slowest CPU,  
is that a 286 or 386?
That or perhaps go to the hassle of having a AMD, or core duo  
specific VM for users that might have a clue what that means...

Mmm then again perhaps Apple makes really fast hardware now, along  
with nice fit an finish, and wonderful operating system.

On Jan 19, 2007, at 2:29 PM, Jon Hylands wrote:

> On Fri, 19 Jan 2007 17:27:33 -0500, Jon Hylands <[hidden email]> wrote:
>
>> Very interesting - your results are more than 50% higher than  
>> mine, with
>> the same CPU.
>
> Sorry, wrong math - 33% higher...
>
> Later,
> Jon
>
> --------------------------------------------------------------
>    Jon Hylands      [hidden email]      http://www.huv.com/jon
>
>   Project: Micro Raptor (Small Biped Velociraptor Robot)
>            http://www.huv.com/blog
>

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



Reply | Threaded
Open this post in threaded view
|

Re: Squeak on the PlayStation 3

Aaron Reichow
In reply to this post by Jon Hylands
Jon-

You're running under Windows on the MacBook Pro?

I don't think it's your VM version. I got similar numbers when I  
tried under Windows myself on the same machine under the same  
conditions (e.g. not running on battery).  I don't have the exact  
numbers on me, but it was a ~30% difference, using the newest VM  
downloaded from ftp.squeak.org and a 3.8 image.

Regards,
Aaron


On Jan 19, 2007, at 4:29 PM, Jon Hylands wrote:

> On Fri, 19 Jan 2007 17:27:33 -0500, Jon Hylands <[hidden email]> wrote:
>
>> Very interesting - your results are more than 50% higher than  
>> mine, with
>> the same CPU.
>
> Sorry, wrong math - 33% higher...
>
> Later,
> Jon
>
> --------------------------------------------------------------
>    Jon Hylands      [hidden email]      http://www.huv.com/jon
>
>   Project: Micro Raptor (Small Biped Velociraptor Robot)
>            http://www.huv.com/blog
>


Reply | Threaded
Open this post in threaded view
|

Re: Squeak on the PlayStation 3

Jon Hylands
On Sun, 21 Jan 2007 01:34:05 -0600, Aaron Reichow <[hidden email]>
wrote:

> You're running under Windows on the MacBook Pro?

No, I'm running on an IBM laptop with Windows XP, with the same processor
(2.16 GHz Core 2 Duo).

> I don't think it's your VM version. I got similar numbers when I  
> tried under Windows myself on the same machine under the same  
> conditions (e.g. not running on battery).  I don't have the exact  
> numbers on me, but it was a ~30% difference, using the newest VM  
> downloaded from ftp.squeak.org and a 3.8 image.

Yeah, that's why I think its the VM version. Your Mac is obviously running
a different VM than a Windows machine, and its 30% faster.

Later,
Jon

--------------------------------------------------------------
   Jon Hylands      [hidden email]      http://www.huv.com/jon

  Project: Micro Raptor (Small Biped Velociraptor Robot)
           http://www.huv.com/blog