Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bwaldvogel/mongocachestat
Tool to collect block cache statistics for a MongoDB instance based on $showDiskLoc and mincore(2)
https://github.com/bwaldvogel/mongocachestat
Last synced: 20 days ago
JSON representation
Tool to collect block cache statistics for a MongoDB instance based on $showDiskLoc and mincore(2)
- Host: GitHub
- URL: https://github.com/bwaldvogel/mongocachestat
- Owner: bwaldvogel
- Created: 2012-10-05T20:41:27.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2014-09-26T17:18:13.000Z (about 10 years ago)
- Last Synced: 2024-10-20T06:27:43.610Z (about 1 month ago)
- Language: C++
- Homepage:
- Size: 233 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
mongocachestat
==============[![Build Status](https://travis-ci.org/bwaldvogel/mongocachestat.png?branch=master)](https://travis-ci.org/bwaldvogel/mongocachestat)
Tool to collect block cache statistics for a MongoDB instance based on
[`$showDiskLoc`][showDiskLoc] and `mincore(2)`.Prerequisites
-------------- MongoDB 2.6 or newer because of [SERVER-5372][SERVER-5372]
- MongoDB client library and *headers* installedBuilding
--------# apt-get install mongodb-dev libmongo-client-dev libboost-system-dev libboost-regex-dev libboost-thread-dev libboost-filesystem-dev
# makeUsage
-----MongoDB needs to be up and running.
# ./mongocachestat [--directoryPerDb] []
Example:
# ./mongocachestat /data/mongodb localhost:27017
Implementation detail
---------------------Potential "Heisenberg effects" (i.e. changing the cache state by measuring with
this tool) are tried to be minimized by using `madvise(…, …, MADV_RANDOM)`.
It turns off Linux kernel read-ahead and read-behind. We call it Heisenberg
compensator in analogy to a famous science fiction series.[showDiskLoc]: http://docs.mongodb.org/manual/reference/operator/meta/showDiskLoc/
[SERVER-5372]: https://jira.mongodb.org/browse/SERVER-5372