I was working on a section on the gooey innards of journaling for The Definitive Guide, but then I realized it’s an implementation detail that most people won’t care about. However, I had all of these nice diagrams just laying around. Good idea, Patrick! So, how does journaling work? Your disk has your data filesContinue reading “How MongoDB’s Journaling Works”
Category Archives: MongoDB
How to Make Your First MongoDB Commit
10gen is hiring a lot of people straight out of college, so I thought this guide would be useful. Basically, the idea is: you have found and fixed a bug (so you’ve cloned the mongo repository, created a branch named SERVER-1234, and committed your change on it). You’ve had your fix code-reviewed (this page isContinue reading “How to Make Your First MongoDB Commit”
Call for Schemas
I just started working on MongoDB: The Definitive Guide, 2nd Edition! I’m planning to add: Lots of ops info Real-world schema design examples Coverage of new features since 2010… so quite a few However, I need your help on the schema design part! I want to include some real-world schemas people have used and whyContinue reading “Call for Schemas”
Controlling Collection Distribution
Shard tagging is a new feature in MongoDB version 2.2.0. It’s supposed to force writes to go to a local data center, but it can also be used to pin a collection to a shard or set of shards. Note: to try this out, you’ll have to use 2.2.0-rc0 or greater. To play with thisContinue reading “Controlling Collection Distribution”
Replica Set Internals Part V: Initial Sync
I’ve been doing replica set “bootcamps” for new hires. It’s mainly focused on applying this to debug replica set issues and being able to talk fluently about what’s happening, but it occurred to me that you (blog readers) might be interested in it, too. There are 8 subjects I cover in my bootcamp: Elections CreatingContinue reading “Replica Set Internals Part V: Initial Sync”
Good Night, Westley: Time-To-Live Collections
In The Princess Bride, every night the Dread Pirate Roberts tells Westley: “Good night, Westley. Good work. Sleep well. I’ll most likely kill you in the morning.” Let’s say the Dread Pirate Roberts wants to optimize this process, so he stores prisoners in a database. When he captures Westley, he can put: > db.prisoners.insert({ …Continue reading “Good Night, Westley: Time-To-Live Collections”
Replica Set Internals Bootcamp Part III: Reconfiguring
I’ve been doing replica set “bootcamps” for new hires. It’s mainly focused on applying this to debug replica set issues and being able to talk fluently about what’s happening, but it occurred to me that you (blog readers) might be interested in it, too. There are 8 subjects I cover in my bootcamp: Elections CreatingContinue reading “Replica Set Internals Bootcamp Part III: Reconfiguring”
––thursday #5: diagnosing high readahead
Having readahead set too high can slow your database to a crawl. This post discusses why that is and how you can diagnose it. The #1 sign that readahead is too high is that MongoDB isn’t using as much RAM as it should be. If you’re running Mongo Monitoring Service (MMS), take a look atContinue reading “––thursday #5: diagnosing high readahead”
Night of the Living Dead Ops
MongoDB users often ask about the “killed” field in db.currentOp() output. For example, if you’ve run db.killOp(), you might see something like: > db.currentOp() { “inprog” : [ { “opid” : 3062962, “active” : true, “lockType” : “write”, “waitingForLock” : false, “secs_running” : 32267, “op” : “update”, “ns” : “httpdb.servers”, “query” : { “_id” :Continue reading “Night of the Living Dead Ops”
Replica Set Internals Bootcamp: Part II – Creating a Set
I’ve been doing replica set “bootcamps” for new hires. It’s mainly focused on applying this to debug replica set issues and being able to talk fluently about what’s happening, but it occurred to me that you (blog readers) might be interested in it, too. There are 8 subjects I cover in my bootcamp: Elections CreatingContinue reading “Replica Set Internals Bootcamp: Part II – Creating a Set”