日本免费全黄少妇一区二区三区-高清无码一区二区三区四区-欧美中文字幕日韩在线观看-国产福利诱惑在线网站-国产中文字幕一区在线-亚洲欧美精品日韩一区-久久国产精品国产精品国产-国产精久久久久久一区二区三区-欧美亚洲国产精品久久久久

五 性能調(diào)試---I/O性能分析

1:衡量I/O閑忙程度的指標
2:I/O資源成為系統(tǒng)性能的瓶頸的征兆
3:哪些活動是占用I/O資源的大戶?
4:利用iostat分析I/O的利用率
5:利用SAR命令分析磁盤活動
6:利用SAR命令分析緩沖區(qū)的活動
7:利用SAR命令分析交換區(qū)的活動
8:利用GlancePlus分析系統(tǒng)的I/O活動情況
9:對I/O需求密集型系統(tǒng)的性能調(diào)試


衡量I/O閑忙程度的指標


下面是一些衡量I/O閑忙程度的經(jīng)用指標:

磁盤利用率(disk utilization)
磁盤隊列長度(disk queue length)
磁頭/邏輯卷的讀/寫速率(read/write rates per spindle/logical volume)
原始I/O(raw I/O):主要用于數(shù)據(jù)庫應(yīng)用
交換隊列的長度(swap queue length)
緩存命中率(buffer cache hit ratio)
網(wǎng)絡(luò)文件系統(tǒng)和無盤工作站速率(NFS and diskless rates(server))

I/O資源成為系統(tǒng)性能的瓶頸的征兆


當I/O成為瓶頸時,會出現(xiàn)下面這些典型的癥狀:

過高的磁盤利用率(high disk utilization)
太長的磁盤等待隊列(large disk queue length)
等待磁盤I/O的時間所占的百分率太高(large percentage of time waiting for disk I/O)
太高的物理I/O速率:large physical I/O rate(not sufficIEnt in itself)
過低的緩存命中率(low buffer cache hit ratio(not sufficient in itself))
太長的運行進程隊列,但CPU卻空閑(large run queue with idle CPU)

哪些活動是占用I/O資源的大戶?


下面是一些占用大量I/O資源的活動:

換頁(paging):paging不僅會引起內(nèi)存問題,還可能引起磁盤問題;
open,creat,and stat system calls:系統(tǒng)調(diào)用會引起大量的磁盤I/O;
multiuser I/O and random I/O
relational database
core dumps


利用iostat分析I/O的利用率


iostat - report I/O statistics

iostat iteratively reports I/O statistics for each active disk on the system.

If two or more disks are present, data is presented on successive lines for each disk.

With the advent of new disk technologies, such as data striping, where a single data transfer is spread across several disks, the number of milliseconds per average seek becomes impossible to compute accurately. At best it is only an approximation, varying greatly, based on several dynamic system conditions. For this reason and to maintain backward compatibility, the milliseconds per average seek ( msps ) field is set to the value 1.0.

它的語法為:

iostat [-t] [interval [count]]

其選項的含義為:

-t:Report terminal statistics as well as disk statistics.
interval: Display successive lines which are summaries of the last interval seconds. The first line reported is for the time since a reboot and each subsequent line is for the last interval only.
count: Repeat the statistics count times.
對結(jié)果的分析:

通過查看bps列和sps列的值我們可以知道哪些磁盤比較忙,哪些磁盤比較閑 。


利用SAR命令分析磁盤活動


通過命令sar -d,我們可以分析系統(tǒng)中的每個磁盤和磁帶的活動情況 。

Report activity for each block device, e.g., disk or tape drive. One line is printed for each device that had activity during the last interval. If no devices were active, a blank line is printed.Each line contains the following data:

device:設(shè)備名;
%busy: Portion of time device was busy servicing a request; statistics.
avque: Average number of requests outstanding for the device;
r w/s: Number of data transfers per second (read and writes) from and to the device;
blks/s: Number of bytes transferred (in 512-byte units) from and to the device;
avwait: Average time (in milliseconds) that transfer requests waited idly on queue for the device;
avserv: Average time (in milliseconds) to service each transfer request (includes seek, rotational latency, and data transfer times) for the device.

推薦閱讀