Cup of Java

Tales of a lost software developer

MongoDB Berlin 2013

Yesterday I attended the MongoDB Berlin conference which is a one day conference by 10gen to offer a space for collaboration and exchange around MongoDB. I want to sum up some (hopefully) interesting points for you.

  • be aware of pre-allocation done by MongoDB
  • memory fragmentation is important to keep an eye on when dealing with updates on collections
  • predict how your schema (although you have none in Mongo but your data still have some kind of structure) may change in future and how this will affect your sizing requirements
  • collection.drop() can be significantly faster than removing a document from one collection (drop also reduces memory fragmentation because then you typically create a new collection from scratch)
  • put different collections on different drives to scale write operations
  • put the journal on an extra drive
  • one index per query: you need to use compound indices if you need indices for several fields in a query
  • try covered indices for performance improvements on queries you are doing quite often
  • monitor with mongostat and mongotop
  • when using mongostat interesting columns for inspect correct sizing, index setup and configuration are faults, locked, idx miss, qr, qw, ar, aw
  • also nice web frontends for monitoring: Server Density, the MongoDB Monitoring Service (free) and of course you can use tools like Nagios, Graphite or Ganglia
  • have a look at the aggregation framework of MongoDB, looks quite promising
  • Spring Data is the way to go for using MongoDB with Java due Morphia seems to be dead (or not much interaction in community) and Hibernate OGM is not worth to be mentioned at all

I can only recommend anyone of you who is interested in NoSql stores to try MongoDB. On you can also sign up for several free online trainings.

Stay tuned.