DZone
Performance Zone
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
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Performance Zone > MongoMem: Optimize Memory Use in MongoDB

MongoMem: Optimize Memory Use in MongoDB

Alec Noller user avatar by
Alec Noller
·
May. 17, 14 · Performance Zone · Interview
Like (0)
Save
Tweet
6.93K 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.

Popular on DZone

  • Data Visualization of Healthcare Expenses by Country Using Web Scraping in Python
  • What Is SSO and Why Do You Need It?
  • How Many GPUs Should Your Deep Learning Workstation Have?
  • Slowness in Java Application Due To Increased FullGC Events: G1GC

Comments

Performance Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • 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
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo