mdtest测试工具
软件介绍
mdstest是软件的元数据操作基准测试工具,用来模拟对文件或者目录的open、stat、close操作,然后报告性能
下载软件压缩包:
yum install openmpi openmpi-devel -y
在/root/.bashrc中添加(注意也要添加mdtest的路径)
export PATH=$PATH:/usr/lib64/openmpi/bin/
source /root/.bashrc
下载
[root@lab8105 ~]# wget http://sourceforge.net/projects/mdtest/files/latest/download
解压
[root@lab8105 ~]# tar -xvf mdtest-1.9.3.tgz
修改makefile:
mdtest: mdtest.c
mpicc -Wall -D $(OS) $(LARGE_FILE) $(MDTEST_FLAGS) -g -o mdtest mdtest.c -lm
参数如下:
Usage: mdtest [-b #] [-B] [-c] [-C] [-d testdir] [-D] [-e] [-E] [-f first] [-F]
[-h] [-i iterations] [-I #] [-l last] [-L] [-n #] [-N #] [-p seconds]
[-r] [-R[#]] [-s #] [-S] [-t] [-T] [-u] [-v] [-V #] [-w #] [-y]
[-z #]
-b: branching factor of hierarchical directory structure
目录树的分支参数
-B: no barriers between phases (create/stat/remove)
不同的阶段没有隔离 (create/stat/remove);
-c: collective creates: task 0 does all creates and deletes
共同创建: task 0 完成所有的创建和删除工作;
-C: only create files/dirs
只创建文件或目录,不作删除;
-d: the directory in which the tests will run
指出测试运行的目录(若不指定,则默认当前目录);
-D: perform test on directories only (no files)
只对目录操作进行测试(不包括文件);
-e: number of bytes to read from each file
从每个文件读出的文件大小
-E: only read files
只读取文件
-f: first number of tasks on which the test will run
首先运行的任务号;
-F: perform test on files only (no directories)
只创建文件,没有目录;
-h: prints help message
输出帮助信息
-i: number of iterations the test will run
测试迭代循环次数;
-I: number of items per tree node
每个树节点包含的项目
-l: last number of tasks on which the test will run
最后运行的任务号
-L: files/dirs created only at leaf level
只在目录树的“叶子”层创建文件/目录;
-n: every task will create/stat/remove # files/dirs per tree
每个任务需要再每棵树中create/stat/remove的文件/目录数;
-N: stride # between neighbor tasks for file/dir stat (local=0)
遍历时指定和相邻任务的跨度
-p: pre-iteration delay (in seconds)
每次迭代之间延时(以秒计算)
-r: only remove files/dirs
删除文件/目录
-R: randomly stat files/dirs (optional seed can be provided)
随机遍历文件/目录 ;
-s: stride between the number of tasks for each test
每次测试的任务数的跨度
-S: shared file access (file only, no directories)
共享文件访问(只针对文件操作);
-t: time unique working directory overhead
记录特定目录的时间开销
-T: only stat files/dirs
-u: unique working directory for each task
为每个任务指定工作目录;
-v: verbosity (each instance of option increments by one)
-V: verbosity value
-w: number of bytes to write to each file
写到每个文件的字节数
-y: sync file after write completion
再写执行完后同步文件到磁盘(同步写)
-z: depth of hierarchical directory structure
目录树的深度;
NOTES:
* -N allows a "read-your-neighbor" approach by setting stride to
tasks-per-node. Do not use it with -B, as it creates race conditions.
允许"read-your-neighbor" 方法
* -d allows multiple paths for the form '-d fullpath1@fullpath2@fullpath3'
可以指定多个测试路径,'-d fullpath1@fullpath2@fullpath3'
* -B allows each task to time itself. The aggregate results reflect this
change.
允许每个任务对自己进行计时;
* -n and -I cannot be used together. -I specifies the number of files/dirs
created per tree node, whereas the -n specifies the total number of
files/dirs created over an entire tree. When using -n, integer division is
used to determine the number of files/dirs per tree node. (E.g. if -n is
10 and there are 4 tree nodes (z=1 and b=3), there will be 2 files/dirs per
tree node.)
* -R and -T can be used separately. -R merely indicates that if files/dirs
are going to be stat'ed, then they will be stat'ed randomly.
不能同时使用,因为指定了每个树节点的文件/目录数量,而-I指定的是整棵树的文件/目录数量。
Illustration of terminology:
Hierarchical directory structure (tree)
=======
| | (tree node)
=======
/ | \
------ | ------
/ | \
======= ======= =======
| | | | | | (leaf level)
======= ======= =======
In this example, the tree has a depth of one (z=1) and branching factor of
three (b=3). The node at the top of the tree is the root node. The level
of nodes furthest from the root is the leaf level. All trees created by
mdtest are balanced.
这个例子中,目录树深度为1(z=1),每个节点分支为3(b=3).最上面的节点为根节点,
关于openmpi的软件的使用
openmpi是并行的运行程序,配置的时候需要注意下
增加并行的运行节点
[root@lab8105 ~]# vim /etc/openmpi-x86_64/openmpi-default-hostfile
添加
lab8105 slots=1
lab8106 slots=1
特别注意加slots 这个是配置权重的,如果不配置,第一条有默认权重,就无法在数目小时进行均衡操作
检查是否配置成功,np为操作线程数
[root@lab8105 ~]# mpirun --allow-run-as-root -np 2 hostname
lab8105
lab8106
如果想单机执行多进程,可以用-host指定主机
[root@lab8105 ~]# mpirun -host lab8105 --allow-run-as-root -np 2 hostname
单机下多进程测试
2 task on 1 node
[root@lab8105 ~]# mpirun -host lab8105 --allow-run-as-root -np 2 mdtest -I 10 -z 5 -b 2 -d /mnt/zptest/ -t -c 2
-- started at 01/27/2015 21:06:23 --
mdtest-1.9.3 was launched with 2 total task(s) on 1 node(s)
Command line used: mdtest -I 10 -z 5 -b 2 -d /mnt/zptest/ -t -c 2
Path: /mnt/zptest
FS: 6.5 TiB Used FS: 59.2% Inodes: 0.6 Mi Used Inodes: 100.0%
2 tasks, 1260 files/directories
SUMMARY: (of 1 iterations)
Operation Max Min Mean Std Dev
--------- --- --- ---- -------
Directory creation: 312.088 312.088 312.088 0.000
Directory stat : 73447.245 73447.245 73447.245 0.000
Directory removal : 255.755 255.755 255.755 0.000
File creation : 638.824 638.824 638.824 0.000
File stat : 86747.366 86747.366 86747.366 0.000
File read : 84434.232 84434.232 84434.232 0.000
File removal : 207.545 207.545 207.545 0.000
Tree creation : 39.062 39.062 39.062 0.000
Tree removal : 46.971 46.971 46.971 0.000
-- finished at 01/27/2015 21:06:43 --
多机并发测试
如下显示的2 task on 2 node
[root@lab8105 ~]# mpirun --allow-run-as-root -np 2 mdtest -I 10 -z 5 -b 2 -d /mnt/zptest/ -t -c 2
-- started at 01/27/2015 21:04:35 --
mdtest-1.9.3 was launched with 2 total task(s) on 2 node(s)
Command line used: mdtest -I 10 -z 5 -b 2 -d /mnt/zptest/ -t -c 2
Path: /mnt/zptest
FS: 6.5 TiB Used FS: 59.2% Inodes: 0.6 Mi Used Inodes: 100.0%
2 tasks, 1260 files/directories
SUMMARY: (of 1 iterations)
Operation Max Min Mean Std Dev
--------- --- --- ---- -------
Directory creation: 312.355 312.355 312.355 0.000
Directory stat : 1611.000 1611.000 1611.000 0.000
Directory removal : 127.333 127.333 127.333 0.000
File creation : 309.295 309.295 309.295 0.000
File stat : 113257.534 113257.534 113257.534 0.000
File read : 203458.057 203458.057 203458.057 0.000
File removal : 98.523 98.523 98.523 0.000
Tree creation : 36.566 36.566 36.566 0.000
Tree removal : 20.191 20.191 20.191 0.000
-- finished at 01/27/2015 21:05:12 --
关于目录生成的问题:
这个是 -z 2 -b 3
[root@lab8106 mnt]# ls mdtest2/#test-dir.0/mdtest_tree.0/
mdtest_tree.1 mdtest_tree.2 mdtest_tree.3
[root@lab8106 mnt]# ls mdtest2/#test-dir.0/mdtest_tree.0/mdtest_tree.1/
mdtest_tree.4 mdtest_tree.5 mdtest_tree.6
这个是以这个目录开始的
[root@lab8106 mnt]# ls mdtest2/#test-dir.0/mdtest_tree.0/
mdtest测试工具的更多相关文章
- 渗透测试工具BurpSuite做网站的安全测试(基础版)
渗透测试工具BurpSuite做网站的安全测试(基础版) 版权声明:本文为博主原创文章,未经博主允许不得转载. 学习网址: https://t0data.gitbooks.io/burpsuite/c ...
- linux压力测试工具stress
最近给PASS平台添加autoscaling的功能,根据服务器的负载情况autoscaling,为了测试这项功能用到了stress这个压力测试工具,这个工具相当好用了.具体安装方式就不说了.记录下这个 ...
- [.NET] WebApi 生成帮助文档及顺便自动创建简单的测试工具
==========最终的效果图========== ==========下面开始干活:生成帮助文档========== 一.创建 WebApi 项目 二.找到 HelpPageConfig.cs 并 ...
- RabbitMQ调试与测试工具-v1.0.1 -提供下载测试与使用
最近几天在看RabbitMQ,所以发了两天时间写了一个调试和测试工具.方便使用. 下载地址:RabbitMQTool-V1.0.1.zip
- HTTP压力测试工具
HttpTest4Net是一款基于C#实现的和HTTP压力测试工具,通过工具可以简单地对HTTP服务进行一个压力测试.虽然VS.NET也集成了压力测试项目,但由于VS自身占用的资源导致了在配置不高的P ...
- 微软压力测试工具 web application stress
转自 http://www.cnblogs.com/tonykan/p/3514749.html lbimba 铜牌会员 这里给广大的煤油推荐一个web网站压力测试工具.它可以用来模拟多个用户操作网 ...
- WebService如何调试及测试工具
http://www.cnblogs.com/zfanlong1314/archive/2012/04/06/2434788.html 通常,我们在Visual Studio里调试ASP.NET网站, ...
- Android高手速成--第四部分 开发工具及测试工具
第四部分 开发工具及测试工具 主要介绍和Android开发工具和测试工具相关的开源项目. 一.开发效率工具 Json2Java根据JSon数据自动生成对应的Java实体类,还支持Parcel.Gson ...
- Linux下四款Web服务器压力测试工具(http_load、webbench、ab、siege)介绍
一.http_load程序非常小,解压后也不到100Khttp_load以并行复用的方式运行,用以测试web服务器的吞吐量与负载.但是它不同于大多数压力测试工具,它可以以一个单一的进程运行,一般不会把 ...
随机推荐
- pytest文档49-命令行参数--tb的使用
前言 pytest 使用命令行执行用例的时候,有些用例执行失败的时候,屏幕上会出现一大堆的报错内容,不方便快速查看是哪些用例失败. --tb=style 参数可以设置报错的时候回溯打印内容,可以设置参 ...
- 【自学编程】C语言编程简单的小程序,计算长方体体积!
计算长方体体积 有朋友会说长方体体积还不好算吗?长X宽X高.没错用计算器一下就可以出结果,编程反而麻烦些,但是我们说的是这种思维,如果复杂的重复运算的话写好程序就非常简单了. 简单运算下一个固定高度的 ...
- 我是先学C语言还是先学C++,实不相瞒,鱼和熊掌可兼得!
这是最近一周时间几个读者小伙伴所提的问题,我顺手截了两个图. 实不相瞒,这类问题之前也经常看到. 每次遇到这种问题,看起来很简单,但是打字一时半会还真说不清,想想今天周末了,写一篇文章来统一聊 ...
- 【图论】USACO07NOV Cow Relays G
题目大意 洛谷链接 给定一张\(T\)条边的无向连通图,求从\(S\)到\(E\)经过\(N\)条边的最短路长度. 输入格式 第一行四个正整数\(N,T,S,E\),意义如题面所示. 接下来\(T\) ...
- CentOS8平台nginx日志的定时切分
一,编写bash脚本: [root@yjweb crontab]# vi split_nginx_logs.sh 代码: #!/bin/bash # 备份nginx的日志 # 昨天的日期 file_d ...
- CUDA和cuDNN的安装
CUDA软件 Windows 打开NVIDIA CUDA网站,选择需要下载的版本,依次选择Windows平台,x86_64架构,10系统,exe(local)本地安装包,再选择Download即可下载 ...
- 简单又强大的pandas爬虫 利用pandas库的read_html()方法爬取网页表格型数据
文章目录 一.简介 二.原理 三.爬取实战 实例1 实例2 一.简介 一般的爬虫套路无非是发送请求.获取响应.解析网页.提取数据.保存数据等步骤.构造请求主要用到requests库,定位提取数据用的比 ...
- java刷题时常用容器详解
当初学java时,只是简单的把java基础知识过了一遍就跑去刷题了,很多知识都是在刷题的过程中慢慢加深理解的. 由于每次刷题时,刷到与容器有关的我基本上都跑去百度了,例如百度一下:java中List的 ...
- H5头部内容
<head> <meta charset="utf-8"> <title>口袋小鼠</title> <meta name=&q ...
- JUC---04Lock(二)ReentrantReadWriteLock
1.读写锁 分为读锁和写锁,多个读锁不互斥,读锁与写锁互斥,这是由jvm自己控制的,你只要上好相应的锁即可.如果你的代码只读数据,可以很多人同时读,但不能同时写,那就上读锁:如果你的代码修改数据,只能 ...