Skip to content

Comment on Redis at Bump: many roles, best practices, and lessons learned

Comments

OK, so I'm running mongodb on the same machine as redis.

I do have mongodb replicated across two other machines, but could you briefly shed light on what the problems between redis and mongo on a single box were?

The quick answer is that MongoDB mmaps it's entire data set, so if you've got more data than ram (likely) the OS is going to constantly have all excess ram allocated to Mongo. This becomes an issue because Redis (very reasonably) assumes that malloc will return quickly, however, if the OS decides it's going to give Redis a dirty page, that malloc call just became disk bound.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.