Possible Duplicate:
Practical limitations of JVM memory and CPU usage?
Let's say money was not a limiting factor, and I wanted to write a Java program that ran on a single powerful machine.
The goal would be to make the Java program run as fast as possible without having to swap or go to disk for anything.
Let's say that this computer has:
- 1 TB of RAM (64 16GB DIMMs)
- 64 processor cores (8 8-core processors)
- running 64-bit Ubuntu
Could a single instance of a java program running in a JVM take advantage of this much RAM and processors?
Are there any practical considerations that might limit the usage and efficiency?
- Hardware limitations (e.g. can CPUs work together on 开发者_StackOverflow中文版a TB of memory)?
- OS process (memory & threads) limitations?
- JVM memory/heap limitations?
- JVM thread limitations?
Could a regular executable (i.e. a C program) take advantage of the above specs?
Thanks, Galen
Yes, a JVM can take advantage of that much RAM and processors. In fact I have a machine with a nearly identical configuration as you describe except it's running RedHat. Keep in mind that your application would need to be multithreaded to use all the processor cores.
As for hardware limitations, there are always caching issues that can be pretty complicated, but a rule of thumb is that if all your threads are randomly accessing multiple areas of RAM, you're likely to get low cache coherency. If they're hitting roughly the same areas of RAM, it's likely you'll get better cache hits.
For specifics, it would be nice to know what sort of applications you're planning on writing.
精彩评论