Mongodb - Mmapv1 or Wiredtiger?

Asked

Viewed 154 times

0

We started a project with mongodb, at the time testing the Wiredtiger engine. This engine proved to be more interesting due to compressing the data much more than mmapv1. However, sometimes mongodb simply falls. Thus, we tested mmapv1, which, despite not compressing both the data and Wired, solved the problem of falls: mongodb did not fall anymore. Thus, we ended up opting for the use of mmapv1 itself.

For curiosity: who chose the wiredtiger engine,

  • had no problems of mongodb falling frequently?
  • If so, as you have resolved?
  • I have been running a Mongodb installation (3.4) with Wiredtiger for about a year. In that year the only times the bank was out were in scheduled maintenance of hardware or electrical maintenance (the infrastructure is proper). Did you ever dig deeper into the database logs to verify the cause of the crash? Which version did you use?

  • Jorge, at the time the version we tested of Mongo was 3.4.2. And as for checking log, it didn’t save anything in log when it stopped. The service simply drops. Out of curiosity, which filesystem you use in the OS: Ext4 or XFS ?

  • It is Ext4. I didn’t ask about the log because it wrote something at the time of the stop, but before that, how many connections were open before the bank went down? you had a lot of writing? a lot of reading? he was using a lot of processor? These are things that can tell you why you fell.

1 answer

0

Paulo, in the most current versions of Mongo DB is used Wiredtiger as stored engine default.

https://docs.mongodb.com/manual/core/storage-engines/

What may have happened is that the database service consumed all of your server’s memory and the O.S. itself killed the running of the service. To avoid this type of situation, the ideal is to work using Replica Set, which will ensure high availability for the end user and will allow you to maintain the problem server more slowly, and enable the monitoring option of Mongo DB itself.

https://docs.mongodb.com/manual/administration/free-monitoring/

In addition to the past above you can also limit the memory usage that the database will use.

https://docs.mongodb.com/manual/reference/ulimit/

An important point to check is the configuration of mongod.conf.

Some time ago I went through a similar situation and found a lot of information about the links I put here in the post.

I hope I’ve helped.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.