Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wh0/mongocrush
a patch for meteor-tool to reduce mongodb disk usage in development
https://github.com/wh0/mongocrush
Last synced: about 1 month ago
JSON representation
a patch for meteor-tool to reduce mongodb disk usage in development
- Host: GitHub
- URL: https://github.com/wh0/mongocrush
- Owner: wh0
- Created: 2015-01-22T20:03:49.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-11-04T02:37:57.000Z (about 9 years ago)
- Last Synced: 2023-03-27T18:12:25.540Z (over 1 year ago)
- Language: Makefile
- Homepage:
- Size: 152 KB
- Stars: 7
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Force sparse MongoDB data files.
And reduce the size of namespace files.
---
## Instructions
Run `make install`.
This patches a version of the Meteor tool so that it runs the MongoDB server differently.
Check what version it patches in the **Makefile**.
You can use `make uninstall` to go back to stock.### Force sparse data files
MongoDB doesn't preallocate its data files [when it runs on NFS](https://github.com/mongodb/mongo/blob/r2.6.7/src/mongo/util/file_allocator.cpp#L153).
We simulate this condition with a shim over the `fstatfs64` function, implemented in **nfslie.c**.
This probably leads to instability if you later run out of disk space that MongoDB thinks you should have.### Reduce the size of namespace files
> Each collection and index counts as a namespace. ...
> The default value of 16 megabytes provides for approximately 24,000 namespaces.We reduce it to 1 MB.
Now you can only have like 1,500 namespaces.
You're really gonna have to tighten your belt to build an app under that constraint.### Disable journaling
**Note: I haven't seen this in the latest version of stock, so I didn't include it in the patch this time.**
Journal files take like 384 MB right off the bat, in a blank app.
Only you can rationalize forgoing this durability.