doctordue 发表于 2014-10-25 19:54

磁盘性能显示疑问

磁盘分成多个区,为什么iostat显示出来的tps值各分区的总和比磁盘的高?比如:
$iostat -d -k 1 10
Device:            tps    kB_read/s    kB_wrtn/s    kB_read    kB_wrtn
sda            39.29      21.14         1.44441339807   29990031
sda1            0.00         0.00         0.00       1623      523
sda2            1.32         1.43         4.54   29834273   94827104
sda3            6.30         0.85      24.95   17816289520725244
sda5            0.85         0.46         3.40    9543503   70970116
sda6            0.00         0.00         0.00      550      236
sda7            0.00         0.00         0.00      406          0
sda8            0.00         0.00         0.00      406          0
sda9            0.00         0.00         0.00      406          0
sda10            60.68      18.35      71.43383002263 1490928140

sda1~10表示磁盘的分区,sda表示一号磁盘,sda1+sda2+...sda10不是应该=sda吗?是不是我理解概念有问题?sda不是整个磁盘的状态统计?

再比如:
iostat -N
Device:            tps   Blk_read/s   Blk_wrtn/s   Blk_read   Blk_wrtn
sda               1.75         1.98      21.98   591090    6555776
vg_xx-lv_root   2.87         1.95      21.98   581282    6555728
vg_xx-lv_swap   0.00         0.01         0.00       2752          0


iostat -p
Device:            tps   Blk_read/s   Blk_wrtn/s   Blk_read   Blk_wrtn
sda               1.75         1.98      21.98   591090    6555776
sda1            0.00         0.01         0.00       4128         48
sda2            1.75         1.96      21.98   585746    6555728
dm-0            2.87         1.95      21.98   581282    6555728
dm-1            0.00         0.01         0.00       2752          0
根据FDISK显示,其中dm-0,dm-1就是vg_xx-lv_root,vg_xx-lv_swap,他们两个合起来应该是sda2啊,为什么加起来又会比sda2多这么多?
fdisk -l

Disk /dev/sda: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000dfedc

   Device Boot      Start         End      Blocks   IdSystem
/dev/sda1   *         1          64      512000   83Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2            64      3917    30944256   8eLinux LVM

Disk /dev/mapper/vg_xx-lv_root: 28.5 GB, 28462546944 bytes
255 heads, 63 sectors/track, 3460 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/vg_xx-lv_swap: 3221 MB, 3221225472 bytes
255 heads, 63 sectors/track, 391 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
页: [1]
查看完整版本: 磁盘性能显示疑问