Sun and Oracle Community Voices How to Buy Log In United States [Change] English

»  Contrarian Minds Archive
More and Less

Giving Java Apps Just What They Need

Story by Al Riske. Photography by Howard Friedenberg.

July 23, 2009 - One of the greatest virtues any computer operating system can have is simple stability. So you really don't want to mess with the thing if you don't have to.

"If you mess with the operating system and get it wrong, the whole machine goes down," notes Mick Jordan, a senior staff engineer in Sun Labs.

As a result, he says, the pace of innovation at the level is necessarily a bit slower. People are reluctant to experiment, and rightly so.

Until now.

Jordan is working on a project called Guest VM (based in part on another labs project known as Maxine), which could dramatically reduce the role of traditional server operating systems.

"Hypervisors open up innovation in this area, because it's safe to mess with things in these guest operating systems. They're not as critical."

Mick Jordan
Senior Staff Engineer
Sun Microsystems Laboratories

 

The project was inspired by a simple observation.

"Typically what's happening on a production server that's running a large Java application is there's just the operating system and the Java application. There may be a few other processes related to networking but basically it's a one-to-one relationship," Jordan points out. "In fact, because of the size of most Internet-facing applications, one machine isn't big enough."

So a single application is often spread logically over multiple machines. That is, horizontally scaled.

"In that context the operating system is not being used in its normal mode of being a time-sharing system," Jordan says. "It's just doing one thing which is supporting the Java application."

Which means that an awful lot of what goes into a modern operating system is just taking up space -- space that could be put to better use.

Mick Jordan

Add to that the growing popularity of virtualization and a whole new world begins to open up.

Jordan believes that hypervisors -- software that allows multiple operating systems (“guests”) to run concurrently on any host computer -- will soon be everywhere.

"Hypervisors open up innovation in this area, because it's safe to mess with things in these guest operating systems. They're not as critical," Jordan says.

"The hypervisor has to be very stable, but the other operating systems that are running in this virtualized world don't have to be. They can be unstable. They can have bugs. We can do experiments without bringing down the whole system."

"We want to minimize the use of server resources and get the most out of the machine that we can. We don't need all the extraneous stuff that's in the operating system."

Mick Jordan
Senior Staff Engineer
Sun Microsystems Laboratories

 

The experiment that Jordan is doing is this: He wants to see if he can create a complete software stack, implemented entirely in Java and hosted on Xen, the popular open-source hypervisor, with just the thinnest layer of old-style C code in between.

Make no mistake, though. He is not interested in created a Java operating system, just a better implementation of the Java platform.

"I'm not interested in trying to replicate all of Solaris or all of Linux. That would be like trying to boil the ocean. Why would anyone want to do that?" Jordan says.

"We want to minimize the use of server resources and get the most out of the machine that we can. We don't need all the extraneous stuff that's in the operating system to support all kinds of other activities. Java's needs are very specific whereas the operating system is very general, so there's tons of code in there we don't need. We can just replace it with the pieces we need and optimize them for Java."

Mick Jordan

The potential advantages of the Guest VM are fourfold: improved performance, better thread management, simplified administration, and increased developer productivity.

All because the entire stack is written in Java.

That means there are few cumbersome transitions between layers that are often written in different programming languages.

It also means that the Java runtime compiler can optimize all of the code, not just some of it, on the fly.

The thread scheduler can work more intelligently, too, since it can see and understand the purpose of the threads that support the Java virtual machine -- for example, those supporting the garbage collector.

Administration is easier because you can do it all at the Java level.

And, finally, developer productivity can be enhanced because Java is a high-level language with advanced programming tools. (Jordan for one has a strong dislike of C, and says that "C++ is the ultimate evil as far as I'm concerned -- the most appalling language ever invented.")

"In this context the operating system is not being used in its normal mode of being a time-sharing system. "

Mick Jordan
Senior Staff Engineer
Sun Microsystems Laboratories

 

All of this is about to be tested, Jordan says.

The Guest VM is capable of running a variety of micro-benchmarks and test programs, and it can run the SPECjbb benchmark, which simulates a server-side application. And it's almost ready to run large real-world applications such as Glassfish or Hadoop, which will provide the ultimate test.

Mick Jordan

"Is there a significant advantage in this or not? We don't really know. We know those transitions between layers are relatively expensive, but when you sum it all up, maybe it's a wash. Until we get big enough systems running that we can actually do the measurements -- we don't really know the answer to that. That's one of the big research questions -- whether there's a performance benefit from having this single-language stack of software all under the control of the Java runtime," he says.

"There are a lot of things in computing that stand to reason. Unfortunately computer science's intuition about performance is notoriously poor. The system is complicated enough that you may find you didn't really understand it well enough, and your intuition is just wrong. So I'm not going to stand up and say, 'This will definitely be better.' But it certainly has that potential."


Mick Jordan

Title: Senior Staff Engineer, Sun Labs.

Current Project: Exploring the implementation of Java virtual machines on the Xen hypervisor.

Other Research Interests: Application servers, database systems, distributed systems, Java, middleware, operating systems, performance analysis, and programming languages.

Education: Doctorate in computer science from the University of Cambridge. Bachelor's degree in theoretical physics from the University of Lancaster.

Background: Worked for Acorn Research Center, Olivetti Research, and Digital Systems Research Center before joining Sun in 1993.

Patents: 3.

Pastime: Road biking. ("This year I'm doing something called the California Triple Crown, which is at least three double centuries -- that's 200 miles in a day."), skiing, hiking, gardening.

Last Book Read: The Housekeeper and the Professor, by Yoko Ogawa. ("My wife gave me that one. I'm currently trying to read all of Steven King's books in chronological order.")

Favorite Movie: Kelly's Heroes (1973) with Clint Eastwood and Donald Sutherland.

Favorite Food: Pecan pie.

What Keeps Him Up at Night: "No one has figured out how to make renewable energy come close to replacing fossil fuel because it's so efficient and so dense. Renewable energy is not dense. A cup of oil represents thousands of hours of sunlight. So I worry. We really do have to figure out how to be sustainable, and I don't know how we can do it because our whole system is based on growth."

Recommended Reading: The Long Emergency: Surviving the Converging Catastrophes of the Twenty-First Century, by James Howard Kunstler.

Childhood Ambition: To be a physical education instructor. ("I'm really a jock at heart.”)

First Job: Worked as a packer in a plastics factory.

Favorite Destination: California's Sierra Nevada.

Perfect Day: A long bike ride in the hills.