Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Hardware - Troubleshooting and Discussion > Mac Desktops > Computer for Java Simulations?

Computer for Java Simulations?
Thread Tools
Senior User
Join Date: Jun 2004
Status: Offline
Reply With Quote
Jun 26, 2004, 10:08 PM
 
Hi everyone, long time reader, first time poster.

I'm an academic who sometimes uses computer simulations for my research (in the social sciences.) The programs I write for the simulations are usually written in Java, or in Matlab/Maple's programming languages.

My current desktop computer has been fine for what I do so far, but a new project has come up where I'm going to be doing some fairly intensive number-crunching-type computer simulations, and I'm looking at possibly getting a new dual-processor computer so that I can run more iterations of the simulation.

So, here's my question: for about $3000, what sort of computer should I get? I’m looking for specific configurations (how much/type of RAM, type/speed of hard drive, processor type and speed, etc.) and ideally a pre-packaged vendor model.

My needs are very specific:

(1) The computer has to be able to run relatively simple Java code as fast as possible. The program has not been written yet, but I expect that it won't be more than 500 lines of code or so, with no GUI component at all. It's a relatively simple, number-crunching-type algorithm.

(2) Operating system is not important to me, unless it somehow affects how well the computer will run Java. I have used both OS X and WinXP/2000 and don't have issues with either one. I've never used Linux, but I'd be willing to learn it if it would run Java simulations faster. I have a slight preference for PC, just because all my department’s software licenses are for PC and my other computers are PCs, but I can get Mac copies of Maple and Matlab if Macs offer a better value for what I need.

(3) Video editing, game playing, audio encoding, and pretty much doing anything except running Java code, Matlab, Maple, and STATA don’t matter to me.

Thanks so much, I look forward to your suggestions. I'm just not sure what sort of specs are going to be the most important for running the kind of code I'm running.
     
Mac Elite
Join Date: Aug 2001
Status: Offline
Reply With Quote
Jun 26, 2004, 10:22 PM
 
What's the working set size of the app? Does it hit the disk a lot or is it entirely memory resident? If it only uses 500MB of ram, then getting 2GB isn't gonna help. If the whole data set fits in memory, a nice big RAID array isn't gonna help it at all. Overall I'd say a dual opteron, stripped as much as possible (no graphics/sound/monitor, weak network card, etc...). As for what to run on it, I haven't heard great things about the Linux JVMs, but I'm not really sure. I'm sure some googling will turn up benchmarks comparing different JVMs. Using GCJ to compile it to native could help as well, but I don't know much about that either.
     
Senior User
Join Date: Jun 2004
Status: Offline
Reply With Quote
Jun 26, 2004, 10:34 PM
 
The size of the app itself is not going to be that large. However, the size of the data array it's handling could get real big real fast (probably larger than 1000 by 1000, possibly up to 100000 by 100000.) Basically, it's going to be storing a very large matrix in memory and performing computations on a smaller subset of that matrix at one time. I have a feeling it is going to be frequently hitting the disk, because the algorithm works through a large space of matrices and then writes the results to an output file.

So, dual Opteron... 1-2 GB of RAM... should I go RAID 0 or RAID 1? What size hard drive? (And how on earth am I going to keep this thing below three grand?)
     
Mac Elite
Join Date: Aug 2001
Status: Offline
Reply With Quote
Jun 27, 2004, 12:02 AM
 
Originally posted by strictlyplaid:
The size of the app itself is not going to be that large. However, the size of the data array it's handling could get real big real fast (probably larger than 1000 by 1000, possibly up to 100000 by 100000.) Basically, it's going to be storing a very large matrix in memory and performing computations on a smaller subset of that matrix at one time. I have a feeling it is going to be frequently hitting the disk, because the algorithm works through a large space of matrices and then writes the results to an output file.

So, dual Opteron... 1-2 GB of RAM... should I go RAID 0 or RAID 1? What size hard drive? (And how on earth am I going to keep this thing below three grand?)
Hmm... 100k*100k*4 = 40,000,000,000 bytes... 40GB of data if you're working with ints... that's not going to be fast, and I have no real idea what the limiting factor would be. I would try looking around for some high performance computing mailing lists or forums. They'll have a much better idea about how to work with data sets that huge.
     
Professional Poster
Join Date: Mar 2004
Location: UK
Status: Offline
Reply With Quote
Jun 27, 2004, 07:41 AM
 
If you need to do some number crunching, check out XGrid:

http://www.apple.com/acg/xgrid/

Once you have your new Mac, you can use your old machine to help it (And any other old PCs (or Macs - though they don't need Linux of course) you can find on your network), by installing Linux on it and using the new XGrid Agent for Unix:

http://www.novajo.ca/simple/archives/000026.html

Check out the XGrid mailing list archives (and join the list). There has been talk of using Matlab with XGrid:

http://www.lists.apple.com/mailman/listinfo/xgrid-users
     
Senior User
Join Date: Jun 2004
Status: Offline
Reply With Quote
Jun 27, 2004, 09:39 AM
 
Originally posted by Catfish_Man:
Hmm... 100k*100k*4 = 40,000,000,000 bytes... 40GB of data if you're working with ints... that's not going to be fast, and I have no real idea what the limiting factor would be. I would try looking around for some high performance computing mailing lists or forums. They'll have a much better idea about how to work with data sets that huge.
Well, in this case the data is going to be binary (1 or zero) which reduces the size of the data array considerably. (A small portion of the matrix will have associated INT-level data, but this sub-matrix probably won't grow beyond 100x100 at the most.) With that amount of data, I thought the problem was still tractable on a desktop PC. Think that's true?

If it were a lot larger, I could ask for some supercomputer time, but I prefer the flexibility and convenience of having my supercomputer on my desk, if possible.
     
Senior User
Join Date: Jun 2004
Status: Offline
Reply With Quote
Jun 27, 2004, 09:41 AM
 
Originally posted by Waragainstsleep:
If you need to do some number crunching, check out XGrid:

http://www.apple.com/acg/xgrid/

Once you have your new Mac, you can use your old machine to help it (And any other old PCs (or Macs - though they don't need Linux of course) you can find on your network), by installing Linux on it and using the new XGrid Agent for Unix:

http://www.novajo.ca/simple/archives/000026.html

Check out the XGrid mailing list archives (and join the list). There has been talk of using Matlab with XGrid:

http://www.lists.apple.com/mailman/listinfo/xgrid-users
Wow, that software is awesome!

We have a lot of older computers hanging around the department, and I could also put Linux on a partition of my home PCs too. How fast do you think the minimum speed for a comp on an XGrid should be?
     
Professional Poster
Join Date: Mar 2004
Location: UK
Status: Offline
Reply With Quote
Jun 27, 2004, 12:19 PM
 
Well Macs need to run OS 10.2.8 or later, most of the ones that can do this are G3 200MHz or faster. (I have tested XGrid with a 333 and 233 together. Worked fine. Faster to render a Mandlebrot image with two of them and only 10Mbps ethernet)

As for x86 machines, I have yet to add my PCs to the grid as none of them yet have linux on them. I will get round to it though. I know very little about linux, but looking at some of the different versions, it seems you can run machines as old as 486s with it. I assume that the OS is more of a limit than XGrid itself, so I guess 50MHz or even less would be possible, though perhaps not noticeably useful.
If the machines are really slow, you may be able to compensate by sending fewer or smaller tasks to them where possible. Maybe XGrid does this by itself, I'm not sure.

Its also worth noting that you can connect agents online using just IP addresses, so you can use other machines (if you have another institution which you collaborate with perhaps), or just add your home PCs and those of your staff. Perhaps you can even set up a website asking other people to donate CPU time like SETI et al.
     
Professional Poster
Join Date: Mar 2004
Location: UK
Status: Offline
Reply With Quote
Jun 27, 2004, 12:39 PM
 
I should point out that the linux version of XGrid is only for Agent services. You will need at least one Mac OS X machine to run the controller service and use as a client.

You can order the new G5 Dual 2.5GHz for approximately $2700 with educational discount, the exact amount depends on your institution. $2610 with combo drive instead of superdrive.

http://store.apple.com/1-800-800-APPL/WebObjects/HED

Don't get extra RAM from Apple though. OWC have 1GB of RAM for the G5 for $185.

http://eshop.macsales.com/MyOWC/Upgr...=Show+Upgrades

It comes with 512MB, so thats 2.5GB for your $3000.

Depending on whether you need that much RAM or not, a Seagate Raptor 10,000rpm, SATA drive might give a welcome speed boost if you're hitting the disk alot like you say.

Should be more than a match for a dual Opteron.
     
Administrator
Join Date: May 2000
Location: California
Status: Offline
Reply With Quote
Jun 27, 2004, 01:19 PM
 
Originally posted by strictlyplaid:
... However, the size of the data array it's handling could get real big real fast (probably larger than 1000 by 1000, possibly up to 100,000 by 100,000.) Basically, it's going to be storing a very large matrix in memory and performing computations on a smaller subset of that matrix at one time.
...
Well, in this case the data is going to be binary (1 or zero) which reduces the size of the data array considerably.
...
If it really stores the data internally as bits, that works out to less than 1.2 GB, well within the limits of most desktops made in the last several years. Check to make sure you are really using bits as opposed to one-bit-from-a-byte, and don't worry about RAIDs.

If the simulation application is not multi-threaded, don't worry about a dual CPU box either, it will do almost nothing for you. In that case, a single G5 or Athlon64 may be all that you need.
     
Professional Poster
Join Date: Mar 2004
Location: UK
Status: Offline
Reply With Quote
Jun 27, 2004, 01:28 PM
 
You'd have to get a refurb Mac in that case. No more single CPUs. Pretty sure that XGrid will make use of both CPUs in a dual though. As long as your calculations are parallelizeable.
     
Senior User
Join Date: Jun 2004
Status: Offline
Reply With Quote
Jun 27, 2004, 03:00 PM
 
Originally posted by reader50:
If it really stores the data internally as bits, that works out to less than 1.2 GB, well within the limits of most desktops made in the last several years. Check to make sure you are really using bits as opposed to one-bit-from-a-byte, and don't worry about RAIDs.
Having double-checked my handy Java manual, it appears that if I use Boolean operators it will truly use only one bit of memory. The app can certainly be written that way, so I'll do that.

If the simulation application is not multi-threaded, don't worry about a dual CPU box either, it will do almost nothing for you. In that case, a single G5 or Athlon64 may be all that you need.
Hm, well I really thought dual proc would make a bigger difference. Well now this opens up a whole new question for me: should I bother with an upgrade at all? Here's the spec on my fastest current rig:

2.4 GHz Pentium 4 (533 Mhz FSB)
256 MB RAM (RAMBUS PC1066 type)
120 GB 7200 RPM IDE (I think) Hard Drive

The RAM here is problematic, but for $300 I can upgrade to 1 GB. Would this machine handle it? If so, I could save a lot of money by just bumping this thing up a bit. Would a new single proc machine really be that much faster? I'm not sure that the Java Virtual Machine can even take advantage of 64-bit processing yet, or hyperthreading. If it takes some sort of special programming techniques to write it, I'm quite sure *I* don't know them.
     
Administrator
Join Date: May 2000
Location: California
Status: Offline
Reply With Quote
Jun 27, 2004, 03:14 PM
 
The primary advantages to going 64 bit are larger native memory support and higher precision math operations at less cost. You might want a 64 box if you expected the simulation to go larger than 4 GB in the foreseeable future. It doesn't sound like you need higher precision math operations (larger than 64-bit precision), so ignore that.

RAMBUS is especially expensive, it might be worth your while to get a different box just to get less expensive standard DDR.

I do not know what your code bottlenecks are, so it is hard to guess if your current box could do it. Perhaps you could upgrade the RAM and try, if it doesn't work, sell the box and recoup most of your upgrade money.
     
Mac Elite
Join Date: Aug 2001
Status: Offline
Reply With Quote
Jun 27, 2004, 03:40 PM
 
Originally posted by strictlyplaid:
Having double-checked my handy Java manual, it appears that if I use Boolean operators it will truly use only one bit of memory. The app can certainly be written that way, so I'll do that.



Hm, well I really thought dual proc would make a bigger difference. Well now this opens up a whole new question for me: should I bother with an upgrade at all? Here's the spec on my fastest current rig:

2.4 GHz Pentium 4 (533 Mhz FSB)
256 MB RAM (RAMBUS PC1066 type)
120 GB 7200 RPM IDE (I think) Hard Drive

The RAM here is problematic, but for $300 I can upgrade to 1 GB. Would this machine handle it? If so, I could save a lot of money by just bumping this thing up a bit. Would a new single proc machine really be that much faster? I'm not sure that the Java Virtual Machine can even take advantage of 64-bit processing yet, or hyperthreading. If it takes some sort of special programming techniques to write it, I'm quite sure *I* don't know them.
Using hyperthreading uses the same code as using more than one processor (multithreading). I can't remember about 64 bit jvm support, but I'm pretty sure the Solaris one does, and maybe some others.
     
Professional Poster
Join Date: Mar 2004
Location: UK
Status: Offline
Reply With Quote
Jun 27, 2004, 03:51 PM
 
     
Senior User
Join Date: Jun 2004
Status: Offline
Reply With Quote
Jun 28, 2004, 05:31 PM
 
Thanks to everyone for their ideas! I will probably write the program on my existing box, get some RAM for it and see if that will do the job (at least for the preliminary runs.) Then, if I can get some grant money for my project, I'll go ahead and buy a better desktop with a 64-bit processor and 2 GB of RAM. Checking around, getting RAID 0 arrays is not really that expensive, so I'll probably spring for that too. Since I don't know how to write multithreaded applications (for dual processors) -- I'm in social science, not computer science -- I'll probably just stick with the fastest possible single chip I can get.

Apparently the IBM 1.3.1 JVM for Windows is the fastest (according to my semi-scientific Google searching), so I'll run the simulation using that.

Again, thanks to everyone for their help!
     
Professional Poster
Join Date: Mar 2004
Location: UK
Status: Offline
Reply With Quote
Jun 29, 2004, 09:16 AM
 
Stric:
Steve Jobs announced yesterday that OS 10.4 will be completely 64-bit for running ANY process you want. So maybe you can get your P4 to last until the first half of next year and then get a G5.

It will also come with XGrid 1.0 built in, supporting up to 128 Agents in a cluster.

Watch the Keynote:

http://stream.apple.akadns.net/
     
Moderator Emeritus
Join Date: Dec 2000
Location: College Park, MD
Status: Offline
Reply With Quote
Jun 29, 2004, 02:43 PM
 
Originally posted by Waragainstsleep:

*snip*

Depending on whether you need that much RAM or not, a Western Digital Raptor 10,000rpm, SATA drive might give a welcome speed boost if you're hitting the disk alot like you say.

Should be more than a match for a dual Opteron.
Fixed that for you.



Do more research on what you want to run in order to find the best platform. I agree on the IBM JVM being faster part, I've seen it whip sun's on CPU intensive stuff before. IBM's JVM plus a single or dual opteron box (or even athlon 64) would be very powerful. Running a 64bit version of linux of course, because you'd want the 64bit stuff. You'll need a x86-64 version of the JVM, as well.
My website
Help me pay for college. Click for more info.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 07:44 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2