I have a Java application where scalability is primarily limited by RAM, that I would like to run on one or more servers in a datacenter. Where should I be looking for server hardware that can accommodate 100GB - 512GB or more of RAM? I'm not an expert in such matters so I really don't know where to start.
Is this getting into supercomputer territory (6 figures or more), or could I obtain such a server for low 5-digit dollars?
A few notes based on some questions below:
- Yes I have tried hard to think of ways to remove this scalability requirement, and no its not really an option. The application fundamentally requires very fast random access to very large amounts of data, storing in a hard disk (via a database perhaps) won't cut it.
- I'm pretty sure the JVM can, at least in theory, scale up that far. I regularly run my code with 10GB allocated to the Sun 1.6 JVM without noticeable problems.
Unusual requirement sometimes benefit from unusual solutions. Sure you can give 6 figures to Sun, Dell or HP and be done with it, but it is not the only game in town.
For single box solutions, getting up to 128GB is very cheap (32 x 4GB ~ USD 3.000), even with homebrew motherboards that cost less than USD 1.000. (don't mock the makers. If it's good enough for Google ... )
256GB is seriously more expensive (32x8GB ~ USD 18.000), and beyond that ...
Alternatively have you considered Infiniband (10Gbps) interconnected cheap boxes as an alternative?
You could build a 4 node, 16 processor (64 cores), 512GB machine that way and still have change from USD 25.000 .
You would furthermore have the added benefits of gracefull degradation, if your application can run on 3 machines if one of them fails, and possibly get a linear scaling in cost up to 8 nodes (just add 4 more nodes). At that point you are looking at a cool 128 core, 1TB RAM beast for < USD 50.000 .
Before you dismiss the Infiniband proposal as exotic, it isn't for the type of machine you are asking for. e.g. 141 of the top 500 supercomputers are built this way, including 4 out of the top 10 ( http://top500.org/connfam/8 )
Alright, look. You're not going to find a server that has the sort of RAM footprint you're looking for, at least not one that doesn't require its own electrical grid.
Why not take a scalable approach, and use memcached? You can spread the memory around to different machines across the network. The data never has to touch a disk drive, and with the sort of ultra-fast network you can buy with the money you're talking about, latency will hardly be a problem at all.
Here's a memcached client for java: http://www.whalin.com/memcached/
And here's an intro to memcached in case you're not familiar: http://www.danga.com/memcached/
Look into it. It's going to be way more cost effective than building a single monster machine with an insane amount of RAM. Besides, if you're doing something that has that kind of requirement, it's probably mission critical, and you don't need a single point of failure.
4 or 8 socket Opteron servers such as the HP DL585 or DL785 or the Sun X4600 can take large amounts of memory in the 128-256GB range. Although they are not cheap, they are certainly not into 6 digit price tags; An 8-way, 32 core Sun X4600 with 256GB of RAM lists at around $35,000 on their web site, and that's about as big as this type of system gets. You will probably find that you can get the system for somewhat less than the list price shown on the web site..
Although 4Gb DIMMs are available, they tend to go at a large price premium, so going up to a system maxed out with these would be considerably more expensive.
If you want to use a system of this type, you will need a 64-bit O/S. Make sure you also get a 64-bit JVM and check that it works well with your application.
I won't repeat the hardware suggestions (which are sound) but you might want to look at Terracotta to see if it fits for your app.
http://www.terracotta.org/
BE absolutely careful which such RAM sizes. We had scaled up a HP machine to 64 GB (HP stated that the machine can take 128 GB), but only after adding an additional riser board, a cooling shaft and so on (after a lot of chatting with HP).
Only because a machine is specified to take up to n GB, it does not mean that it will work without additional changes. In our case not all normal memory modules worked, because they got to hot, only very specific modules worked.
The cost of RAM doesn't scale linearly to large sizes. Just because I can buy a 1GB DIMM for $15 doesn't mean I can get a server with 128GB for just $1,920 ... for a start you won't find a motherboard with 128 DIMM slots in it.
Above a certain size (~8 to 16GB) you start to see motherboards requiring fully buffering DIMMs (FB-DIMMs), which will cost you considerably more per GB than standard desktop memory.
We regularly use machines with 128GB of memory in them and the price has come down a long way in recent years, but I don't have any current numbers ... nor any experience of how well the JVM would scale to that size of memory.
You actually have lots of options, just from the HP list you have their BL680c blade which can take 128GB, their DL580/585's can take 256GB and their DL785 can take 512GB. Some of IBM's go up to 256GB, as does one Dell too.
3 years after the questio, things are much easier.
I have been looking up some Siliconmechanics configs.
The cheapest way would be to use AMD platforms with 32 dimms - 512GB - 11.940$.
An alternative, but much more expensive per GB is an Intel platform with 64 dimms - 1TB - 48.769$.
I think you will start to run into headroom issues at 64gb on traditional hardware. If you can scale out from there you would be ok but my guess is that the far more cost-effective solution would be to question your architecture. Granted I say that with no knowledge of what you are doing but I am just throwing that out there.
In a similar vein to the FusionIO suggestion, you can get devices that let you hook dynamic RAM to a SATA interface. Something like this (I have no experience of the product or company, it is just the first option that came out of a "Google Shopping" search).
You could use a couple of these as a mounted filesystems to cache data using your app's logic (it is battery backed so should survive boot and other outages) or you could use them as swap space and let the kernel use decide how to use them (though as OS kernels are usually optimised assuming all swap locations are more orders of magnitude slower and more latent than real RAM then this will be, you'll probably have to tweak it significantly to get best use of such an arrangement).
The FusionIO option is going to be better value for money if you really need something that big, this sort of RAM drive may be better as a compromise. Working out how well a server capable of 128Gb RAM on the motherboard and a couple of these with the full 64Gb populated compares price- and performance-wise to a specialist server that supports 256Gb or more directly, I leave as an exercise for the reader!