官方文档
mongoperf is a utility to check disk I/O performance independently of MongoDB.

It times tests of random disk I/O and presents the results. You can use mongoperf for any case apart from MongoDB. The mmf true mode is completely generic. In that mode it is somewhat analogous to tools such as bonnie++ (albeit mongoperf is simpler).

Options

mongoperf
--help, -h
Returns information on the options and use of mongoperf.

mongoperf accepts configuration options in the form of a file that holds a JSON document. You must stream the content of this file into mongoperf, as in the following operation:

mongoperf < config
In this example config is the name of a file that holds a JSON document that resembles the following example:

{
nThreads:,
fileSizeMB:,
sleepMicros:,
mmf:,
r:,
w:,
recSizeKB:,
syncDelay:
}
See the Configuration Fields section for documentation of each of these fields.

Configuration Fields

mongoperf.nThreads
Type: Integer.

Default: 1

Defines the number of threads mongoperf will use in the test. To saturate your system’s storage system you will need multiple threads. Consider setting nThreads to 16.

mongoperf.fileSizeMB
Type: Integer.

Default: 1 megabyte (i.e. 10242 bytes)

Test file size.

mongoperf.sleepMicros
Type: Integer.

Default: 0

mongoperf will pause for the number of specified sleepMicros divided by the nThreads between each operation.

mongoperf.mmf
Type: Boolean.

Default: false

Set mmf to true to use memory mapped files for the tests.

Generally:

when mmf is false, mongoperf tests direct, physical, I/O, without caching. Use a large file size to test heavy random I/O load and to avoid I/O coalescing.
when mmf is true, mongoperf runs tests of the caching system, and can use normal file system cache. Use mmf in this mode to test file system cache behavior with memory mapped files.
mongoperf.r
Type: Boolean.

Default: false

Set r to true to perform reads as part of the tests.

Either r or w must be true.

mongoperf.w
Type: Boolean.

Default: false

Set w to true to perform writes as part of the tests.

Either r or w must be true.

mongoperf.recSizeKB
New in version 2.4.

Type: Integer.

Default: 4 kb

The size of each write operation.

mongoperf.syncDelay
Type: Integer.

Default: 0

Seconds between disk flushes. mongoperf.syncDelay is similar to --syncdelay for mongod.

The syncDelay controls how frequently mongoperf performs an asynchronous disk flush of the memory mapped file used for testing. By default, mongod performs this operation every 60 seconds. Use syncDelay to test basic system performance of this type of operation.

Only use syncDelay in conjunction with mmf set to true.

The default value of 0 disables this.

Use

mongoperf < jsonconfigfile
Replace jsonconfigfile with the path to the mongoperf configuration. You may also invoke mongoperf in the following form:

echo "{nThreads:16,fileSizeMB:10000,r:true,w:true}" | mongoperf
In this operation:

mongoperf tests direct physical random read and write io’s, using 16 concurrent reader threads.
mongoperf uses a 10 gigabyte test file.

mongoperf的更多相关文章

  1. mongoperf用法

    mongoperf是mongoDB自带工具,用于评估磁盘随机IO性能. 官方文档 使用方法 作用:用于部署前,评估mongodb所在存储的IO性能 用法:mongoperf <conffile, ...

  2. 使用mongoperf评估磁盘随机IO性能

    用法举例: # 16个io线程 # 随机读写10GB的测试文件 echo "{nThreads:16,fileSizeMB:10000,r:true,w:true}" | mong ...

  3. mongodb的IO测试工具 mongoperf

    之前没发现mongoperf这个工具,测试IO的状态用的是iostat来进行观察. mongoperf < myjsonconfigfile  echo "{nThreads:2,fi ...

  4. Mongodb 基础(Z)

    Mongodb的客户端支持 作为一款非常成熟NoSQL数据库,Mongdb对各种编程语言的支持已经非常完善了,目前已经支持各大主流编程语言包括:1,mongo shell 2,Python 3,Jav ...

  5. Linux中mongodb安装和导出为json

    采用官方工具导出mongo数据为json格式 文档:https://docs.mongodb.com/manual/reference/program/mongoexport/ 可以远程导出,只要有h ...

  6. MongoDB 常用故障排查工具

    1.profile profiling levels: 0,关闭profile:1,只抓取slow查询:2,抓取所有数据. 启动profile并且设置Profile级别: 可以通过mongo shel ...

  7. Ubuntu上安装MongoDB(译)

    add by zhj:直接从第四步开始就可以了,而且安装好MongoDB后会自动启动的,不必自己去执行启动命令 原文:https://docs.mongodb.com/manual/tutorial/ ...

  8. MongoDB 3.2 在windows上的安装

    翻译自 https://docs.mongodb.org/master/tutorial/install-mongodb-on-windows/ 在windows上安装 MongoDB 平台支持:从M ...

  9. 10个出色的NoSQL数据库

    http://www.infoq.com/research/nosql-databases?utm_source=infoqresearch&utm_campaign=lr-homepage ...

随机推荐

  1. 解决JettyMavenPlugin: Failed to load class "org.slf4j.impl.StaticLoggerBinder"

    <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-log4j12</arti ...

  2. meta标签用法总结

    注:本文并非本人撰写,摘自百度百科 meta标签用来描述一个HTML网页文档的属性,例如作者.日期和时间.网页描述.关键词.页面刷新等. 一.作用:       META标签是HTML标记HEAD区的 ...

  3. 使用FTP FtpWebRequest UsePassive 属性实现主动上传

    类型:System::Boolean如果客户端应用程序的数据传输过程侦听数据端口上的连接,则为 false:如果客户端应在数据端口上启动连接,则为 true. 默认值为 true. UsePassiv ...

  4. 【leetcode】Search Insert Position

    题目描述: Given a sorted array and a target value, return the index if the target is found. If not, retu ...

  5. MIT 6.828 JOS学习笔记6. Appendix 1: 实模式(real mode)与保护模式(protected mode)

    在我们阅读boot loader代码时,遇到了两个非常重要的概念,实模式(real mode)和保护模式(protected mode). 首先我们要知道这两种模式都是CPU的工作模式,实模式是早期C ...

  6. WEB容器启动——web.xml加载详解

    最近在看spring的源码,关于web.xml文件在容器(Tomcat.JBOSS等)启动时加载顺序问题很混乱,通过搜集资料,得出以下的结论: 1.加载顺序与它们在 web.xml 文件中的先后顺序无 ...

  7. spring-表达式语言-SpEL【转】

    Spring表达式语言(Spring Expression Language)简称:SpEL 课程概要: Spring表达式语言的入门介绍 Spring表达式语言的操作范围 Spring表达式语言的运 ...

  8. Android之UI编程(一):线性布局

    package com.example.fk_layout; import android.app.Activity; import android.os.Bundle; public class L ...

  9. React的双向绑定

    以前对于双向绑定概念来自于Angular.js,现在我用我感兴趣的react.js来实现这样的方式.有2种方式分析,1:不用插件,2:用插件 (引入react.js操作省略...) 不用插件: 先创建 ...

  10. 随堂笔记javascript篇之chrome调试:

    在征求到许老师的同意之后,我用javascript脚本语言来完成我的课堂作业,初学一门语言,刚开始也许是初生牛犊不怕虎,接受一门新的语言而且用来完成作业.一开始老师是拒绝的,他说我这样是太麻烦了.对于 ...