DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
Building Scalable Real-Time Apps with AstraDB and Vaadin
Register Now

Trending

  • Extending Java APIs: Add Missing Features Without the Hassle
  • Observability Architecture: Financial Payments Introduction
  • Effective Java Collection Framework: Best Practices and Tips
  • Auditing Tools for Kubernetes

Trending

  • Extending Java APIs: Add Missing Features Without the Hassle
  • Observability Architecture: Financial Payments Introduction
  • Effective Java Collection Framework: Best Practices and Tips
  • Auditing Tools for Kubernetes
  1. DZone
  2. Data Engineering
  3. Databases
  4. MongoMem: Optimize Memory Use in MongoDB

MongoMem: Optimize Memory Use in MongoDB

Alec Noller user avatar by
Alec Noller
·
May. 17, 14 · Interview
Like (0)
Save
Tweet
Share
7.17K Views

Join the DZone community and get the full member experience.

Join For Free

MongoDB users: do you have a way to tell how much memory each collection is using? For the Wish Engineering team, the answer was "no," and that's why they developed MongoMem. MongoMem allows MongoDB developers to precisely locate collections in need of memory-use optimization, rather than searching for problems based on intuition. According to the Wish team's overview of MongoMem, the need was clear: 

In our early days, we kept using a lot more memory than we thought we should be, but we were running blind when we tried to decide where the low-hanging fruit was to optimize. After plenty of frustrating optimizations that didn’t make much difference, we decided that we really needed better information, and MongoMem was born.

The Wish team's overview goes into detail on how MongoMem works - mincore calls and the collStats command do most of the work - what you can do with it, and even details some of the plans for MongoMem's future. Overall, though, it's a pretty straightforward little tool:

For each collection, it prints:

  • Number of MB in memory
  • Number of MB total
  • Percentage of the collection that’s in memory

You can find MongoMem on GitHub (with the usage instructions repeated), so if you're looking for some insight on how to keep MongoDB from overdoing it on memory, this might be a useful tool for you.

Memory (storage engine) MongoDB

Opinions expressed by DZone contributors are their own.

Trending

  • Extending Java APIs: Add Missing Features Without the Hassle
  • Observability Architecture: Financial Payments Introduction
  • Effective Java Collection Framework: Best Practices and Tips
  • Auditing Tools for Kubernetes

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com

Let's be friends: