ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 用xdd测试磁盘的读写性能

用xdd测试磁盘的读写性能

原创 Linux操作系统 作者:tonykorn97 时间:2007-05-11 00:00:00 0 删除 编辑

用xdd测试磁盘的读写性能,这个工具的主要好处就是可以测试裸设备.


读测试
xdd –op read –targets 1 /dev/sda9 –reqsize 128 -mbytes 64 –passes 3 –verbose
写测试
xdd –op write –targets 1 /dev/sda9 –reqsize 128 -mbytes 64 –passes 3 –verbose
读写各占一半测试
./xdd.linux -rw 50 -targets 1 /dev/sda9 -reqsize 2 -mbytes 1024 -verbose


主要参数:
-blocksize [target ] <#bytes/block>
设置块字节大小,默认为1024字节。

-processor procesor_number
设置运行在那个cpu上面

-reqsize
固定请求的字节大小(一次读写请求的字节大小,以块为单位)

-targets
指定要操作的目标对象
例子:
-targets 2 /dev/sda7 /dev/sda8

-verbose
显示详细信息。

-op [target ] read|write
指定运行的是read还是write操作

-numreqs
限制传输的块的数量,(目的就是设置此次操作总共需要读或写的字节数量)

-kbytes
固定以k为单位限制传输的大小
-mbytes
固定以M为单位限制传输的大小
如果-numregs和-kbytes同时存在,以-numregs为准。

-rwratio (or –rw)
描述读写的比率,例如:-rwratio 30.2 表示30.2%为读操作,剩余的为写操作

–passes
运行的次数

-timelimit
限定时间

例子:
[root@test bin]# ./xdd.linux -op read -targets 1 /dev/sda9 -reqsize 2 -numreqs 128 -verbose

IOIOIOIOIOIOIOIOIOIOI XDD version 6.5.013007.0001 IOIOIOIOIOIOIOIOIOIOIOI
xdd - I/O Performance Inc. Copyright 1992-2007
Starting time for this run, Tue May 8 18:19:12 2007

ID for this run, 'No ID Specified'
Maximum Process Priority, disabled
Passes, 1
Pass Delay in seconds, 0
Maximum Error Threshold, 0
Target Offset, 0
I/O Synchronization, 0
Total run-time limit in seconds, 0
Output file name, stdout
CSV output file name,
Error output file name, stderr
Pass seek randomization, disabled
File write synchronization, disabled
Pass synchronization barriers, enabled
Number of Targets, 1
Number of I/O Threads, 1

Computer Name, test, User Name, root
OS release and version, Linux 2.4.21-37.EL #1 Wed Sep 7 13:35:21 EDT 2005
Machine hardware type, i686
Number of processors on this system, 1
Page size in bytes, 4096
Number of physical pages, 288415
Megabytes of physical memory, 1126
Seconds before starting, 0
Target[0] Q[0], /dev/sda9
Target directory, "./"
Process ID, 21864
Thread ID, -1251460176
Processor, all/any
Read/write ratio, 100.00, 0.00
Throttle in MB/sec, 0.00
Per-pass time limit in seconds, 0
Blocksize in bytes, 1024
Request size, 2, blocks, 2048, bytes
Number of Requests, 128
Start offset, 0
Pass Offset in blocks, 0
I/O memory buffer is a normal memory buffer
I/O memory buffer alignment in bytes, 4096
Data pattern in buffer, '0x00'
Data buffer verification is disabled.
Direct I/O, disabled
Seek pattern, sequential
Seek range, 1048576
Preallocation, 0
Queue Depth, 1
Timestamping, disabled
Delete file, disabled

T Q Bytes Ops Time Rate IOPS Latency %CPU OP_Type ReqSize
TARGET PASS0001 0 1 262144 128 0.011 24.112 11773.36 0.0001 0.01 read 2048
TARGET Average 0 1 262144 128 0.011 24.112 11773.36 0.0001 0.01 read 2048
Combined 1 1 262144 128 0.011 24.112 11773.36 0.0001 0.01 read 2048
Ending time for this run, Tue May 8 18:19:12 2007

[root@test bin]#

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/312079/viewspace-245659/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: tmpfs文件系统
下一篇: 用bonnie测试硬盘
请登录后发表评论 登录
全部评论

注册时间:2007-12-05

  • 博文量
    1854
  • 访问量
    2088352