Chapter 25Performance Analysis.ppt
《Chapter 25Performance Analysis.ppt》由会员分享,可在线阅读,更多相关《Chapter 25Performance Analysis.ppt(17页珍藏版)》请在麦多课文档分享上搜索。
1、Chapter 25 Performance Analysis,What you can do to improve performance,Memory size has a major influence on performance Correct the problems of usage Load balance appliance Organize the systems hard disks and filesystems Monitoring your networks ,Factors that affect Performance,Four major resources
2、CPU Time Memory Hard disk I/O bandwidth Network I/O bandwidthWhere is the real bottleneck Not CPU, hard disk bandwidth it is ! When memory is not enough, system will do swap, so memory and disk bandwidth are the major suspects,System Performance Checkup Analyzing CPU usage (1),Three information of C
3、PU Overall utilization Help to identify whether the CPU resource is the system bottleneck Load average Per-process consumption Identify specific processs CPU utilization,System Performance Checkup Analyzing CPU usage (2),vmstat command Report kernel statistics about process, memory, cpu, Usage: % vm
4、stat c 2 w 1 us: user time High us means high computation sy: system time High sy means process are making lots of system call or performing I/O id: cpu idle us and sy time should half-half Monitoring interval should not be too small,tytsaiu3:/var/log vmstat c 2 w 5 procs memory page disks faults cp
5、ur b w avm fre flt re pi po fr sr da0 da1 in sy cs us sy id3 2 0 50364 1587316 3 0 0 0 3 0 0 0 931 786 181 0 0 1000 2 0 50368 1587312 5 0 0 0 0 0 0 0 250 91 23 0 0 99,System Performance Checkup Analyzing CPU usage (3),faults (average per second over last 5 seconds) in: device interrupt per interval
6、sy: system calls per interval cs: cpu context switch rate,tytsaiu3:/var/log vmstat c 2 w 5 procs memory page disks faults cpur b w avm fre flt re pi po fr sr da0 da1 in sy cs us sy id3 2 0 50364 1587316 3 0 0 0 3 0 0 0 931 786 181 0 0 1000 2 0 50368 1587312 5 0 0 0 0 0 0 0 250 91 23 0 0 99,tytsaiccb
7、sd3: vmstat c 5 w 5procs memory page disk faults cpur b w avm fre flt re pi po fr sr ad0 in sy cs us sy id0 0 0 231320 68792 320 4 0 0 264 7 0 2273 3381 952 16 4 800 0 0 232984 67100 558 0 0 0 386 0 1 1958 3285 551 11 5 841 0 0 228252 69272 192 2 0 0 292 0 5 2787 2626 681 23 4 731 0 0 221564 72048 1
8、02 0 0 0 229 0 0 1395 556 184 1 2 970 0 0 209624 76684 96 0 0 0 306 0 0 1350 935 279 0 2 97,High load, busy http server,Nothing to do Server,System Performance Checkup Analyzing CPU usage (4),Load average The average number of runnable processes Including processes waiting for disk or network I/Oupt
9、ime command Show how long system has been running and the load average of the system over the last 1, 5, and 15 minutes Usage: % uptime,tytsaimgate2 uptime 8:22AM up 6 days, 22:13, 2 users, load averages: 0.06, 0.02, 0.00,System Performance Checkup Analyzing CPU usage (5),top command Display and upd
10、ate information about the top cpu processes ps command Show process statusrenice command renice n increment p pid renice +1 987 u daemon root p 32,System Performance Checkup Analyzing memory usage (1),When memory is not enough Memory page has to be “swapped out” to the disk block LRU (Least Recently
11、 Used) algorithm Bad situation “desperation swapping” Kernel forcibly swaps out runnable process Extreme memory shortageTwo numbers that quantify memory activity Total amount of active virtual memory Tell you the total demand for memory Page rate suggest the proportion of actively used memory,System
12、 Performance Checkup Analyzing memory usage (2),To see amount of swap space in use pstat s or swapinfo -k (FreeBSD) swapon s (Linux) swap l (Solaris)pstat command % pstat -s,csduty -chiahung- pstat -s Device 1K-blocks Used Avail Capacity /dev/label/swap-0 1048572 0 1048572 0% /dev/label/swap-1 10485
13、72 0 1048572 0% Total 2097144 0 2097144 0%,System Performance Checkup Analyzing memory usage (3),vmstat command procs r: in run queue b: blocked for resource w: runnable or short sleeper but swapped memory avm: active virtual pages fre: size of the free list page (averaged each five seconds, given i
14、n units per second) flt: total number of page faults pi: pages paged in po: pages paged out 50 page-out cause about 1 seconds latency fr: pages freed per second,csws1 -chiahung- vmstat -c 3 -w 5procs memory page disks r b w avm fre flt re pi po fr sr da0 da1 0 3 0 1427M 1196M 224 0 0 0 312 0 0 0 0 3
15、 0 1427M 1196M 3 0 0 0 169 0 12 12 0 3 0 1427M 1196M 3 0 0 0 110 0 15 15,System Performance Checkup Analyzing disk I/O,iostat command Report I/O statistics Usage: iostat w 1 c 5 tin/tout: characters read from /write to terminal KB/t: kilobytes per transfer tps: transfers per second MB/s: megabytes p
- 1.请仔细阅读文档,确保文档完整性,对于不预览、不比对内容而直接下载带来的问题本站不予受理。
- 2.下载的文档,不会出现我们的网址水印。
- 3、该文档所得收入(下载+内容+预览)归上传者、原创作者;如果您是本文档原作者,请点此认领!既往收益都归您。
下载文档到电脑,查找使用更方便
2000 积分 0人已下载
下载 | 加入VIP,交流精品资源 |
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- CHAPTER25PERFORMANCEANALYSISPPT
