When I reported our recent excellent SPECjAppServer 2004 scores, one glassfish user responded:
I sure wish you guys were able to come up with a thorough write upabout the SPEC Benchmark architecture, and the techniques you guysused to get the numbers you get and, more importantly, how thosetechniques might apply to every day applications we run in the wild.
While we do have a full performance-...
on Dec 3, 2007
Last week, Sun published a new SPECjAppServer 2004 benchmark score: 8439.36 JOPS@Standard . [I'd have written about it sooner, but it was published late Wednesday, and I had to go home and bake a lot of pies.] This is a "big" number, and frankly, it's the one thing that's been missing in our repertoire of submissions. We'd previously shown leading performance on a single chip, but...
on Nov 26, 2007
Yesterday JavaWorld.com published a new article titled "Multicore processing for client-side Java applications". You're welcome to take a look and let me know what you think. Here's a summary of the article:
It's a well-known fact that hardware companies are abandoning the race for single-CPU speed and instead are focusing on multicore processors. Despite the fact that many algorithms can be...
on Sep 26, 2007
I continue my studies about web applications optimization focusing in the browser side. My previous blog was about YSlow, the excellent add on of Firebug. Now, I focused more to understand how browsers cache works and how to trace problems caused by its storage strategies.
The browser side was a great concern few years ago, when the power of the client machines and the available broadband were...
on Aug 15, 2007
A good way to reduce the number of Http Connections required to
load a web page is to store images and other resources in the browser cache. It is very
well presented in this other blog. The problem is to find a correct
configuration of the names and values used by different browsers to
optimize the cache usage. To help us to identify what is going on during
the communication between browsers and...
on Aug 8, 2007
Today, Sun officially announced SPECjAppServer 2004 scores on our Sun Java
Application Server 9.1, which (as you no doubt know) is the productized
version of the open-source Glassfish V2 project. We've previously submitted
results for SJSAS 9.0 (aka Glassfish V1), which at the time we were quite
proud of: they were the only SPECjAppServer scores based on an open-source
application server, and...
on Jul 10, 2007
One of those lesser-known features of Java is that it contains two
different bytecodes for switch statements: a generic switch statement,
and an (allegedly more optimal) table-driven switch statement. The
compiler will automatically generate one or the other of these
statements depending on the values in the switch statement: the
table-driven statement is used when the switch values are close to...
on Jul 9, 2007
Almost every thread pool implementation takes great pains to make sure
that it can dynamically resize the number of threads it utilizes: you
specify the mininum number of threads you want, the maximum number, and
the thread pool in its wisdom will automatically configure itself to
have the optimal number of threads for your workload. At least, that's
But what about in practice? I'd...
on Jun 7, 2007
A customer asked me to verify how many threads is possible to run concurrently at any java vm on the server. I did some search at the customer support site, but was not lucky to found any proper test utility, so I created one and hope it be useful to someone else.
At first I thought it was just a matter of a for loop, create and start the thread inside the loop. Easy task.
As I ran the test...
on May 23, 2007
Recently, I've been asked a lot about Covalent Technologies report that
6 can scale to 16,000 users and what that means for glassfish.
Since glassfish can easily scale to 16,000 users as well (as Covalent
found out once they properly
configured glassfish), my reply has usually been accompanied by a
shrug: we've known for quite some time that NIO scales well.
But what does it mean to...
on May 2, 2007
For the fifth time this year, I've been contacted by a distraught user
claiming that glassfish doesn't scale or run well based on results seen
from ab (the Apache
Benchmark). And so again, I've had to explain why ab is a terrible
tool to use to measure the performance of your application (or web)
To be fair, glassfish does have some out-of-the-box settings that make
on Mar 23, 2007
One area in which Java has an advantage over typical HPC languages
(C/C++/Fortran) is its ability to use information at runtime to fine tune the
code. If used well, this allows you to write code that is a bit more general without
sacrificing performance, as the code will get "re-specialized" at runtime.
While in C/C++ sometimes you are stuck with macros or preprocessing scripts,...
on Jan 24, 2007
Today, Sun releases version 9.0 Update Release 1 Patch 1 of its application server (quite a mouthful!). See what's new in this release.
From my perspective, its most important fix is to a bug that caused the SPEC organization to mark our previously submitted SPECjAppServer scores as non-compliant. This allowed us to resubmit results on this benchmark.
Accordingly, a few weeks ago we resubmitted...
on Dec 14, 2006
While profiling a Java EE web app, I found myself wondering how much memory a process required. I attached a low-instrusion profiler to the JVM and watched a pattern repeat itself several times: the heap grew by ~15 MB, got collected, grew again by ~15 MB, got collected, etc.
My first reaction was to conclude that the process required 15 MB of heap in order to complete. But of course, that's an...
on Oct 21, 2006
The question has been asked many times by many different people. Is it better to declare variables inside or outside a loop. I did a search for this recently to find support for which is better. What I found was a lot of opinions with very little actual support for either position. My position has always been that it was more readable and better for performance and memory to declare variables...
on Aug 21, 2006
Java SE 5.0 Update 8 is available. Besides the traditional few dozens of bugfixes, this release closes a number of important performance bugs in the JIT compiler, GC and runtime. So even if you play more in the conservative side, it's a great time to evaluate and upgrade your Java runtime.
One of the fixed perf bugs is Bug 4803284: Bad performance when HotSpot cannot optimize polymorphic calls,...
on Aug 11, 2006
Strings are a fundamental part of any modern programming language, every bit as important as numbers. So you'd think that Java programmers would go out of their way to have a solid understanding of them -- and sadly, that isn't always the case.
I was going through the source code to Xerces (the XML parser included in Java) today, when I found a very surprising line:
on Jun 26, 2006
It is amazing how many wasteful activities a Windows machine performs that are not really necessary for most users. In this blog, I share some of my favorite hacks that should boost performance of a typical Windows XP/2000 machine, although your mileage may vary. You are welcome to use them, but please realize that unless you are careful, you can end up with a seriously corrupted Windows...
on Jun 19, 2006
Today, Sun posted our first-ever SPECjAppServer 2004 result on SJSAS 9.0
Platform Edition. This is the only SPECjAppServer result published so far
on an open-source application server -- and the result used an open-source
Operating System (Solaris 10) and open-source database (MySQL) as well.
It is also the first (and so far only) SPECjAppServer result published on
an application server that is...
on May 25, 2006
I am a creature of habit. At some level, I understand that a syntax-directed powerful editing tool might make me
more productive. But vi has been good enough for me for the past 25 years; it will be good enough for the next 25.
This is pretty much emblematic of my (problematic) approach to technology.
Why, then, have I recently switched to using the NetBeans profiler? Yes, it's free and powerful...
on Feb 13, 2006