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
One of the things that always interests me is the relative performance of
the collection classes. Recently, I discovered a particular anomaly of
the ConcurrentHashMap class.
I've always considered the ConcurrentHashMap class as something to be
used in special cases: use a Hashtable, and if you notice a lot of
contention for your hashtable, then switch to a ConcurrentHashMap. Of
on Dec 9, 2005
So I found myself wanting to know if I could print the enclosing method of the current line of code being executed. A quick look at the reflection API didn't yield much. A little reflective thinking later, I came to the conclusion that it's impossible for the reflection API to tell me this since it explores binary files at the class level.
Thats when it struck me that Log4J does exactly what...
on Nov 14, 2005
I was a little surprised to find the JavaOne 2006 Call For Papers in my email this week; wasn't JavaOne 2005 just last month? It can't be mid-November; it's been 60 degrees for weeks in New York.
If you're interested in presenting anything releated to Java EE performance at JavaOne, I encourage you to submit an abstract. We did not have the largest selection of such talks last year, and I'd like...
on Nov 11, 2005
For the last few years, I've worked in the Java Performance Group at Sun
Microsystems. So I thought it might be good to begin my first blog entry by
talking about what's important in looking at performance.
I'm prompted to look into this topic because of a recent blog by
who discusses the performance of SPECjAppServer 2004. The thing about
application server benchmarks -- and...
on Sep 30, 2005
Perception vs. Reality: How big is that process?
One of the issues we have run into our work on the Java performance team is the difference between the physical memory size of a process and the perceived size of that process.
"Perceived" footprint is the number reported by the operating system (by tools such as "ps" and "top" on Unix/Linux, and "Task Manager" on Windows) that a process takes up...
on Aug 8, 2005
I spend half my time trying to identify what performance systems are doing by reproducing their behaviour in a performance testbed. It isn't always successful - I'd like to get profile information directly from the production systems, but even low overhead profilers can't get certain types of information in a low enough overhead way (I've tried, believe me I've tried).
One piece of info that is...
on May 25, 2005
Sometimes working with a good profiler gives you very valuable insights into performance bottlenecks. Of course, there is a convention of "don't start profiling until your code is production quality", but there are few steps that you may take to spare yourself a lot of trouble.
I've been looking at the source code of the JXM project as part of the bindmark initiative. Altough this project appears...
on Jan 26, 2005
It has almost been eight months since
Sun first talked about Fast Web Services (FWS) (find out more about
Today our group attended an interesting TOI meeting on FWS delivered
by Sun's FWS team. It was very nice of FWS to come and talk to us.
Your effort is well appreciated, guys!
Anyway, here are some of the highlights
from this TOI session -
There is a different set of issues...
on Apr 7, 2004