The last day was pretty chaotic with our flight status changing throughout the day. The only complete session I attented was Managing Your Application’s Performance Into Production. It was one of my favorite sessions as it wasn’t too commercial, yet not just abstract solutions are J2EE spec. experts are fond of doing.
Basically the topic was monitoring, and how to achieve a balance between visibility and performance overhead. (think Heisenberg’s uncertainty principle). The more instrumentation, the bigger the performance impact – even if it’s trivial the fundamentals remain. The presentation was sponsored by Veritas (recently acquired by Symantec I learned) and briefly mentioned how they achieve this goal.
Using a pattern they call “Adaptive Instrumentation”, the profile execution stacks and identify the best intrumentation points in code. Their instrumentation is done dynamically at runtime using aspects. Many other sessions I attended involved using AOP to achieve different things. The most favored solution today is using some form of class loader magic. While the specifics may vary by implementation, it goes something like this:
An “agent” has a listing of code points to instrument. At class loading time, the agent intervenes and provides an instrumented version of the class as it’s loaded. There are some real benefits to this approach:
1) no special build is required. You can used the RC or production bits as desired
2) restarting the app is all that’s needed to “undo” the instrumentation – this makes it somewhat reasonable in some production environments (easy rollback)
3) there’s no deployment changes – no classpath trickery (think Clover) or jmx hooks needed.
The single biggest theme I’d like to apply is “don’t assume test outcomes or usage patterns”.
Too often we *think* we know what sort of traffic to use during load tests. Maybe historically production purchases have been 70% red products, and 20% blue products – while that’s a decent place to start, if the market suddenly shifts and everyone is buying purple we could experience a largely untested usage scenario.
Using this Veritas solution one can make reaction based (think IRT) investigations more productive. The evil code is profiled instrumented and we effectively are provided with debugging like output that can even show values and state of the the stackflow.

















