Re: JavaMemoryModel: A memory model for the masses

From: David F. Bacon (
Date: Wed Nov 10 1999 - 08:45:16 EST

> First, another digression: Both as a cause and result of all the
> pressure to make Java concurrency support faster, Java seems to be
> turning into the language of choice for "server-side" concurrent
> programming on MPs.

on the one hand, as an ibm stockholder, i would like to encourage such a rosy
picture of server-side java.

on the other hand, i know from working with people who are in the field (at
ibm customer sites, with big MP servers) as well as from my own measurements,
that this is absolutely not the case, and won't be for some time to come.

for starters, you need a concurrent or parallel GC, or you can just forget
about it right there. i did one measurement of a servlet-style application on
a 12-way MP, and even though it has "embarassing" parallelism, it suffered a
factor of 7 *slowdown* on 12 processors. and there's no knee in that curve,

as far as i know, java/390 is the only shipping product with a concurrent GC.

the next problem is that because of java's pseudo-functional approach to string
operations, combined with their use of unicode, any string-intensive (i.e. any
almost any servlet, since they usually generate tons of html) application is
going to generate massive amounts of allocation and GC. database server code
written in java is compute bound, rather than being IO bound. until it is
efficient enough to be IO bound, java will be seriously limited on servers.

of course, these problems are of significant interest at ibm, both commercially
and as research topics. in our jalapeno (java VM in java) system, dick
attanasio and steve smith have implemented parallel GCs, and are working with
me on a concurrent GC.

> Concurrent Java programs routinely outperform
> concurrent POSIX/C programs these days.

i would like to see a head-to-head comparison where this is true. i seriously
doubt it, unless the C version was horribly programmed.

> Not always, of course, but
> often enough that, taken together with other advantages of Java, it
> seems that at least as much "serious" concurrent programming is being
> done in Java as any other language. (Bear in mind though that my views
> stem from the very biased sample of people I talk to, which mainly
> consists of exactly these people who have chosen to undertake
> server-side systems in Java.)

the great thing about java is that it has taken a number of significant open
problems in computer language research, and made millions of people (and
billions of dollars) dependent upon their solution. this creates enormous
pressure to innovate and a lot of receptiveness to technology transfer that
isn't normally there.

and that makes it a fun time to be working in this area.

JavaMemoryModel mailing list -

This archive was generated by hypermail 2b29 : Thu Oct 13 2005 - 07:00:22 EDT