Java Performance笔记

IPC: instructions per clock

CPI: cycles per instruction

 

1. 较高的内核/系统CPU使用率意味着程序可能有较激烈的资源竞争或者大量的IO交互。要尽可能地降低内核CPU占用率。

 

2. CPU utilization monitoring tools bundled with modern operating

systems report CPU utilization and do not report the percentage of CPU clock cycles
the CPU has been executing instructions. This means that the operating system tools
report a CPU as being utilized even though the CPU may be waiting for data to be
fetched from memory. This scenario is commonly referred to as a stall. Stalls occur
any time the CPU executes an instruction and the data being operated on by the
instruction is not readily available in a CPU register or cache.

 

3. Windows下监控性能的工具有perfmon和typeperf。Linux下有http://teasp.iteye.com/admin/blogs/1940837

 

4. A general guideline to follow is observing run queue depths over an extended
period of time greater than 1 times the number of virtual processors is something to
be concerned about but may not require urgent action. Run queue depths at 3 to 4
times, or greater, than the number of virtual processors over an extended time period
should be considered an observation that requires immediate attention or action.

 

5. A Java application or JVM that is swapping or utilizing virtual memory experiences
pronounced performance issues...The time it takes to page in any portion of the Java heap into memory can
dramatically increase the duration of a garbage collection.

 

6. 在Linux上安装小巧的sysstat可以得到这些:sar, iostat, sa1, sa2, sadf, mpstat, sadc, sysstat

 

7. 用pidstat可以查看进程主动和被动上下文切换的频率:cswch/s(主动) nvcswch/s(被动),这两者的值乘以80000就是上下文切换消耗掉的时钟周期。

 

8. nicstat(要安装)可以查看网络传输利用率,netstat只能知道单位时间传输的包数,而不能统计包的大小。

 

9. 用iostat -xm可以看磁盘IO使用率。

 

10. sar是个好工具。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值