-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Port of old mongoperf page from wiki to docs mainline #578
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,167 @@ | ||
.. _mongoperf: | ||
|
||
============= | ||
``mongoperf`` | ||
============= | ||
|
||
.. http://www.mongodb.org/display/DOCS/mongoperf | ||
|
||
.. default-domain:: mongodb | ||
|
||
Synopsis | ||
-------- | ||
|
||
:program:`mongoperf` is a utility to check disk I/O performance independent of MongoDB. | ||
It times tests of random disk I/O and presents the results. | ||
:program:`mongoperf` can be used to check disk subsystem performance even when MongoDB | ||
will not be used at all: the :samp:`mmf:false` mode is completely generic. | ||
In that mode is it somewhat analogous to tools such as | ||
`bonnie++ <http://sourceforge.net/projects/bonnie/>`_ | ||
(albeit mongoperf is simpler). | ||
|
||
Specify options to :program:`mongoperf` using a JavaScript document. | ||
|
||
.. seealso:: | ||
|
||
* `bonnie <http://www.textuality.com/bonnie/>`_ | ||
* `bonnie++ <http://sourceforge.net/projects/bonnie/>`_ | ||
* `Output from an example run <https://gist.github.com/1694664>`_ | ||
* `Checking Disk Performance with the mongoperf Utility <http://blog.mongodb.org/post/40769806981/checking-disk-performance-with-the-mongoperf-utility>`_ | ||
|
||
.. _mongoperf-options: | ||
|
||
Options | ||
------- | ||
|
||
.. binary:: mongoperf | ||
|
||
.. program:: mongoperf | ||
|
||
.. option:: --help | ||
|
||
Displays the options to :program:`mongoperf`. | ||
Options are specified using a JavaScript document. | ||
|
||
.. _mongoperf-fields: | ||
|
||
Fields | ||
------ | ||
|
||
:samp:`nThreads: {integer}` | ||
|
||
number of threads, defaults to 1. You will need several threads to | ||
test a disk subsystem to saturation. For example, try | ||
:samp:`nThreads:16` | ||
|
||
:samp:`fileSizeMB: {integer}` | ||
|
||
test file size, default is 1Mb (1024^2 bytes) | ||
|
||
:samp:`sleepMicros: {integer}` | ||
|
||
pause for *sleepMicros* / *nThreads* between each operation | ||
(default 0). | ||
|
||
:samp:`mmf: {Boolean}` | ||
|
||
Set to *true* to use memory mapped files (default: false) | ||
|
||
:samp:`r: {Boolean}` | ||
|
||
Set to *true* to perform reads (default: false) | ||
|
||
:samp:`w: {Boolean}` | ||
|
||
Set to *true* to perform writes (default: false) | ||
|
||
:samp:`recSizeKB: {integer}` | ||
|
||
Size of each write in KB | ||
|
||
:samp:`syncDelay: {integer}` | ||
|
||
Seconds between fsyncs, like | ||
:mongodb:option:`--syncdelay <mongod --syncdelay>` in mongod. | ||
For use with :samp:`mmf:true` mode only. The :samp:`syncDelay:{secs}` | ||
option instructs :program:`mongoperf` to | ||
perform an asynchronous fsync of the test mmap file at the | ||
specified interval. | ||
:program:`mongod` does something similar | ||
every 60 seconds, thus this can be useful to test basic system | ||
behavior in a simpler setting. This option is applicable only | ||
when using :samp:`mmf:true` mode. | ||
Currently in :program:`mongoperf` this defaults to zero, which | ||
means off. | ||
|
||
|
||
Use | ||
--- | ||
|
||
Building | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if mongoperf is included in the distribution our current 2.2 binaries then we might as well drop this section. objections? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no objections. |
||
~~~~~~~~ | ||
|
||
Run ``scons mongoperf`` or ``scons mongoperf.exe`` to build. | ||
|
||
.. note:: | ||
|
||
.. version-added: 2.0.2 | ||
:program:`mongoperf` is new, so will need a recent version of the | ||
MongoDB source code. | ||
|
||
Running | ||
~~~~~~~ | ||
|
||
.. code-block:: javascript | ||
|
||
mongoperf | ||
|
||
usage: | ||
|
||
mongoperf < myjsonconfigfile | ||
|
||
{ | ||
nThreads:<n>, // number of threads (default 1) | ||
fileSizeMB:<n>, // test file size (default 1MB) | ||
sleepMicros:<n>, // pause for sleepMicros/nThreads between each operation (default 0) | ||
mmf:<bool>, // if true do i/o's via memory mapped files (default false) | ||
r:<bool>, // do reads (default false) | ||
w:<bool>, // do writes (default false) | ||
recSizeKB:<n>, // size of each write (default 4KB) | ||
syncDelay:<n> // secs between fsyncs, like --syncdelay in mongod. (default 0/never) | ||
} | ||
|
||
|
||
* non-mmf io is direct io (no caching). use a large file size to test | ||
making the heads move significantly and to avoid i/o coalescing | ||
* mmf io uses caching (the file system cache). | ||
|
||
|
||
.. code-block:: sh | ||
|
||
# example invocation: | ||
# test physical (direct) random read io's, using 16 concurrent reader threads, | ||
# and a 1GB test file. | ||
echo "{nThreads:16,fileSizeMB:1000,r:true}" | ./mongoperf | tee out | ||
|
||
# we might do this while it runs: | ||
iostat -xm 2 | ||
|
||
|
||
mmf:false mode (direct i/o test) | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
In this default mode, mongoperf performs random 4KB +direct+ (physical) | ||
disk i/o's (i.e., O_DIRECT is used on Linux). | ||
Thus this is a physical disk i/o test. | ||
|
||
mmf:true mode | ||
~~~~~~~~~~~~~ | ||
|
||
If :samp:`mmf:true` is specified as an option, tests are performed using | ||
memory-mapped files. | ||
These files are opened in a `normal` fashion and thus *caching is allowed*. | ||
This sometimes can be used to test file system cache behavior with | ||
memory mapped files. | ||
|
||
|
||
.. TODO:: previously had terse link to iostat |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where did
:samp:
come from?