|
本帖最后由 大漠行者 于 2010-10-27 16:05 编辑
开个头来探讨下典型J2EE系统性能的诊断步骤。
表现:响应时间变大
通常会分析一下部分:(大家熟悉的帮助补充细化)
1. 查看系统CPU使用情况: 通常usr+sys > 80% 被视为瓶颈。
关键参数:
a. 使用百分比%
b. Processor Queue Length
c. Context Switches (switching between threads)
d. 线程和进程的数量
要查看的方面:
1. 整个CPU使用率在 60%~80% ,并且伴随高queue length
2. 非常大的 context switching 并且线程或进程的数量很高.
2. 查看系统内存使用情况。 主要看换页频率
3. 查看磁盘使用情况。 通常 read/write queue length > 3 可以深入调查。
4. GC : 通常pause time < 1s 为好
5. DB : heap ...
6. 中间件: 数据源、线程池....
工具:
Nmon (AIX)
Developed by an IBMer (Nigel Griffiths) and use widely throughout the field, and now supported by IBM. (http://www.ibm.com/developerworks/wikis/display/WikiPtype/nmon)
Installed by default with AIX 5.3 TL09 and AIX 6.1 TL02
Open source version available for Linux as well.
Perfmon (Windows)
Built-in to Windows Server operating systems.
Top (Linux) / topas (AIX) / vmstat/iostat (AIX/Sun/HP)
Built-in tools that provide a quick “look inside” at your systems state.
PerfPMR
Official IBM tool for collecting a snapshot of an AIX system during period of poor performance. Collects all relevant information about system to be used for thorough problem diagnosis. Support will require you to do this before (ftp://ftp.software.ibm.com/aix/tools/perftools/perfpmr/)
|
|