linux 磁盘io技术1------概述

一、磁盘基本信息查询

df -h:查看磁盘分区、大小、使用比例、mount点,这个地方会涉及到/dev/shm,一个磁盘内存区,这里面的文件实际上是加载到内存里面的。

fdisk -lu:磁盘总大小、扇区大小、磁柱的个数等。

dumpe2fs  /dev/sda1:查看某个分区的具体情况,可以查看到磁盘文件系统block大小。


二、磁盘流量查看

dstat -df:磁盘每个分区的读写流量情况

iostat -xk 5:更具体的信息查询,主要关注的如下2项。这个命令默认系统是没有的,需要通过yum install sysstat安装才能使用

await: The average time (in milliseconds) for I/O requests issued to the device to be served. This includes the time spent by the requests in queue and the time spent servicing them.

%util:Percentage of CPU time during which I/O requests were issued to the device (bandwidth utilization for the device). Device saturation occurs when this value is close to 100%.


三、磁盘 raid

具体介绍参见:http://molinux.blog.51cto.com/2536040/516008

性能比较:关于raid:今天实验了一下raid10和raid5的写性能问题,raid10写性能确实不错,基本不耗用cpu wait,但是raid5基本占用70~80%cpu wait,所以在不需要备份时,采用raid0是首选,性能好。

常见磁盘写性能:SATA: 150MB/s,  SAS: 300MB/s,  SSD: 500MB/s


四、异步读写

参见之前写的两篇文章:

http://blog.csdn.net/beginning1126/article/details/16989421

http://blog.csdn.net/beginning1126/article/details/17001819

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值