过期罐头电脑论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 6567|回复: 0
收起左侧

linux dd读取写入磁盘速度

[复制链接]
lycan 2011-6-27 12:36:25 | 显示全部楼层
time有计时作用,dd用于复制,从if读出,写到of。if=/dev/zero不产生IO,因而 可以用来测试纯写速度。同理of=/dev/null不产生IO,可以用来测试纯读速度。bs是每次读或写
  的大小,即一个块的大小,count是读写块的数量。

  指定出读取,写入文件到硬盘的速度
  1.测/目录所在磁盘的纯写速度:
  [root@base-dmz1 /]# time dd if=/dev/zero bs=1024 count=1000000 of=/1Gb.file
  1000000+0 records in
  1000000+0 records out
  1024000000 bytes (1.0 GB) copied, 2.57314 seconds, 398 MB/s
  real 0m2.787s
  user 0m0.920s
  sys 0m1.867s
  以上是由于 使用了time才显示的,linux5中不需要. 使用,在linux4中是不会有(1024000000 bytes (1.0 GB) copied, 2.57314 seconds, 398 MB/s)部分,因而 需要. time命令来计
  算复制的时间。
  2.测/目录所在磁盘的纯读速度:
  dd if=/kvm/ftp/other/1Gb.file bs=64k |dd of=/dev/null
  382860+0 records in
  382860+0 records out
  3136389120 bytes (3.1 GB) copied, 68.38 seconds, 45.9 MB/s
  real 1m8.406s
  user 0m0.039s
  sys 0m4.573s
  3.测读写速度(这是什么):
  dd if=/vat/test of=/oradata/test1 bs=64k
  dd: writing `/oradata/test1': No space left on device
  5025+0 records in
  5024+0 records out
  329261056 bytes (329 MB) copied, 23.8813 seconds, 13.8 MB/s
  注:理论上复制量越大测试越精确 。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

一键重装系统|雨人系统下载|联系我们|网站地图|过期罐头电脑论坛

GMT+8, 2024-4-27 13:19 , Processed in 0.037730 second(s), 25 queries .

官方免责声明:本站内容来自网友和互联网.若侵犯到您的版权.请致信联系,我们将第一时间删除相关内容!

Powered by Discuz!

专注于win7_win10_win11系统下载装机

© 2010-2023 GQGTPC.Com

快速回复 返回顶部 返回列表