cleo wrote:Do I need to compile the java code with any special libraries to take advantage of all the PS3 processors? Are there any suggestion to make this program run faster?
There is no PS3-native Java virtual machine (VM), but we can use PowerPC VMs on the main core of the PS3's Cell - what we call the PPE. Unfortunately, we can't use Sun's Java, since they don't support PowerPC.
However - we can use IBM's PowerPC Java - which is licensed directly from Sun.
By default, YDL ships with an extremely slow, reverse-engineered, open source PowerPC version of Java called GCJ. The first thing I would do is replace it with IBM's Java. We have instructions on how to install it here:
viewtopic.php?t=2935NOTE: The instructions are for installing Java into your browser. It sounds like you may have installed this program - so you'll need to do one extra step.
Open a terminal window and type the following:
- Code: Select all
su
ln -s /opt/ibm/java-ppc-60/jre/bin/java /usr/local/bin
The first command switches you to root user. You'll need to be root to do this. The next command links the IBM Java command to /usr/local/bin so that the IBM Java command runs before GCJ Java.
Other than making sure you're using IBM Java instead of GCJ Java, I'm not sure there's much else you can do. You may be running into memory limitation issues - the PS3 only has 256 Megs of system RAM. If your Java program uses more than this, you'll start swapping out memory to disk, which really slows it down.
BTW - currently, the only way to tap into the other Cell cores - what we call the SPEs - are to code directly for them in C/C++. No currently available Java uses them, although there are some non-released experimental Java VMs that do.
Cheers,
Paul