I have read that mongoDB don't write data to disk right away, it does this periodically.
Any thoughts on how to deal with this?
You can enable journaling with --journal
.
Check out http://www.adathedev.co.uk/2011/03/mongodb-journaling-performance-single.html and http://www.mongodb.org/display/DOCS/Durability+and+Repair