Josef “Jeff” Sipek

MongoDB - First Impressions

I just ssh’ed into a server that’s running MongoDB to see if it was doing anything and if there were any cool commands to get stats from it. (I’ve never used MongoDB.) I accidentally ran mongod as non-root. It died because it didn’t have the right permissions — good. However, something in the output seemed completely and utterly retarded.

warning: 32-bit servers don't have journaling enabled by default. Please use
	--journal if you want durability.

[initandlisten] MongoDB starting : pid=12682 port=27017 dbpath=/data/db/
	32-bit host=hkn2012
[initandlisten] ** NOTE: when using MongoDB 32 bit, you are limited to about
	2 gigabytes of data
[initandlisten] **       see
[initandlisten] **       with --journal, the limit is lower

Was it the 2 GB data limit? Nope! Was it the fact that 32-bit systems default to non-durable mode while 64-bit default to durable? Bingo! Seriously, that is retarded. Why would anyone think that it is a good idea to cripple 32-bit systems like that? Was performance so bad with journaling that to avoid gaining a reputation for being slow the developers decided to keep the data unsafe by default? I doubt it. Was it to squeeze in a couple more MB of addressable data? Probably. Good job, folks.

For what it is worth, I decided to see if the 2 GB limit was something silly (i.e., using an int in some on-disk structure). It turns out that mongod likes to mmap the data for fast access. This is reasonable. (More so than using architecture specific integral types in on-disk structures.)

I wonder what other gems are hiding in this software.


  1. I'm surprised they support 32 bit systems at all. Is it even worth the headache maintaining support for two different architectures?

    Comment by Michael — May 1, 2012 @ 18:04

  2. Why would anyone want to use MongoDB when you can use perfectly reasonable Relational Database solutions without silly limits and default settings?

    Comment by Ari Chivukula — May 1, 2012 @ 19:09

  3. Jeff, You have to realize that journaling on by default in 64 bit mongodb is new in mongodb 2.0. The idea of turning journaling off by default on 32 bit is based on the idea that you would never run mongodb in production as a 32 bit process because of the 2gb limit.

    Comment by Justin Dearing — May 2, 2012 @ 15:02

  4. Michael - I don't think its that hard to support 32 bit architectures. Its not at all recommended for production, but it aids penetration for dev's running 32bit OSes on their workstations. Ari - There are cases where MongoDB makes sense. If you have a simple hierarchical data structure, and can fit all your data in RAM, you can't beat the speed. I've used both in production. RDBMSes are older and more mature. There are more use cases for them. I'm not arguing that. However, MongoDB and other NoSQL solutions have there place, just like XML, Flat files and berkleyDb do.

    Comment by Justin Dearing — May 4, 2012 @ 19:28

Atom feed for comments on this post.

Leave a comment

Powered by blahgd