2013-10-04 22:58:27 +02:00
|
|
|
.\" Man page generated from reStructuredText.
|
|
|
|
.
|
|
|
|
.TH "MONGOPERF" "1" "October 03, 2013" "2.4" "mongodb-manual"
|
2013-03-15 00:00:30 +01:00
|
|
|
.SH NAME
|
|
|
|
mongoperf \- MongoDB
|
|
|
|
.
|
|
|
|
.nr rst2man-indent-level 0
|
|
|
|
.
|
|
|
|
.de1 rstReportMargin
|
|
|
|
\\$1 \\n[an-margin]
|
|
|
|
level \\n[rst2man-indent-level]
|
|
|
|
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
|
|
|
-
|
|
|
|
\\n[rst2man-indent0]
|
|
|
|
\\n[rst2man-indent1]
|
|
|
|
\\n[rst2man-indent2]
|
|
|
|
..
|
|
|
|
.de1 INDENT
|
|
|
|
.\" .rstReportMargin pre:
|
|
|
|
. RS \\$1
|
|
|
|
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
|
|
|
|
. nr rst2man-indent-level +1
|
|
|
|
.\" .rstReportMargin post:
|
|
|
|
..
|
|
|
|
.de UNINDENT
|
|
|
|
. RE
|
|
|
|
.\" indent \\n[an-margin]
|
|
|
|
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
|
|
|
.nr rst2man-indent-level -1
|
|
|
|
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
|
|
|
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
|
|
|
|
..
|
|
|
|
.SH SYNOPSIS
|
|
|
|
.sp
|
2013-10-04 22:58:27 +02:00
|
|
|
\fBmongoperf\fP is a utility to check disk I/O performance
|
2013-03-15 00:00:30 +01:00
|
|
|
independently of MongoDB.
|
|
|
|
.sp
|
|
|
|
It times tests of random disk I/O and presents the results. You can
|
2013-10-04 22:58:27 +02:00
|
|
|
use \fBmongoperf\fP for any case apart from MongoDB. The
|
|
|
|
\fBmmf\fP \fBtrue\fP mode is completely generic. In
|
|
|
|
that mode it is somewhat analogous to tools such as \fI\%bonnie++\fP (albeit mongoperf is
|
2013-03-15 00:00:30 +01:00
|
|
|
simpler).
|
|
|
|
.sp
|
2013-10-04 22:58:27 +02:00
|
|
|
Specify options to \fBmongoperf\fP using a JavaScript document.
|
|
|
|
.sp
|
|
|
|
\fBSEE ALSO:\fP
|
|
|
|
.INDENT 0.0
|
|
|
|
.INDENT 3.5
|
2013-03-15 00:00:30 +01:00
|
|
|
.INDENT 0.0
|
|
|
|
.IP \(bu 2
|
|
|
|
\fI\%bonnie\fP
|
|
|
|
.IP \(bu 2
|
|
|
|
\fI\%bonnie++\fP
|
|
|
|
.IP \(bu 2
|
|
|
|
\fI\%Output from an example run\fP
|
|
|
|
.IP \(bu 2
|
|
|
|
\fI\%Checking Disk Performance with the mongoperf Utility\fP
|
|
|
|
.UNINDENT
|
2013-10-04 22:58:27 +02:00
|
|
|
.UNINDENT
|
|
|
|
.UNINDENT
|
2013-03-15 00:00:30 +01:00
|
|
|
.SH OPTIONS
|
|
|
|
.INDENT 0.0
|
|
|
|
.TP
|
|
|
|
.B mongoperf
|
|
|
|
.UNINDENT
|
|
|
|
.INDENT 0.0
|
|
|
|
.TP
|
2013-10-04 22:58:27 +02:00
|
|
|
.B mongoperf
|
|
|
|
.UNINDENT
|
|
|
|
.INDENT 0.0
|
|
|
|
.TP
|
2013-03-15 00:00:30 +01:00
|
|
|
.B \-\-help
|
2013-10-04 22:58:27 +02:00
|
|
|
Displays the options to \fBmongoperf\fP\&. Specify options to
|
|
|
|
\fBmongoperf\fP with a JSON document described in the
|
2013-03-15 00:00:30 +01:00
|
|
|
\fI\%Configuration Fields\fP section.
|
|
|
|
.UNINDENT
|
|
|
|
.INDENT 0.0
|
|
|
|
.TP
|
|
|
|
.B <jsonconfig>
|
2013-10-04 22:58:27 +02:00
|
|
|
\fBmongoperf\fP accepts configuration options in the form of a
|
2013-03-15 00:00:30 +01:00
|
|
|
file that holds a \fIJSON\fP document. You must stream the
|
2013-10-04 22:58:27 +02:00
|
|
|
content of this file into \fBmongoperf\fP, as in the following
|
2013-03-15 00:00:30 +01:00
|
|
|
operation:
|
2013-10-04 22:58:27 +02:00
|
|
|
.INDENT 7.0
|
|
|
|
.INDENT 3.5
|
2013-03-15 00:00:30 +01:00
|
|
|
.sp
|
|
|
|
.nf
|
|
|
|
.ft C
|
|
|
|
mongoperf < config
|
|
|
|
.ft P
|
|
|
|
.fi
|
2013-10-04 22:58:27 +02:00
|
|
|
.UNINDENT
|
|
|
|
.UNINDENT
|
2013-03-15 00:00:30 +01:00
|
|
|
.sp
|
|
|
|
In this example \fBconfig\fP is the name of a file that holds a JSON
|
|
|
|
document that resembles the following example:
|
2013-10-04 22:58:27 +02:00
|
|
|
.INDENT 7.0
|
|
|
|
.INDENT 3.5
|
2013-03-15 00:00:30 +01:00
|
|
|
.sp
|
|
|
|
.nf
|
|
|
|
.ft C
|
|
|
|
{
|
|
|
|
nThreads:<n>,
|
|
|
|
fileSizeMB:<n>,
|
|
|
|
sleepMicros:<n>,
|
|
|
|
mmf:<bool>,
|
|
|
|
r:<bool>,
|
|
|
|
w:<bool>,
|
|
|
|
recSizeKB:<n>,
|
|
|
|
syncDelay:<n>
|
|
|
|
}
|
|
|
|
.ft P
|
|
|
|
.fi
|
2013-10-04 22:58:27 +02:00
|
|
|
.UNINDENT
|
|
|
|
.UNINDENT
|
2013-03-15 00:00:30 +01:00
|
|
|
.sp
|
|
|
|
See the \fI\%Configuration Fields\fP section for documentation of each
|
|
|
|
of these fields.
|
|
|
|
.UNINDENT
|
|
|
|
.SH CONFIGURATION FIELDS
|
|
|
|
.INDENT 0.0
|
|
|
|
.TP
|
|
|
|
.B mongoperf.nThreads
|
|
|
|
\fIType:\fP Integer.
|
|
|
|
.sp
|
|
|
|
\fIDefault:\fP 1
|
|
|
|
.sp
|
2013-10-04 22:58:27 +02:00
|
|
|
Defines the number of threads \fBmongoperf\fP will use in the
|
2013-03-15 00:00:30 +01:00
|
|
|
test. To saturate your system\(aqs storage system you will need
|
2013-10-04 22:58:27 +02:00
|
|
|
multiple threads. Consider setting \fBnThreads\fP to \fB16\fP\&.
|
2013-03-15 00:00:30 +01:00
|
|
|
.UNINDENT
|
|
|
|
.INDENT 0.0
|
|
|
|
.TP
|
|
|
|
.B mongoperf.fileSizeMB
|
|
|
|
\fIType:\fP Integer.
|
|
|
|
.sp
|
|
|
|
\fIDefault:\fP 1 megabyte (i.e. 1024\s-2\u2\d\s0 bytes)
|
|
|
|
.sp
|
|
|
|
Test file size.
|
|
|
|
.UNINDENT
|
|
|
|
.INDENT 0.0
|
|
|
|
.TP
|
|
|
|
.B mongoperf.sleepMicros
|
|
|
|
\fIType:\fP Integer.
|
|
|
|
.sp
|
|
|
|
\fIDefault:\fP 0
|
|
|
|
.sp
|
2013-10-04 22:58:27 +02:00
|
|
|
\fBmongoperf\fP will pause for the number of specified
|
|
|
|
\fBsleepMicros\fP divided by the
|
|
|
|
\fBnThreads\fP between each operation.
|
2013-03-15 00:00:30 +01:00
|
|
|
.UNINDENT
|
|
|
|
.INDENT 0.0
|
|
|
|
.TP
|
|
|
|
.B mongoperf.mmf
|
|
|
|
\fIType:\fP Boolean.
|
|
|
|
.sp
|
|
|
|
\fIDefault:\fP \fBfalse\fP
|
|
|
|
.sp
|
2013-10-04 22:58:27 +02:00
|
|
|
Set \fBmmf\fP to \fBtrue\fP to use memory mapped
|
2013-03-15 00:00:30 +01:00
|
|
|
files for the tests.
|
|
|
|
.sp
|
|
|
|
Generally:
|
|
|
|
.INDENT 7.0
|
|
|
|
.IP \(bu 2
|
2013-10-04 22:58:27 +02:00
|
|
|
when \fBmmf\fP is \fBfalse\fP, \fBmongoperf\fP
|
2013-03-15 00:00:30 +01:00
|
|
|
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.
|
|
|
|
.IP \(bu 2
|
2013-10-04 22:58:27 +02:00
|
|
|
when \fBmmf\fP is \fBtrue\fP, \fBmongoperf\fP
|
2013-03-15 00:00:30 +01:00
|
|
|
runs tests of the caching system, and can use normal file system
|
|
|
|
cache. Use \fBmmf\fP in this mode to test file system cache
|
|
|
|
behavior with memory mapped files.
|
|
|
|
.UNINDENT
|
|
|
|
.UNINDENT
|
|
|
|
.INDENT 0.0
|
|
|
|
.TP
|
|
|
|
.B mongoperf.r
|
|
|
|
\fIType:\fP Boolean.
|
|
|
|
.sp
|
|
|
|
\fIDefault:\fP \fBfalse\fP
|
|
|
|
.sp
|
2013-10-04 22:58:27 +02:00
|
|
|
Set \fBr\fP to \fBtrue\fP to perform reads as part of
|
2013-03-15 00:00:30 +01:00
|
|
|
the tests.
|
|
|
|
.sp
|
2013-10-04 22:58:27 +02:00
|
|
|
Either \fBr\fP or \fBw\fP must be \fBtrue\fP\&.
|
2013-03-15 00:00:30 +01:00
|
|
|
.UNINDENT
|
|
|
|
.INDENT 0.0
|
|
|
|
.TP
|
|
|
|
.B mongoperf.w
|
|
|
|
\fIType:\fP Boolean.
|
|
|
|
.sp
|
|
|
|
\fIDefault:\fP \fBfalse\fP
|
|
|
|
.sp
|
2013-10-04 22:58:27 +02:00
|
|
|
Set \fBw\fP to \fBtrue\fP to perform writes as part of
|
2013-03-15 00:00:30 +01:00
|
|
|
the tests.
|
|
|
|
.sp
|
2013-10-04 22:58:27 +02:00
|
|
|
Either \fBr\fP or \fBw\fP must be \fBtrue\fP\&.
|
|
|
|
.UNINDENT
|
|
|
|
.INDENT 0.0
|
|
|
|
.TP
|
|
|
|
.B mongoperf.recSizeKB
|
|
|
|
New in version 2.4.
|
|
|
|
|
|
|
|
.sp
|
|
|
|
\fIType:\fP Integer.
|
|
|
|
.sp
|
|
|
|
\fIDefault:\fP 4 kb
|
|
|
|
.sp
|
|
|
|
The size of each write operation.
|
2013-03-15 00:00:30 +01:00
|
|
|
.UNINDENT
|
|
|
|
.INDENT 0.0
|
|
|
|
.TP
|
|
|
|
.B mongoperf.syncDelay
|
|
|
|
\fIType:\fP Integer.
|
|
|
|
.sp
|
|
|
|
\fIDefault:\fP 0
|
|
|
|
.sp
|
2013-10-04 22:58:27 +02:00
|
|
|
Seconds between disk flushes. \fBmongoperf.syncDelay\fP is
|
|
|
|
similar to \fI\-\-syncdelay\fP for \fBmongod\fP\&.
|
2013-03-15 00:00:30 +01:00
|
|
|
.sp
|
2013-10-04 22:58:27 +02:00
|
|
|
The \fBsyncDelay\fP controls how frequently
|
|
|
|
\fBmongoperf\fP performs an asynchronous disk flush of the memory
|
2013-03-15 00:00:30 +01:00
|
|
|
mapped file used for testing. By default, \fBmongod\fP
|
2013-10-04 22:58:27 +02:00
|
|
|
performs this operation every 60 seconds. Use
|
|
|
|
\fBsyncDelay\fP to test basic system performance of
|
2013-03-15 00:00:30 +01:00
|
|
|
this type of operation.
|
|
|
|
.sp
|
2013-10-04 22:58:27 +02:00
|
|
|
Only use \fBsyncDelay\fP in conjunction with
|
|
|
|
\fBmmf\fP set to \fBtrue\fP\&.
|
2013-03-15 00:00:30 +01:00
|
|
|
.sp
|
2013-10-04 22:58:27 +02:00
|
|
|
The default value of \fB0\fP disables this.
|
2013-03-15 00:00:30 +01:00
|
|
|
.UNINDENT
|
|
|
|
.SH USE
|
2013-10-04 22:58:27 +02:00
|
|
|
.INDENT 0.0
|
|
|
|
.INDENT 3.5
|
2013-03-15 00:00:30 +01:00
|
|
|
.sp
|
|
|
|
.nf
|
|
|
|
.ft C
|
|
|
|
mongoperf < jsonconfigfile
|
|
|
|
.ft P
|
|
|
|
.fi
|
2013-10-04 22:58:27 +02:00
|
|
|
.UNINDENT
|
|
|
|
.UNINDENT
|
2013-03-15 00:00:30 +01:00
|
|
|
.sp
|
2013-10-04 22:58:27 +02:00
|
|
|
Replace \fBjsonconfigfile\fP with the path to the \fBmongoperf\fP
|
|
|
|
configuration. You may also invoke \fBmongoperf\fP in the
|
2013-03-15 00:00:30 +01:00
|
|
|
following form:
|
2013-10-04 22:58:27 +02:00
|
|
|
.INDENT 0.0
|
|
|
|
.INDENT 3.5
|
2013-03-15 00:00:30 +01:00
|
|
|
.sp
|
|
|
|
.nf
|
|
|
|
.ft C
|
|
|
|
echo "{nThreads:16,fileSizeMB:1000,r:true}" | ./mongoperf
|
|
|
|
.ft P
|
|
|
|
.fi
|
2013-10-04 22:58:27 +02:00
|
|
|
.UNINDENT
|
|
|
|
.UNINDENT
|
2013-03-15 00:00:30 +01:00
|
|
|
.sp
|
|
|
|
In this operation:
|
|
|
|
.INDENT 0.0
|
|
|
|
.IP \(bu 2
|
2013-10-04 22:58:27 +02:00
|
|
|
\fBmongoperf\fP tests direct physical random read io\(aqs, using
|
2013-03-15 00:00:30 +01:00
|
|
|
16 concurrent reader threads.
|
|
|
|
.IP \(bu 2
|
2013-10-04 22:58:27 +02:00
|
|
|
\fBmongoperf\fP uses a 1 gigabyte test file.
|
2013-03-15 00:00:30 +01:00
|
|
|
.UNINDENT
|
|
|
|
.sp
|
|
|
|
Consider using \fBiostat\fP, as invoked in the following example to
|
|
|
|
monitor I/O performance during the test.
|
2013-10-04 22:58:27 +02:00
|
|
|
.INDENT 0.0
|
|
|
|
.INDENT 3.5
|
2013-03-15 00:00:30 +01:00
|
|
|
.sp
|
|
|
|
.nf
|
|
|
|
.ft C
|
|
|
|
iostat \-xm 2
|
|
|
|
.ft P
|
|
|
|
.fi
|
2013-10-04 22:58:27 +02:00
|
|
|
.UNINDENT
|
|
|
|
.UNINDENT
|
2013-03-15 00:00:30 +01:00
|
|
|
.SH AUTHOR
|
|
|
|
MongoDB Documentation Project
|
|
|
|
.SH COPYRIGHT
|
2013-10-04 22:58:27 +02:00
|
|
|
2011-2013, MongoDB, Inc.
|
2013-03-15 00:00:30 +01:00
|
|
|
.\" Generated by docutils manpage writer.
|
|
|
|
.
|