Michael Juntao Yuan, and Dave Jaffe have
published an article on OnJava.com detailing the process of scaling enterprise Java applications on 64-bit multi-core x86 servers. As chip makers such as AMD and Intel transition from faster megahertz per chip to more cores per processor, performance gains will be harder to achieve for traditional single threaded applications. They mention that servers such as Dell's PowerEdge 1955 blade which supports up to two 64-bit dual core processors in a blade configuration. The article points out that to take advantage of such systems applications must not only support multiple concurrent threads of execution but also be able to manage the large amounts of memory available to 64-bit processors. The article recommends a number of tips to help developers with this task such as:
- Tuning the JVM with Heap and Garbage Collection Arguments that Reflect The Amount of Memory Available.
- Leveraging Java 5.0 Concurrency Utils to Support Multiple Threads Easier
- Using NIO to Reduce I/O Blocking
Beyond low level Java solutions it is also proposed to collapse the tiers which your application runs on. Larger capacity machines may be able to handle both database and appserver tasks for instance reducing items such as network load that would be present with multiple machines. Virtualizing the hardware can also allow administrators to run several JEE application servers in contained environments on the same hardware thus using it more effectively.
Intel is rolling out quad-core processors this fall with the goal of 32 cores by 2010. Sun's Niagra II chips slated for release during the third quarter of next year will have 8 cores and support for up to 64 threads. With this explosion in cores it also seems likely that companies such as Intel and Sun will need to create compiler-driven parallelism to transparently multi-thread common thread-safe operations under the hood in the platform layer of languages like Java.
Community comments
Collapse the tiers?
by Floyd Marinescu,
Re: Collapse the tiers?
by Billy Newport,
Collapse the tiers?
by Floyd Marinescu,
Your message is awaiting moderation. Thank you for participating in the discussion.
A fairly practical overview but I don't know about the collapse the tier advice. You could have done the same thing back with an ordinary quad-cpu machine at any time, but it wasn't a good idea then and so I don't see how multi-core systems will change that. Databases are distributed on different machines for scalability, not performance. Perhaps for a certain class of simpler apps this might be useful.
On the other hand, multi-core processors will probably make it easier to collapse your 'cluster', using less machines but still having multiple instances of your appserver running.
Re: Collapse the tiers?
by Billy Newport,
Your message is awaiting moderation. Thank you for participating in the discussion.
I don't see how multi-core makes a blind bit of difference for a J2EE developer. If it didn't run well on SMP hardware before, it'll still be bad on multi-core. If programmers were worried about this before and weren't happy with the container managed threading then they can use commonj or WorkManager APIs together with the concurrent.jar to implement custom threading in the application. The same advice holds for multi-core, it's identical.
As for 64 bit JVMs, I still haven't seen a 64 bit JVM that behaves well with very large heaps, even the Java 5 ones.
The biggest impact multi-core will have is that J2EE products and java middleware that does scale well vertically will have an bigger advantage over ones that don't. Right now, most jspecs are on intel dual cpu type hardware. More cores means that engineering on improving threading will pay off and this will be visible for most customers even on low end hardware. This isn't the case today and many products look as good as others because this effort doesn't stand out on uni or dual cpu boxes.