Open Source Performance Monitoring Tools, Tips and Tricks for Java
Matt Secoske
matt@secosoft.net
Your project requires performance monitoring/planning/goals when your business requires it. You can do this through profiling, which is a focused look at system execution. To plan for performance: 1) determine your goals, 2) create testing scenarios, 3) determine monitoring / profiling needs. 4) Integrate this into your development process, and finally 5) integrate it into your production environment.
In planning, you need to know:
- expected total number of clients
- expected peak total number of clients
- most common tasks these clients will be doing
- acceptable response time
- how long will the data stay around
and what you want to monitor:
hardware (web/app/db servers) cpu, memory, cache hit %, disk and network speed.
java specific (gc, app metrics)
JUnitPerf decorates JUnit test, great for benchmarking particular tests or test cases while refactoring, it's good at continuous performance testing, but not so good as a deployed monitoring solution. It's also available in JUnit 4.0 as an annotation.
The Grinder is a clusterable performance tester. It can do stress, load, capacity and functional testing. It can proxy traffic for recording and playback later as part of tests.
Apache JMeter does stress, load, capacity and functional testing. It's not clusterable and doesn't do proxy recording. It does have a plugin architecture for customization.
Log file analysis is another way to monitor performance. Since you're writing to disk it can have a noticeable negative impact on the performance you're trying to monitor. It requires changes to your source code, and doesn't accurately reflect how expensive your operation was, only the time required to execute it. If you're committed to logging, Aspects is a recommended way of doing it (AspectJ, AspectWerkz, Java Interactive Profiler, GlassBox Inspector).
JFluid / NetBeans Profiler - part of Sun's new JVM profiling tool, and also part of the NetBeans Profiler Extension. It supports local and remote profiling, and provides limited JVM support (mainly 5.0 and up).
On the other side, there's Eclipse TPTP. It does local and remote profiling, and requires a JVM agent for remote use.
Matt then did a brief demo of TPT in Eclipse, and a deeper demo of the NetBeans profiler, exploring many of the in's and out's.
He closed with a few tips and tricks:
- Put in just enough metrics to get your performance measurements
- Performance Test != Production
- Real world data + real world usage patters + near-production environment = accurate benchmarks
- Keep a little monitoring in production.
Session 2
Hacking Your Home Phone System (Year 2) - aka. Does the Phone Work Today?
Brian Aker
Terms:
PBX - private branch exchange
FXO - receives signal
FXS - generates signal
DMARK - demarcation point
PSTN - public switched telephone network
On wiring: put boxes in every wall, with 3/4 conduit (the largest you can fit
in a wall). Metal boxes survive better and are easier to mount. Run
electricity separately and cross at 90deg angles. More than 360deg worth of
conduit turns makes it hard to run cable later. Finally, don't leave boxes
empty for inspections - it worries inspectors.
Asterisk is an open source project that creates all sorts of phone
functionality in software (voicemail, conferencing, PBX, etc.) Digium makes
the best hardware (and funds Asterisk development). Skip the cheaper cards, and
get the TDM400P cards. Be careful of the FXO / FXS ports, as plugging the
wrong one into the wrong place can blow up the card.
Phone Instruments
BudgetTone: $40, cheap, cheap sounding, voice CID
Snom 190: $299, entirely scriptable via web services, can talk to multiple voip
services, no buttons for lines
Polycom SoundPoint: $200, good sound, buttons for lines, PoE, slow to boot
Analog to Digital Devices
Sipura 2000: 2port FXS analog adapter, $70
Sipura 3000: FXS/FXO bi-directional adapters, $70
The Computers: Any linux box will work.
The Software: Asterisk is hard to setup. The extensions file is the key to it
all. Plan on it taking a while.
The next generation is Asterisk@Home. The CD boots, wipes the drives, and
installs a working Asterisk based on Centos. It probably needs to be tweaked
after it installs, but it works. Recently they changed the name of the product
to Trixbox (which comes with SugarCRM built in).
High-availability: MySQL Cluster - set up a second machine, cluster them.
Mashups:
- Front-door solenoid: unlock your doors via your phone
- ipkall: free phone numbers!! (dial-a-song, a special number for certain
callers) - dial-a-monkey network
- Livejournal's mod_mp3: good for creative content, freaks out business people
- AIM Bot: with the follow-to-phone feature, it sends IM messages when messages arrive (configurable for certain folks, if that suits you.
Hardware Vendors
Digium - http://www.digium.com/
Polycom - http://www.polycom.com/
Snom - http://www.snom.com/
Sipura - http://www.sipura.com/
Links
http://voip-info.org/
http://www.asterisk.org/
http://www.planetasterisk.org/
FreeWorld Dialup - http://www.freeworlddialup.com/
http://krow.livejournal.com/ <- Speaker's blog.
-Bill
Tags: OSCON06, Asterisk
No comments:
Post a Comment