MongoDB and MySQL, each update of MySQL will be directly written to the hard disk, but MONGO will not, as a memory database, data operations will be written to the memory, and then to persist to the hard drive, then MONGO how to persist it?
At startup, MongoDB Initializes a thread that is constantly looping (unless applied crash) to get the data to be persisted from the defer queue for a certain period of time and write to the journal (log) and Mongofile (data) at the disk. Of course because it's not written to disk when the user adds the record, so according to the MongoDB developer, it's not going to cause any performance loss, because when you see the code discovery, when you do the cud operation, the record type are put into the defer queue for late batch (GROUPCOMMIT) submissions, but believe that the time period parameter is a serious consideration of the parameters, the system is 90 milliseconds, if the value is low, it may cause frequent disk operations, too high will cause the system downtime data loss.