zoukankan      html  css  js  c++  java
  • mongoperf

    官方文档
    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.

  • 相关阅读:
    percona-toolkit
    使用pt-query-digest,找到不是很合适的sql
    linux_添加定时任务,每5min清理下某个文件夹下的文件
    dotTrace快速帮助你定位C#代码的性能瓶颈
    性能测试问题_tomcat占用内存很高,响应速度很慢
    性能分析_linux服务器CPU_中断
    性能分析_linux服务器CPU_CPU利用率
    性能分析_linux服务器CPU_Load Average
    LR_问题_虚拟用户以进程和线程模式运行的区别
    truncate,delete,drop的区别
  • 原文地址:https://www.cnblogs.com/vman/p/5692672.html
Copyright © 2011-2022 走看看